






def        _snake_case   (_snake_case				:       int)					->	bool:
   if num < 0:
      return False

   _lowercase              =num
   _lowercase              =0
   while num > 0:
      _lowercase              =rev_num * 10 + (num % 10)
      num //= 10

   return num_copy == rev_num


if __name__ == "__main__":
    import doctest

    doctest.testmod()










from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
_SCREAMING_SNAKE_CASE   =  2_99_79_24_58

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





def        _snake_case   (_snake_case				:       float)					->	float:
   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        _snake_case   (_snake_case				:       float)					->	float:
   return 1 / sqrt(1 - beta(_snake_case) ** 2)





def        _snake_case   (_snake_case				:       float)					->	np.ndarray:
   return np.array(
       [
           [gamma(_snake_case), -gamma(_snake_case) * beta(_snake_case), 0, 0],
           [-gamma(_snake_case) * beta(_snake_case), gamma(_snake_case), 0, 0],
           [0, 0, 1, 0],
           [0, 0, 0, 1],
       ])





def        _snake_case   (_snake_case				:       float      ,    _snake_case				:       np.ndarray | None = None)					->	np.ndarray:
   # Ensure event is not empty
   if event is None:
      _lowercase              =np.array([ct, x, y, z])  # Symbolic four vector
   else:
      event[0] *= c  # x0 is ct (speed of light * time)

   return transformation_matrix(_snake_case) @ event


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    # Example of symbolic vector:
    _SCREAMING_SNAKE_CASE   =  transform(29_97_92_45)
    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}''')


