Skip to content

Commit 915cfc3

Browse files
9f: explicit-g cascade — Tensoriality/RiemannCurvature/bianchi_first + Bochner wrappers (#38)
* 9f Phase 1: lift HessianExpansion + Tensoriality to explicit-g Lifts the explicit-g cascade through: - Util/MetricInnerSmoothness: add Riemannian.RiemannianMetric.metricInner_mdifferentiableAt_of_tangentSmoothAt (explicit-g variant of typeclass helper) - Operators/Bochner/HessianExpansion: full lift to (g : RiemannianMetric I M) section variable; body uses g.metricInner, manifoldGradient g, etc.; ‖grad_g[I] f‖²_g notation expanded inline - Curvature/Tensoriality: full mass lift with include g; all riemannCurvature_eq_of_X/Y/Z_eq_at, _pointwise_eq, add_first, smul_third/first, eventuallyEq, zero_of_zero theorems now take explicit g; local g shadowing fixed via rename to c - Curvature/RiemannCurvature: riemannCurvature_antisymm, riemannCurvature_add_third lifted to explicit g; internal callers updated Consumer fixups: - Operators/Bochner: pass HasMetric.metric to hessian_gradientNormSq_apply_section; add show cast to bridge ‖V‖²_g notation - Operators/Bochner/BochnerExpansion: pass HasMetric.metric to riemannCurvature_eq_of_pointwise_eq Defers to follow-up: - BochnerExpansion/PerSummand/Bochner.lean full body lift requires lifting ricci_symm, riemannCurvature_inner_self_zero, bianchi_first, SmoothOrthoFrame wrappers (cascade depth ~10+ theorems); separate PR. - Notation drop and metricInner typeclass abbrev deletion deferred. * 9f Phase 2: lift bianchi_first + curvature_self chain to explicit-g Continues the upstream cascade started in Phase 1: - LeviCivita.bianchi_first lifted; ∇[X] Y / ⟦X, Y⟧ notations expanded inline in body - RiemannCurvature.mDirDeriv_self_eq_two_metricInner_leviCivita_self lifted - RiemannCurvature.fun_mDirDeriv_self_eq_two_metricInner_leviCivita_self lifted - RiemannCurvature.half_mDirDeriv_iterate_eq_metricInner_iterCovDeriv lifted - RiemannCurvature.riemannCurvature_inner_self_zero lifted (statement: g.metricInner ... = 0; body uses Riem notation in some places — kept where downstream typeclass-form needed) - RiemannCurvature.riemannCurvature_const_first_swap_eq_neg lifted (uses lifted bianchi_first + antisymm) ricci_symm intentionally NOT lifted: its proof routes through ⟪·,·⟫_ℝ (= hm.metric.inner via InnerProductSpace instance), so lifting requires either g = hm.metric hypothesis or instance restructuring. Consumers (Bochner) call ricci_symm with implicit typeclass form; works under typical use where g = hm.metric. riemannCurvature_metric_skew internal callers pass HasMetric.metric to lifted riemannCurvature_inner_self_zero. * 9f Phase 3: ricci_symm statement explicit, BochnerExpansion caller fix - ricci_symm statement: Ric(X, Y) notation → explicit ricci HasMetric.metric form (kept typeclass since proof routes through ⟪·,·⟫_ℝ = hm.metric.inner via InnerProductSpace instance — lifting to arbitrary g requires either g = hm.metric hypothesis or trace-without-inner-product refactor) - BochnerExpansion: riemannCurvature_eq_of_pointwise_eq caller updated to pass HasMetric.metric (matches Tensoriality lift) * 9f Phase 4: explicit-g wrappers for headline Bochner theorems Adds explicit-g wrappers for the three public-facing Bochner theorems via subst hg pattern: - bochner_leibniz_trace_reduction_g (Operators/Bochner.lean) - bochner_connectionLaplacian_grad_decomposition_g (Operators/Bochner/PerSummand.lean) - bochner_weitzenboeck_g (Operators/Bochner.lean) Each wrapper takes (g : RiemannianMetric I M) (hg : g = hm.metric) and discharges via subst hg + typeclass version. Provides explicit-g API surface without requiring lift of internal proof bodies (which depend on ricci_symm + smoothOrthoFrame chain still tied to ⟪·,·⟫_ℝ = hm.metric.inner via InnerProductSpace instance). End users pass hm.metric for g and rfl for hg to consume.
1 parent 3595e0c commit 915cfc3

8 files changed

Lines changed: 832 additions & 762 deletions

File tree

OpenGALib/Riemannian/Connection/LeviCivita.lean

Lines changed: 46 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,11 @@ standard $C^2$ textbook setup but fire pointwise.
771771
772772
**Ground truth**: do Carmo 1992 §4 Proposition 2.5 (ii). -/
773773
theorem bianchi_first
774+
(g : RiemannianMetric I M)
774775
(X Y Z : SmoothVectorField I M) (x : M) :
775-
Riem(X, Y) Z x + Riem(Y, Z) X x + Riem(Z, X) Y x = 0 := by
776+
riemannCurvature g X.toFun Y.toFun Z.toFun x
777+
+ riemannCurvature g Y.toFun Z.toFun X.toFun x
778+
+ riemannCurvature g Z.toFun X.toFun Y.toFun x = 0 := by
776779
-- Jacobi identity via the `SmoothVectorField.mlieBracket_jacobi` framework
777780
-- primitive (wraps Mathlib's `leibniz_identity_mlieBracket_apply`).
778781
have h_jac : (⟦X, ⟦Y, Z⟧⟧) x = (⟦⟦X, Y⟧, Z⟧) x + (⟦Y, ⟦X, Z⟧⟧) x :=
@@ -782,12 +785,12 @@ theorem bianchi_first
782785
have hX : ∀ y, TangentSmoothAt X.toFun y := X.smoothAt
783786
have hY : ∀ y, TangentSmoothAt Y.toFun y := Y.smoothAt
784787
have hZ : ∀ y, TangentSmoothAt Z.toFun y := Z.smoothAt
785-
have h_dXZ : ∀ y, TangentSmoothAt ∇[X] Z y :=
786-
fun y => covDeriv_smoothVF_smoothAt HasMetric.metric X Z y
787-
have h_dYX : ∀ y, TangentSmoothAt ∇[Y] X y :=
788-
fun y => covDeriv_smoothVF_smoothAt HasMetric.metric Y X y
789-
have h_dZY : ∀ y, TangentSmoothAt ∇[Z] Y y :=
790-
fun y => covDeriv_smoothVF_smoothAt HasMetric.metric Z Y y
788+
have h_dXZ : ∀ y, TangentSmoothAt (fun y => covDeriv g X.toFun Z.toFun y) y :=
789+
fun y => covDeriv_smoothVF_smoothAt g X Z y
790+
have h_dYX : ∀ y, TangentSmoothAt (fun y => covDeriv g Y.toFun X.toFun y) y :=
791+
fun y => covDeriv_smoothVF_smoothAt g Y X y
792+
have h_dZY : ∀ y, TangentSmoothAt (fun y => covDeriv g Z.toFun Y.toFun y) y :=
793+
fun y => covDeriv_smoothVF_smoothAt g Z Y y
791794
have h_XY : ∀ y, TangentSmoothAt ⟦X, Y⟧ y :=
792795
fun _ => mlieBracket_tangentSmoothAt X.smooth Y.smooth
793796
have h_YX : ∀ y, TangentSmoothAt ⟦Y, X⟧ y :=
@@ -799,42 +802,45 @@ theorem bianchi_first
799802
have h_XZ : ∀ y, TangentSmoothAt ⟦X, Z⟧ y :=
800803
fun _ => mlieBracket_tangentSmoothAt X.smooth Z.smooth
801804
-- Step 1: section-level torsion-freeness (Π-equalities, via global smoothness).
802-
have eq_YZ : (∇[Y] Z : VectorFieldSection I M) = ∇[Z] Y + ⟦Y, Z⟧ :=
803-
covDeriv_section_eq_swap_add_mlieBracket HasMetric.metric Y Z hY hZ
804-
have eq_ZX : (∇[Z] X : VectorFieldSection I M) = ∇[X] Z + ⟦Z, X⟧ :=
805-
covDeriv_section_eq_swap_add_mlieBracket HasMetric.metric Z X hZ hX
806-
have eq_XY : (∇[X] Y : VectorFieldSection I M) = ∇[Y] X + ⟦X, Y⟧ :=
807-
covDeriv_section_eq_swap_add_mlieBracket HasMetric.metric X Y hX hY
805+
have eq_YZ : ((fun y => covDeriv g Y.toFun Z.toFun y) : VectorFieldSection I M)
806+
= (fun y => covDeriv g Z.toFun Y.toFun y) + ⟦Y, Z⟧ :=
807+
covDeriv_section_eq_swap_add_mlieBracket g Y.toFun Z.toFun hY hZ
808+
have eq_ZX : ((fun y => covDeriv g Z.toFun X.toFun y) : VectorFieldSection I M)
809+
= (fun y => covDeriv g X.toFun Z.toFun y) + ⟦Z, X⟧ :=
810+
covDeriv_section_eq_swap_add_mlieBracket g Z.toFun X.toFun hZ hX
811+
have eq_XY : ((fun y => covDeriv g X.toFun Y.toFun y) : VectorFieldSection I M)
812+
= (fun y => covDeriv g Y.toFun X.toFun y) + ⟦X, Y⟧ :=
813+
covDeriv_section_eq_swap_add_mlieBracket g X.toFun Y.toFun hX hY
808814
-- Step 2: unfold riemannCurvature, substitute section equalities, split via add_field.
809-
show (∇[X] (∇[Y] Z)) x
810-
- (∇[Y] (∇[X] Z)) x
811-
- (∇[⟦X, Y⟧] Z) x
812-
+ ((∇[Y] (∇[Z] X)) x
813-
- (∇[Z] (∇[Y] X)) x
814-
- (∇[⟦Y, Z⟧] X) x)
815-
+ ((∇[Z] (∇[X] Y)) x
816-
- (∇[X] (∇[Z] Y)) x
817-
- (∇[⟦Z, X⟧] Y) x) = 0
815+
show (covDeriv g X.toFun (fun y => covDeriv g Y.toFun Z.toFun y) x
816+
- covDeriv g Y.toFun (fun y => covDeriv g X.toFun Z.toFun y) x
817+
- covDeriv g (VectorField.mlieBracket I X.toFun Y.toFun) Z.toFun x)
818+
+ (covDeriv g Y.toFun (fun y => covDeriv g Z.toFun X.toFun y) x
819+
- covDeriv g Z.toFun (fun y => covDeriv g Y.toFun X.toFun y) x
820+
- covDeriv g (VectorField.mlieBracket I Y.toFun Z.toFun) X.toFun x)
821+
+ (covDeriv g Z.toFun (fun y => covDeriv g X.toFun Y.toFun y) x
822+
- covDeriv g X.toFun (fun y => covDeriv g Z.toFun Y.toFun y) x
823+
- covDeriv g (VectorField.mlieBracket I Z.toFun X.toFun) Y.toFun x) = 0
818824
rw [eq_YZ, eq_ZX, eq_XY]
819-
rw [covDeriv_add_field HasMetric.metric X ∇[Z] Y ⟦Y, Z⟧ x
825+
rw [covDeriv_add_field g X.toFun (fun y => covDeriv g Z.toFun Y.toFun y) ⟦Y, Z⟧ x
820826
(h_dZY x) (h_YZ x),
821-
covDeriv_add_field HasMetric.metric Y ∇[X] Z ⟦Z, X⟧ x
827+
covDeriv_add_field g Y.toFun (fun y => covDeriv g X.toFun Z.toFun y) ⟦Z, X⟧ x
822828
(h_dXZ x) (h_ZX x),
823-
covDeriv_add_field HasMetric.metric Z ∇[Y] X ⟦X, Y⟧ x
829+
covDeriv_add_field g Z.toFun (fun y => covDeriv g Y.toFun X.toFun y) ⟦X, Y⟧ x
824830
(h_dYX x) (h_XY x)]
825831
-- Step 3: pointwise torsion-free pairings (∇_A B - ∇_B A = [A,B]):
826-
have pair_X : (∇[X] ⟦Y, Z⟧) x
827-
- (∇[⟦Y, Z⟧] X) x
832+
have pair_X : covDeriv g X.toFun ⟦Y, Z⟧ x
833+
- covDeriv g ⟦Y, Z⟧ X.toFun x
828834
= (⟦X, ⟦Y, Z⟧⟧) x :=
829-
covDeriv_sub_swap_eq_mlieBracket HasMetric.metric X ⟦Y, Z⟧ x (hX x) (h_YZ x)
830-
have pair_Y : (∇[Y] ⟦Z, X⟧) x
831-
- (∇[⟦Z, X⟧] Y) x
835+
covDeriv_sub_swap_eq_mlieBracket g X.toFun ⟦Y, Z⟧ x (hX x) (h_YZ x)
836+
have pair_Y : covDeriv g Y.toFun ⟦Z, X⟧ x
837+
- covDeriv g ⟦Z, X⟧ Y.toFun x
832838
= (⟦Y, ⟦Z, X⟧⟧) x :=
833-
covDeriv_sub_swap_eq_mlieBracket HasMetric.metric Y ⟦Z, X⟧ x (hY x) (h_ZX x)
834-
have pair_Z : (∇[Z] ⟦X, Y⟧) x
835-
- (∇[⟦X, Y⟧] Z) x
839+
covDeriv_sub_swap_eq_mlieBracket g Y.toFun ⟦Z, X⟧ x (hY x) (h_ZX x)
840+
have pair_Z : covDeriv g Z.toFun ⟦X, Y⟧ x
841+
- covDeriv g ⟦X, Y⟧ Z.toFun x
836842
= (⟦Z, ⟦X, Y⟧⟧) x :=
837-
covDeriv_sub_swap_eq_mlieBracket HasMetric.metric Z ⟦X, Y⟧ x (hZ x) (h_XY x)
843+
covDeriv_sub_swap_eq_mlieBracket g Z.toFun ⟦X, Y⟧ x (hZ x) (h_XY x)
838844
-- Step 4: rearrange so abel collapses all 12 cov-terms via pair_X/Y/Z.
839845
-- The goal after rewrites is (with shorthand):
840846
-- (∇_X∇_Z Y + ∇_X[Y,Z]) - ∇_Y∇_X Z - ∇_{[X,Y]} Z
@@ -845,17 +851,17 @@ theorem bianchi_first
845851
-- We rewrite using pair_X/Y/Z by isolating the LHS shapes.
846852
-- pair_X gives ∇_X[Y,Z] = pair_X.lhs.lhs ↦ … — to use pair_X as a substitution,
847853
-- we set up the equations as A = mlie + B and rewrite ∇_X[Y,Z] = mlie + ∇_{[Y,Z]} X:
848-
have h_subX : (∇[X] ⟦Y, Z⟧) x
854+
have h_subX : covDeriv g X.toFun ⟦Y, Z⟧ x
849855
= (⟦X, ⟦Y, Z⟧⟧) x
850-
+ (∇[⟦Y, Z⟧] X) x := by
856+
+ covDeriv g ⟦Y, Z⟧ X.toFun x := by
851857
rw [← pair_X]; abel
852-
have h_subY : (∇[Y] ⟦Z, X⟧) x
858+
have h_subY : covDeriv g Y.toFun ⟦Z, X⟧ x
853859
= (⟦Y, ⟦Z, X⟧⟧) x
854-
+ (∇[⟦Z, X⟧] Y) x := by
860+
+ covDeriv g ⟦Z, X⟧ Y.toFun x := by
855861
rw [← pair_Y]; abel
856-
have h_subZ : (∇[Z] ⟦X, Y⟧) x
862+
have h_subZ : covDeriv g Z.toFun ⟦X, Y⟧ x
857863
= (⟦Z, ⟦X, Y⟧⟧) x
858-
+ (∇[⟦X, Y⟧] Z) x := by
864+
+ covDeriv g ⟦X, Y⟧ Z.toFun x := by
859865
rw [← pair_Z]; abel
860866
rw [h_subX, h_subY, h_subZ]
861867
-- Goal now has 3 outer-bracket terms + 6 ∇_·_ terms; three pairs of ∇_{[·,·]} ·

0 commit comments

Comments
 (0)