import proofs.SmoothSuture011c /-! # 011c / S-01c.1 — finite Fourier covariance on the Suture carrier This module supplies the finite internal covariance part of SF.6--SF.10 on the real Fourier carrier. It keeps the separate SD.5 smooth regular-branch bridge outside this file. The proof is organized in two layers: a generic real rotation proof for the three Fourier planes, followed by the eight-address block carrier. -/ set_option autoImplicit false namespace SutureCovariance011c open RootFieldLift011a SutureSignature011b SmoothSuture011c noncomputable section structure Mat2 where a : ℝ b : ℝ c : ℝ d : ℝ @[ext] theorem Mat2.ext {x y : Mat2} (ha : x.a = y.a) (hb : x.b = y.b) (hc : x.c = y.c) (hd : x.d = y.d) : x = y := by cases x cases y simp_all def mI : Mat2 := ⟨1, 0, 0, 1⟩ def mC : Mat2 := ⟨0, -1, 1, 0⟩ def mD : Mat2 := ⟨1, 0, 0, -1⟩ def mG : Mat2 := ⟨-2, 1, 1, 2⟩ def mH : Mat2 := ⟨-2 / Real.sqrt 5, 1 / Real.sqrt 5, 1 / Real.sqrt 5, 2 / Real.sqrt 5⟩ def mul (x y : Mat2) : Mat2 := ⟨x.a * y.a + x.b * y.c, x.a * y.b + x.b * y.d, x.c * y.a + x.d * y.c, x.c * y.b + x.d * y.d⟩ def neg (x : Mat2) : Mat2 := ⟨-x.a, -x.b, -x.c, -x.d⟩ def transpose (x : Mat2) : Mat2 := ⟨x.a, x.c, x.b, x.d⟩ def pow : Mat2 → Nat → Mat2 | _, 0 => mI | x, n + 1 => mul (pow x n) x def rotation (θ : ℝ) : Mat2 := ⟨Real.cos θ, -Real.sin θ, Real.sin θ, Real.cos θ⟩ theorem rotation_zero : rotation 0 = mI := by ext <;> simp [rotation, mI] theorem rotation_mul (x y : ℝ) : mul (rotation x) (rotation y) = rotation (x + y) := by ext <;> simp [mul, rotation, Real.cos_add, Real.sin_add] <;> ring theorem rotation_transpose_mul (θ : ℝ) : mul (transpose (rotation θ)) (rotation θ) = mI := by have h := Real.sin_sq_add_cos_sq θ ext <;> dsimp [mul, transpose, rotation, mI] · nlinarith · ring · ring · nlinarith theorem rotation_mul_c (θ : ℝ) : mul (transpose (rotation θ)) (mul mC (rotation θ)) = mC := by have h := Real.sin_sq_add_cos_sq θ ext <;> dsimp [mul, transpose, rotation, mC] · ring · nlinarith · nlinarith · ring theorem d_transpose_d : mul (transpose mD) (mul mI mD) = mI := by ext <;> norm_num [mul, transpose, mD, mI] theorem d_transpose_c_d : mul (transpose mD) (mul mC mD) = ⟨0, 1, -1, 0⟩ := by ext <;> norm_num [mul, transpose, mD, mC] theorem d_rotation_d (θ : ℝ) : mul mD (mul (rotation θ) mD) = rotation (-θ) := by ext <;> simp [mul, mD, rotation, Real.cos_neg, Real.sin_neg] theorem h_transpose_g_h : mul (transpose mH) (mul mG mH) = mG := by have hsqrt : (Real.sqrt 5) ^ 2 = (5 : ℝ) := by rw [sq] norm_num have hnonzero : Real.sqrt (5 : ℝ) ≠ 0 := by positivity ext <;> dsimp [mul, transpose, mH, mG] all_goals field_simp [hnonzero] all_goals nlinarith [hsqrt] theorem h_transpose_c_h : mul (transpose mH) (mul mC mH) = ⟨0, 1, -1, 0⟩ := by have hsqrt : (Real.sqrt 5) ^ 2 = (5 : ℝ) := by rw [sq] norm_num have hnonzero : Real.sqrt (5 : ℝ) ≠ 0 := by positivity ext <;> dsimp [mul, transpose, mH, mC] all_goals field_simp [hnonzero] all_goals nlinarith [hsqrt] theorem h_square : mul mH mH = mI := by have hsqrt : (Real.sqrt 5) ^ 2 = (5 : ℝ) := by rw [sq] norm_num have hnonzero : Real.sqrt (5 : ℝ) ≠ 0 := by positivity ext <;> dsimp [mul, mH, mI] all_goals field_simp [hnonzero] all_goals nlinarith [hsqrt] theorem rotation_pow (θ : ℝ) (n : Nat) : pow (rotation θ) n = rotation (n * θ) := by induction n with | zero => simp [pow, rotation_zero] | succ n ih => rw [pow, ih, rotation_mul] congr 1 push_cast ring def theta : ℝ := (2 * Real.pi) / 7 theorem seven_theta : (7 : ℝ) * theta = 2 * Real.pi := by dsimp [theta] ring theorem rotation_weight_pow_seven (j : Nat) : pow (rotation ((j : ℝ) * theta)) 7 = mI := by rw [rotation_pow] have hangle : (7 : ℝ) * ((j : ℝ) * theta) = j * (2 * Real.pi) := by calc (7 : ℝ) * ((j : ℝ) * theta) = (j : ℝ) * ((7 : ℝ) * theta) := by ring _ = j * (2 * Real.pi) := by rw [seven_theta] change rotation ((7 : ℝ) * ((j : ℝ) * theta)) = mI rw [hangle] have hsin : Real.sin ((j : ℝ) * (2 * Real.pi)) = 0 := by convert Real.sin_nat_mul_pi (2 * j) using 1 push_cast ring ext <;> simp [rotation, mI, Real.cos_nat_mul_two_pi, hsin] /-! ## The SF.6--SF.10 four-block Fourier carrier -/ structure Fourier8 where root : Mat2 weight1 : Mat2 weight2 : Mat2 weight3 : Mat2 @[ext] theorem Fourier8.ext {x y : Fourier8} (h0 : x.root = y.root) (h1 : x.weight1 = y.weight1) (h2 : x.weight2 = y.weight2) (h3 : x.weight3 = y.weight3) : x = y := by cases x cases y simp_all def fI : Fourier8 := ⟨mI, mI, mI, mI⟩ def fmul (x y : Fourier8) : Fourier8 := ⟨mul x.root y.root, mul x.weight1 y.weight1, mul x.weight2 y.weight2, mul x.weight3 y.weight3⟩ def ftranspose (x : Fourier8) : Fourier8 := ⟨transpose x.root, transpose x.weight1, transpose x.weight2, transpose x.weight3⟩ def fneg (x : Fourier8) : Fourier8 := ⟨neg x.root, neg x.weight1, neg x.weight2, neg x.weight3⟩ def fpow : Fourier8 → Nat → Fourier8 | _, 0 => fI | x, n + 1 => fmul (fpow x n) x def rhoTau : Fourier8 := ⟨mI, rotation theta, rotation (2 * theta), rotation (3 * theta)⟩ def rhoTauInverse : Fourier8 := ⟨mI, rotation (-theta), rotation (-(2 * theta)), rotation (-(3 * theta))⟩ def etaHat : Fourier8 := ⟨mG, mI, mI, mI⟩ def cHat : Fourier8 := ⟨mC, mC, mC, mC⟩ def mirror : Fourier8 := ⟨mH, mD, mD, mD⟩ theorem mul_i (x : Mat2) : mul x mI = x := by ext <;> norm_num [mul, mI] theorem i_mul (x : Mat2) : mul mI x = x := by ext <;> norm_num [mul, mI] theorem rho_tau_pow_seven : fpow rhoTau 7 = fI := by apply Fourier8.ext · change pow mI 7 = mI norm_num [pow, mul, mI] · change pow (rotation theta) 7 = mI simpa using rotation_weight_pow_seven 1 · change pow (rotation (2 * theta)) 7 = mI exact rotation_weight_pow_seven 2 · change pow (rotation (3 * theta)) 7 = mI exact rotation_weight_pow_seven 3 theorem rho_tau_preserves_eta : fmul (ftranspose rhoTau) (fmul etaHat rhoTau) = etaHat := by apply Fourier8.ext · simp [fmul, ftranspose, rhoTau, etaHat, transpose, mul, mI, mG] · simpa [fmul, ftranspose, rhoTau, etaHat, i_mul] using rotation_transpose_mul theta · simpa [fmul, ftranspose, rhoTau, etaHat, i_mul] using rotation_transpose_mul (2 * theta) · simpa [fmul, ftranspose, rhoTau, etaHat, i_mul] using rotation_transpose_mul (3 * theta) theorem rho_tau_preserves_chat : fmul (ftranspose rhoTau) (fmul cHat rhoTau) = cHat := by apply Fourier8.ext · simp [fmul, ftranspose, rhoTau, cHat, transpose, mul, mI, mC] · simpa [fmul, ftranspose, rhoTau, cHat] using rotation_mul_c theta · simpa [fmul, ftranspose, rhoTau, cHat] using rotation_mul_c (2 * theta) · simpa [fmul, ftranspose, rhoTau, cHat] using rotation_mul_c (3 * theta) theorem rho_tau_inverse_right : fmul rhoTau rhoTauInverse = fI := by apply Fourier8.ext · norm_num [fmul, rhoTau, rhoTauInverse, fI, mI, mul] · simpa [fmul, rhoTau, rhoTauInverse, fI, rotation_zero] using rotation_mul theta (-theta) · simpa [fmul, rhoTau, rhoTauInverse, fI, rotation_zero] using rotation_mul (2 * theta) (-(2 * theta)) · simpa [fmul, rhoTau, rhoTauInverse, fI, rotation_zero] using rotation_mul (3 * theta) (-(3 * theta)) theorem mirror_preserves_eta : fmul (ftranspose mirror) (fmul etaHat mirror) = etaHat := by apply Fourier8.ext · simpa [fmul, ftranspose, mirror, etaHat] using h_transpose_g_h · simpa [fmul, ftranspose, mirror, etaHat] using d_transpose_d · simpa [fmul, ftranspose, mirror, etaHat] using d_transpose_d · simpa [fmul, ftranspose, mirror, etaHat] using d_transpose_d theorem mirror_reverses_chat : fmul (ftranspose mirror) (fmul cHat mirror) = fneg cHat := by apply Fourier8.ext · simpa [fmul, ftranspose, mirror, cHat, fneg, neg, mC] using h_transpose_c_h · simpa [fmul, ftranspose, mirror, cHat, fneg, neg, mC] using d_transpose_c_d · simpa [fmul, ftranspose, mirror, cHat, fneg, neg, mC] using d_transpose_c_d · simpa [fmul, ftranspose, mirror, cHat, fneg, neg, mC] using d_transpose_c_d theorem mirror_conjugates_rho_tau : fmul mirror (fmul rhoTau mirror) = rhoTauInverse := by apply Fourier8.ext · simpa [fmul, mirror, rhoTau, rhoTauInverse, i_mul] using h_square · simpa [fmul, mirror, rhoTau, rhoTauInverse] using d_rotation_d theta · simpa [fmul, mirror, rhoTau, rhoTauInverse] using d_rotation_d (2 * theta) · simpa [fmul, mirror, rhoTau, rhoTauInverse] using d_rotation_d (3 * theta) /-! ## S-01c.1 receipt: finite covariance, separate from SD.5 -/ def cyclicFourierCovariance : Prop := fpow rhoTau 7 = fI ∧ fmul (ftranspose rhoTau) (fmul etaHat rhoTau) = etaHat ∧ fmul (ftranspose rhoTau) (fmul cHat rhoTau) = cHat def mirrorFourierCovariance : Prop := fmul (ftranspose mirror) (fmul etaHat mirror) = etaHat ∧ fmul (ftranspose mirror) (fmul cHat mirror) = fneg cHat ∧ fmul mirror (fmul rhoTau mirror) = rhoTauInverse ∧ fmul rhoTau rhoTauInverse = fI theorem cyclicFourierCovariance_witness : cyclicFourierCovariance := by exact ⟨rho_tau_pow_seven, rho_tau_preserves_eta, rho_tau_preserves_chat⟩ theorem mirrorFourierCovariance_witness : mirrorFourierCovariance := by exact ⟨mirror_preserves_eta, mirror_reverses_chat, mirror_conjugates_rho_tau, rho_tau_inverse_right⟩ def covarianceSource011c : SourceRef := ⟨"Suture Field v0.1", "SF.6--SF.10 finite Fourier carrier; real block covariance formalized in SutureCovariance011c.lean"⟩ def euclideanSutureSignatureCovariant : SutureFieldSignature where finite := finiteRootSutureSignature spacetimeCarrier := SpaceTime tangentCarrier := Tangent internalCarrier := Internal metricCarrier := Metric fluxCarrier := Flux densityCarrier := Density coframe := rootCoframe metric := localMetric solderFlux := localFlux density := fun _ => 0 smoothManifold := euclideanManifold rankEightInternalBundle := trivialRankEightBundle smoothRankFourCoframe := smoothSplitCoframe inducedLorentzianMetric := localMetricAttachment inducedSolderFlux := localFluxAttachment cyclicCovariance := cyclicFourierCovariance mirrorFluxReversal := mirrorFourierCovariance regularSutureMap := True fieldDensity := True calibrationChi := True boundaryCompletion := True theorem covariantFiniteCompatibility : FiniteSignatureCompatibility euclideanSutureSignatureCovariant.finite finiteRootSutureSignature where etaHat := rfl cHat := rfl coframe := rfl def euclideanSutureWitnessCovariant : SutureSignatureWitness euclideanSutureSignatureCovariant where finiteBinding := covariantFiniteCompatibility manifoldState := .discharged (.consistencyFixed mathlibSource011c euclideanManifold_witness) bundleState := .discharged (.consistencyFixed localSmoothSource011c trivialRankEightBundle_witness) coframeState := .discharged (.consistencyFixed mathlibSource011c smoothSplitCoframe_witness) metricState := .discharged (.consistencyFixed localSmoothSource011c localMetricAttachment_witness) fluxState := .discharged (.consistencyFixed localSmoothSource011c localFluxAttachment_witness) cyclicState := .discharged (.consistencyFixed covarianceSource011c cyclicFourierCovariance_witness) mirrorState := .discharged (.consistencyFixed covarianceSource011c mirrorFourierCovariance_witness) regularityState := .unresolved .smoothCompletion densityState := .unresolved .fieldDensity calibrationState := .unresolved .coefficientSelection boundaryState := .unresolved .boundaryTerms #print axioms rho_tau_pow_seven #print axioms rho_tau_preserves_eta #print axioms rho_tau_preserves_chat #print axioms mirror_preserves_eta #print axioms mirror_reverses_chat #print axioms mirror_conjugates_rho_tau #print axioms cyclicFourierCovariance_witness #print axioms mirrorFourierCovariance_witness end end SutureCovariance011c