





from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
SCREAMING_SNAKE_CASE_						       =	2_9_9_7_9_2_4_5_8

# Symbols
SCREAMING_SNAKE_CASE_       ,						SCREAMING_SNAKE_CASE_       ,						SCREAMING_SNAKE_CASE_       ,						SCREAMING_SNAKE_CASE_						       =	symbols("""ct x y z""")



def        __lowercase       (				_SCREAMING_SNAKE_CASE     )			->       float:


      '''simple docstring'''


      if velocity > c:
            raise ValueError("""Speed must not exceed light speed 299,792,458 [m/s]!"""     )
      elif velocity < 1:
            # Usually the speed should be much higher than 1 (c order of magnitude)
            raise ValueError("""Speed must be greater than or equal to 1!"""     )

      return velocity / c



def        __lowercase       (				_SCREAMING_SNAKE_CASE     )			->       float:


      '''simple docstring'''


      return 1 / sqrt(1 - beta(_SCREAMING_SNAKE_CASE     ) ** 2     )



def        __lowercase       (				_SCREAMING_SNAKE_CASE     )			->       np.ndarray:


      '''simple docstring'''


      return np.array(
          [
              [gamma(_SCREAMING_SNAKE_CASE     ), -gamma(_SCREAMING_SNAKE_CASE     ) * beta(_SCREAMING_SNAKE_CASE     ), 0, 0],
              [-gamma(_SCREAMING_SNAKE_CASE     ) * beta(_SCREAMING_SNAKE_CASE     ), gamma(_SCREAMING_SNAKE_CASE     ), 0, 0],
              [0, 0, 1, 0],
              [0, 0, 0, 1],
          ]     )



def        __lowercase       (				_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE = None     )			->       np.ndarray:


      '''simple docstring'''


      if event is None:
            SCREAMING_SNAKE_CASE		=						np.array([ct, x, y, z]     )  # Symbolic four vector
      else:
            event[0] *= c  # x0 is ct (speed of light * time)

      return transformation_matrix(_SCREAMING_SNAKE_CASE     ) @ event


if __name__ == "__main__":
      import doctest

      doctest.testmod()

      # Example of symbolic vector:
      SCREAMING_SNAKE_CASE_						       =	transform(2_9_9_7_9_2_4_5)
      print("""Example of four vector: """)
      print(F'''ct\' = {four_vector[0]}''')
      print(F'''x\' = {four_vector[1]}''')
      print(F'''y\' = {four_vector[2]}''')
      print(F'''z\' = {four_vector[3]}''')

      # Substitute symbols with numerical values
      SCREAMING_SNAKE_CASE_						       =	{ct: c, x: 1, y: 1, z: 1}
      SCREAMING_SNAKE_CASE_						       =	[four_vector[i].subs(sub_dict) for i in range(4)]

      print(F'''\n{numerical_vector}''')









from __future__ import annotations



def        __lowercase       (				_SCREAMING_SNAKE_CASE			,						_SCREAMING_SNAKE_CASE     )			->       list[int]:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						0
      SCREAMING_SNAKE_CASE		=						len(_SCREAMING_SNAKE_CASE     ) - 1

      while i < j:
            if nums[i] + nums[j] == target:
                  return [i, j]
            elif nums[i] + nums[j] < target:
                  SCREAMING_SNAKE_CASE		=						i + 1
            else:
                  SCREAMING_SNAKE_CASE		=						j - 1

      return []


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      print(F'''{two_pointer([2, 7, 1_1, 1_5], 9) = }''')


