import Init.Data.Rat.Basic import proofs.MetricVolume010k import proofs.ContractedPalatini010j /-! # Minimum Mechanics 010k — Levi-Civita variation-current identity The 010j Palatini current was certified for an arbitrary connection variation V. The present theorem constrains V to its geometric source: the torsion-free metric-compatible Christoffel variation generated by a symmetric metric perturbation h and its covariant first derivative H. Write B=g⁻¹, H_aij=(∇_a h)_ij, and (2δΓ)^k_ij = B^kl (H_ijl + H_jil - H_lij). For symmetric B and H_aij=H_aji, the Palatini current obeys exactly (2J)^k = 2 B^kl B^ij H_ijl - 2 B^ki B^jl H_ijl. The first term is twice the divergence of h with its indices raised; the second term is twice the raised gradient of tr_g(h). This is the missing *local metric-variation adapter* connecting the 010j connection current to the ADM lapse-Hessian variation. All indices are explicit Fin 3; no analytic coordinates, global tangent bundle or integration has been supplied. The identity is conditional on the witnessed symmetry of B and H; no unsupported theorem strength. No new axioms, Mathlib or sorry. -/ set_option autoImplicit false namespace LeviCivitaCurrent010k abbrev Axis := Fin 3 abbrev Mat3 := MetricInverse010i.Mat3 abbrev Conn := ConnectionPalatini010h.Connection abbrev MetricJet := Axis → Axis → Axis → Int def sum3 (f : Axis → Int) : Int := f 0 + f 1 + f 2 def twoDeltaGamma (B : Mat3) (H : MetricJet) : Conn := fun k i j => sum3 (fun l => B k l * (H i j l + H j i l - H l i j)) def twicePalatiniCurrent (B : Mat3) (H : MetricJet) (k : Axis) : Int := ContractedPalatini010j.palatiniCurrent B (twoDeltaGamma B H) k def twiceRaisedDivergence (B : Mat3) (H : MetricJet) (k : Axis) : Int := 2 * sum3 (fun i => sum3 (fun j => sum3 (fun l => B k l * B i j * H i j l))) def twiceRaisedTraceGradient (B : Mat3) (H : MetricJet) (k : Axis) : Int := 2 * sum3 (fun i => sum3 (fun j => sum3 (fun l => B k i * B j l * H i j l))) def geometricCurrent (B : Mat3) (H : MetricJet) (k : Axis) : Int := twiceRaisedDivergence B H k - twiceRaisedTraceGradient B H k theorem christoffel_variation_lower_symmetry (B : Mat3) (H : MetricJet) (hH : ∀ a i j, H a i j = H a j i) (k i j : Axis) : twoDeltaGamma B H k i j = twoDeltaGamma B H k j i := by simp only [twoDeltaGamma, sum3] rw [hH 0 i j, hH 1 i j, hH 2 i j] simp only [Int.mul_add, Int.mul_sub] omega theorem current_from_symmetric_metric_gradient (B : Mat3) (H : MetricJet) (hB : ∀ i j, B i j = B j i) (hH : ∀ a i j, H a i j = H a j i) (k : Axis) : twicePalatiniCurrent B H k = geometricCurrent B H k := by have hb01 := hB 0 1 have hb02 := hB 0 2 have hb12 := hB 1 2 have hbk0 := hB 0 k have hbk1 := hB 1 k have hbk2 := hB 2 k have hh001 := hH 0 0 1 have hh002 := hH 0 0 2 have hh012 := hH 0 1 2 have hh101 := hH 1 0 1 have hh102 := hH 1 0 2 have hh112 := hH 1 1 2 have hh201 := hH 2 0 1 have hh202 := hH 2 0 2 have hh212 := hH 2 1 2 simp only [twicePalatiniCurrent, geometricCurrent, ContractedPalatini010j.palatiniCurrent, ContractedPalatini010j.sum3, twiceRaisedDivergence, twiceRaisedTraceGradient, twoDeltaGamma, sum3] simp only [hb01, hb02, hb12, hbk0, hbk1, hbk2, hh001, hh002, hh012, hh101, hh102, hh112, hh201, hh202, hh212] simp only [Int.mul_add, Int.mul_sub, Int.add_mul, Int.sub_mul, Int.mul_assoc, Int.neg_mul, Int.mul_neg] simp only [Int.mul_comm, Int.mul_left_comm, Int.mul_assoc] omega -- The current is genuinely dependent on metric-perturbation derivatives. -- This is a negative control for a spurious vanishing-current claim. def flatB : Mat3 := MetricInverse010i.M1 def sampleMetricGradient : MetricJet := fun a i j => if a=0 ∧ i=1 ∧ j=1 then 1 else 0 theorem current_nonzero_control : geometricCurrent flatB sampleMetricGradient 0 ≠ 0 := by decide #print axioms christoffel_variation_lower_symmetry #print axioms current_from_symmetric_metric_gradient #print axioms current_nonzero_control end LeviCivitaCurrent010k