""" Lorentz force from covariant formulation. Assertion-based CAS audit block. Pillar: Electromagnetism | Chain: F^{mu nu} -> F^mu_nu -> dp^mu/dtau = qF^mu_nu u^nu CalRef: EM field tensor -> 3-vector Lorentz force Structure mirrors cas_F03_F0004.txt sections A-E. Encodes the field tensor as an explicit 4x4 matrix, performs index contraction symbolically, and verifies that the 3-vector Lorentz force emerges. """ def run(): from sympy import symbols, Matrix, simplify, diag print('=== CAS AUDIT: F0004 — Lorentz force (fully explicit) ===\n') pass_count = 0 fail_count = 0 total_steps = 0 # ---- A. INPUTS ---- q = symbols('q', real=True) m = symbols('m', positive=True) c = symbols('c', positive=True) gamma_L = symbols('gamma_L', positive=True) v1, v2, v3 = symbols('v1 v2 v3', real=True) Ex, Ey, Ez = symbols('Ex Ey Ez', real=True) Bx, By, Bz = symbols('Bx By Bz', real=True) # Metric tensor (Minkowski, signature -+++) eta = diag(-1, 1, 1, 1) print('Section A: Inputs defined.') print(' eta = diag(-1,1,1,1), F^{mu nu} from E,B, u^mu = gamma*(c,v)\n') # ---- B. ASSUMPTIONS / DOMAINS ---- print('Section B: Assumptions set (m>0, q real, |v|