Skip to content

9k: eliminate _g wrappers — Bochner stack fully explicit-g#47

Merged
Xinze-Li-Moqian merged 2 commits into
mainfrom
refactor/9k-eliminate-_g-wrappers
May 19, 2026
Merged

9k: eliminate _g wrappers — Bochner stack fully explicit-g#47
Xinze-Li-Moqian merged 2 commits into
mainfrom
refactor/9k-eliminate-_g-wrappers

Conversation

@Xinze-Li-Moqian
Copy link
Copy Markdown
Contributor

Summary

  • Lift the 2 Bochner anchor theorems (bochner_leibniz_trace_reduction, bochner_weitzenboeck) to take explicit (g : RiemannianMetric I M) (hg : g = hm.metric); insert subst hg at body start.
  • Delete the 3 remaining _g wrappers (bochner_leibniz_trace_reduction_g, bochner_weitzenboeck_g, bochner_connectionLaplacian_grad_decomposition_g) — the explicit-g forms are now primary.
  • Drive-by: connectionLaplacian def body now uses smoothOrthoFrame g (was smoothOrthoFrame hm.metric) for consistency with the section var g.
  • Drive-by: tangentHyperplane_at_reducedBoundary_orthogonal (sorry-bearing pre-paper axiom) statement lifted from HasMetric.metric.metricInner to explicit g.

After this PR, zero _g-suffixed declarations remain across OpenGALib. The explicit-g cascade (umbrella #9) is fully concluded for the active proof surface; remaining HasMetric.metric references in statement types are limited to (a) IsStationary/IsStable/IsUnstable (architectural quantified-Prop choice) and (b) SmoothOrthoFrame lemmas tightly coupled to the typeclass metric.

Test plan

  • lake build OpenGALib.Riemannian.Operators.Bochner clean (2903/2903)
  • Full lake build OpenGALib clean (no new errors, only pre-existing sorry warnings)
  • Sorry count unchanged: 36 (matches docs/SORRY_CATALOG.md)
  • No new linter / shake regressions expected

* Lift `bochner_leibniz_trace_reduction` and `bochner_weitzenboeck` in
  `Operators/Bochner.lean` to take `(g : RiemannianMetric I M)
  (hg : g = hm.metric)`; insert `subst hg` at body start. Existing
  proof bodies untouched.
* Delete `bochner_leibniz_trace_reduction_g`, `bochner_weitzenboeck_g`,
  `bochner_connectionLaplacian_grad_decomposition_g` — the explicit-g
  forms are now the primary theorems.
* `connectionLaplacian` def body: replace `smoothOrthoFrame hm.metric`
  with `smoothOrthoFrame g` so the orthoframe is consistent with the
  section variable `g`.
* `tangentHyperplane_at_reducedBoundary_orthogonal` (sorry-bearing pre-
  paper axiom): lift statement from `HasMetric.metric.metricInner` to
  explicit `(g : RiemannianMetric I M)`.

After this PR, zero `_g`-suffixed declarations remain across OpenGALib.
Sorry / linter / shake baselines unchanged.
The `@[simp] rfl` lemma `connectionLaplacian_def` in
`Util/ConnectionLaplacianSimp.lean` had a stale RHS still spelling
`smoothOrthoFrame hm.metric` after the def body in
`Operators/ConnectionLaplacian.lean` was unified to `smoothOrthoFrame g`.
Local incremental build re-used the cached olean so the rfl mismatch only
surfaced in fresh-elaboration CI. Update RHS to `g` so def-eq holds.
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