

from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
__A			:					Tuple						=			2_9_9_7_9_2_4_5_8

# Symbols
__A			, __A			, __A			, __A			:					Dict						=			symbols('ct x y z')





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





def 	__a     (      A__			:  float       ):
    return np.array(
        [
            [gamma(A__       ), -gamma(A__       ) * beta(A__       ), 0, 0],
            [-gamma(A__       ) * beta(A__       ), gamma(A__       ), 0, 0],
            [0, 0, 1, 0],
            [0, 0, 0, 1],
        ]       )





def 	__a     (      A__			:  float			,  A__			:  np.ndarray | None = None       ):
    # Ensure event is not empty
    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(A__       ) @ event


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    # Example of symbolic vector:
    __A			:					List[str]						=			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
    __A			:					List[str]						=			{ct: c, x: 1, y: 1, z: 1}
    __A			:					str						=			[four_vector[i].subs(sub_dict) for i in range(4)]

    print(f'\n{numerical_vector}')


def 	__a     (      A__			:  int       ):
    if not isinstance(A__			,  A__       ):
        raise ValueError("Input must be an integer"       )
    if input_num <= 0:
        raise ValueError("Input must be positive"       )
    return sum(
        divisor for divisor in range(1			,  input_num // 2 + 1       ) if input_num % divisor == 0       )


if __name__ == "__main__":
    import doctest

    doctest.testmod()