Skip to content

9i: lift Bochner stack (BochnerExpansion + PerSummand) to explicit g via subst hg#44

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

9i: lift Bochner stack (BochnerExpansion + PerSummand) to explicit g via subst hg#44
Xinze-Li-Moqian merged 6 commits into
mainfrom
refactor/explicit-g-9i

Conversation

@Xinze-Li-Moqian
Copy link
Copy Markdown
Contributor

Summary

9i — lift the remaining Bochner stack (BochnerExpansion.lean + PerSummand.lean) to explicit (g : RiemannianMetric I M) parameters using the subst hg pattern introduced for ricci_symm in 9h.

Pattern

Each Bochner file now has section variable

[hm : HasMetric I M]
(g : RiemannianMetric I M) (hg : g = hm.metric)

include g hg

Every public theorem signature uses g.X (g-parametric API). Each proof body starts with subst hg, then the existing typeclass-form proof closes the (now hm.metric-form) goal.

Files

  • BochnerExpansion.lean: 11 theorems lifted (ricciTensor_eq_sum_inner_orthonormal, metricInner_secondCovDerivAt_grad_swap_of_hess_eventual_sym, hessianBilin_eventually_symm_of_strict_interior, hessianBilin_section_eventually_symm_of_strict_interior, metricInner_secondCovDerivAt_grad_eq_swap_add_curvature, heart_of_bochner_curvature_term, heart_curvature_orthonormal_sum_eq_ricci, sum_hessianBilin_smoothOrthoFrame_eventuallyEq_laplacian, smoothOrthoFrame_cov_skew, sum_hessianBilin_smoothOrthoFrame_cov_eq_zero, sum_inner_secondCovDerivAt_grad_smoothOrthoFrame_of_inner_form)

  • PerSummand.lean: 4 theorems lifted (bochner_per_summand_swap, bochner_per_summand_riemann_form, bochner_per_summand_assembled, bochner_connectionLaplacian_grad_decomposition)

  • Bochner.lean: bochner_weitzenboeck caller updated to pass HasMetric.metric rfl to lifted bochner_connectionLaplacian_grad_decomposition.

Why subst hg (not full g-parametric body)

Bochner proofs route through LinearMap.trace_eq_sum_inner over ⟪·,·⟫_ℝ (= hm.metric.inner via InnerProductSpace instance from [HasMetric I M]). Without restructuring InnerProductSpace, full body lift requires g = hm.metric to bridge g.Xhm.metric.X. subst hg does this bridging at proof start — body works in typeclass form, statement exposes g.

End users invoke with HasMetric.metric and rfl for g and hg (typical case where the metric is the ambient typeclass metric).

Test plan

  • lake build clean
  • CI green
  • Sorry / shake / MathTag baselines unchanged

…ure) to explicit g

- IsKilling predicate now takes (g : RiemannianMetric I M)
- IsKilling.second_covDeriv_inner_skew lifted; local scalar var g renamed to kw_g to avoid shadowing the section g
- second_covDeriv_commutator lifted
- IsKilling.second_covDeriv_eq_curvature lifted

All HasMetric.metric body refs replaced with g; metricInner abbrev calls with g.metricInner; metricInner_X lemma calls with g.metricInner_X. Internal callers within RiemannCurvature.lean updated to pass g.
The proof routes through ⟪·,·⟫_ℝ = hm.metric.inner via the InnerProductSpace
instance derived from [HasMetric I M], so ricci_symm cannot be lifted for
arbitrary g without InnerProductSpace restructure. Use subst hg pattern:
caller passes g and proof of g = hm.metric, body works in hm.metric form.

BochnerExpansion caller updated to pass (HasMetric.metric, rfl).

RiemannCurvature.lean is now fully explicit-g for all theorems with at most
this trivial hg sidecar.
- Section variable adds (g : RiemannianMetric I M) (hg : g = hm.metric) + include g hg
- Each theorem signature uses g.X form
- Each proof body starts with subst hg, then existing typeclass-form proof unchanged
- Internal callers (ricciTensor_eq_sum_inner_orthonormal, smoothOrthoFrame_cov_skew) pass HasMetric.metric rfl
- PerSummand callers updated to pass HasMetric.metric rfl

Bochner stack body retains typeclass-bound infrastructure (smoothOrthoFrame
+ LinearMap.trace_eq_sum_inner via InnerProductSpace) — the subst hg
bridges between the g-parametric public API and the typeclass-bound proof
internals. Caller passes g = hm.metric and rfl to consume.
Same approach as BochnerExpansion: (g, hg : g = hm.metric) section variable
+ include g hg + subst hg at proof body start. Statement uses g.X; body
unchanged (typeclass form). Internal callers within PerSummand pass
HasMetric.metric rfl (since after subst hg, g and hg are gone from context).

Bochner.lean's bochner_weitzenboeck now passes HasMetric.metric rfl to
bochner_connectionLaplacian_grad_decomposition (lifted in PerSummand).

Fixed h_id_LCQW/_LCBW statements: HasMetric.metric.metricInner (dot form)
to match goal after subst hg.
@Xinze-Li-Moqian Xinze-Li-Moqian merged commit 6952f77 into main May 18, 2026
2 checks passed
@Xinze-Li-Moqian Xinze-Li-Moqian deleted the refactor/explicit-g-9i branch May 18, 2026 23:46
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