Skip to content

9f: explicit-g cascade — Tensoriality/RiemannCurvature/bianchi_first + Bochner wrappers#38

Merged
Xinze-Li-Moqian merged 4 commits into
mainfrom
refactor/explicit-g-9f
May 18, 2026
Merged

9f: explicit-g cascade — Tensoriality/RiemannCurvature/bianchi_first + Bochner wrappers#38
Xinze-Li-Moqian merged 4 commits into
mainfrom
refactor/explicit-g-9f

Conversation

@Xinze-Li-Moqian
Copy link
Copy Markdown
Contributor

Summary

9f sub-task of umbrella #9 (explicit-g cascade). Lifts upstream curvature/connection theorems and provides explicit-g headline wrappers for the Bochner stack. 4 phases, full build green.

Phase 1 (3b7ab95) — HessianExpansion + Tensoriality + 2 RiemannCurvature

  • Util/MetricInnerSmoothness.lean: add explicit-g metricInner_mdifferentiableAt_of_tangentSmoothAt in Riemannian.RiemannianMetric namespace
  • Operators/Bochner/HessianExpansion.lean: 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.lean: full mass lift with include g (12 theorems); local g shadow renamed to c
  • Curvature/RiemannCurvature.lean: riemannCurvature_antisymm, riemannCurvature_add_third lifted; internal callers pass HasMetric.metric for downstream typeclass paths

Phase 2 (33e7c12) — bianchi_first + curvature self-zero chain

  • Connection/LeviCivita.lean: bianchi_first lifted; ∇[...] / ⟦·,·⟧ notations expanded
  • Curvature/RiemannCurvature.lean: 5 more theorems lifted (mDirDeriv_self_eq_two_metricInner_leviCivita_self, fun_*, half_mDirDeriv_iterate_*, riemannCurvature_inner_self_zero, riemannCurvature_const_first_swap_eq_neg)

Phase 3 (73922df) — ricci_symm statement explicit + Bochner caller

  • ricci_symm statement converted from Ric(X, Y) notation to explicit ricci HasMetric.metric form (kept typeclass since proof routes through ⟪·,·⟫_ℝ = hm.metric.inner via InnerProductSpace instance — full lift requires either g = hm.metric hypothesis or trace-without-inner refactor)
  • BochnerExpansion: riemannCurvature_eq_of_pointwise_eq caller updated to pass HasMetric.metric (matches Tensoriality lift)

Phase 4 (9dd2383) — explicit-g wrappers for Bochner headlines

Adds three explicit-g wrappers via subst hg pattern:

  • bochner_leibniz_trace_reduction_g
  • bochner_connectionLaplacian_grad_decomposition_g
  • bochner_weitzenboeck_g

Each takes (g : RiemannianMetric I M) (hg : g = hm.metric) and discharges via subst hg + typeclass version. End users call as bochner_weitzenboeck_g hm.metric rfl f hf x.

Stats

8 files, +832 / -762 lines, ~20 upstream theorems lifted in place, 3 explicit-g wrappers added.

Deferred (separate PR)

Internal Bochner stack body lift (BochnerExpansion.lean / PerSummand.lean / bochner_leibniz_trace_reduction body) requires lifting ricci_symm + SmoothOrthoFrame wrappers, which depend on ⟪·,·⟫_ℝ (InnerProductSpace instance from hm.metric). Two paths:

  1. Add (hg : g = hm.metric) hypothesis throughout (uniform but invasive)
  2. Restructure trace identification to avoid LinearMap.trace_eq_sum_inner (deeper refactor)

For now, public API is g-parametric through the Phase 4 wrappers; internal proofs stay typeclass-bound.

Test plan

  • lake build clean (3668 jobs)
  • CI green
  • Sorry / shake / MathTag / Naming baselines unchanged

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.
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.
- 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)
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant