Skip to content

Tide: generic algebra for gibbsExpectation and gibbsCov#19

Merged
dmurfet merged 2 commits into
mainfrom
tide/gibbscov-algebra
May 7, 2026
Merged

Tide: generic algebra for gibbsExpectation and gibbsCov#19
dmurfet merged 2 commits into
mainfrom
tide/gibbscov-algebra

Conversation

@dmurfet

@dmurfet dmurfet commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds 11 algebra lemmas in parallel to Laplace/Gibbs.lean (1D) and Laplace/Multi/Basic.lean (multi): gibbsExpectation_smul/zero/add/const (multi-side _const newly added; 1D pre-existing) and gibbsCov_symm/smul_left/smul_right/const_left/const_right/add_left/add_right/zero_left/zero_right.
  • gibbsCov_const_* is unconditional via a Z = 0 case-split — no hZ hypothesis at consumer sites. Only gibbsCov_add_* carry Integrable hypotheses (four each, on the pre-divided weighted observables).
  • Strategic infrastructure recommended at the Tide 12 deliberation. Both Claude and GPT-5.5 Pro voted Candidate B (mirror across both base files); GPT's unconditional-const strengthening was taken.
  • Unblocks the deferred I3 (affine-bilinear corollary), C1 (harmonic-affine κ₃), G2 (anharmonic-affine κ₃), and the cleanup pass on Quartic.lean / TwoD/PureQuartic.lean / TwoD/SemiDegenerate.lean / TwoD/AddSeparable.lean.

245 lines of Lean (commit 41a7b41); 321-line LaTeX retrospective (commit b844d7a). Single session, zero sorry, zero axiom, zero native_decide. Full lake build clean.

Tide log: sri/projects/primer/tide-log/2026-05-07-tide-gibbscov-algebra.md
GPT consult: sri/projects/primer/tide-log/gpt55_tide_gibbscov_algebra_v1.md
Retrospective: retrospectives/2026-05-07-tide-gibbscov-algebra.tex

Test plan

  • lake build clean
  • scripts/sorries clean (0 sorry, 0 #exit, 0 native_decide, 0 axiom)
  • CI (lean_action_ci) green

🤖 Generated with Claude Code

dmurfet and others added 2 commits May 6, 2026 19:33
Add the algebraic infrastructure for `gibbsCov` so that affine/multilinear
strict-improvements (e.g. C1 harmonic-affine, G2 anharmonic-affine, the
deferred I3 affine-covariance template from Tide 12) become near-trivial.

Lemmas added in parallel to `Laplace/Gibbs.lean` (1D, scalar) and
`Laplace/Multi/Basic.lean` (multi, `(ι → ℝ)`):

Expectation level:
- `gibbsExpectation_smul` (no hypotheses)
- `gibbsExpectation_zero` (no hypotheses)
- `gibbsExpectation_add` (Integrable hypotheses)
- `gibbsExpectation_const` for the multi side (1D version pre-existing)

Covariance level:
- `gibbsCov_symm` (no hypotheses)
- `gibbsCov_smul_left/right` (no hypotheses)
- `gibbsCov_const_left/right` (unconditional via Z=0 case-split)
- `gibbsCov_add_left/right` (Integrable hypotheses)
- `gibbsCov_zero_left/right` simp corollaries

`gibbsCov_const_*` is unconditional because when `Z(t) = 0` every
expectation collapses to `0` via the `_/0 = 0` convention; otherwise the
proof routes through `gibbsExpectation_const`.

Both Claude and GPT-5.5 Pro voted Candidate B (algebra mirrored across
both base files) over Candidate A (1D only) and Candidate C (B + the
affine-bilinear corollary, which belongs in I3). Direct `Integrable`
hypotheses, no `GibbsIntegrable` typeclass, no `LinearMap` refactor.

Tide log: `projects/primer/tide-log/2026-05-07-tide-gibbscov-algebra.md`
GPT consult: `projects/primer/tide-log/gpt55_tide_gibbscov_algebra_v1.md`

🌊 Generated with the [Tide skill](https://github.com/timaeus-research/sri/blob/main/.claude/skills/tide/SKILL.md)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Single-session infrastructure tide. 245 lines added across
Laplace/Gibbs.lean (1D) and Laplace/Multi/Basic.lean (multi); 11
lemmas per side covering gibbsExpectation_smul/zero/add (1D const
pre-existing, multi const newly added) and the seven covariance
lemmas (gibbsCov_symm/const/smul/add, both slots) plus zero-corollary
simp lemmas. Hypothesis economy: only gibbsCov_add_left/right need
Integrable hypotheses (four each, on the pre-divided weighted
observables); gibbsCov_const_left/right is unconditional via a Z=0
case-split. Retrospective records the deliberation (Claude+GPT both
voted Candidate B, mirror across both base files), the unconditional-
const strengthening GPT recommended, and the four follow-up tides
this unblocks (I3 affine-bilinear, C1/G2 affine kappa3 strict-
improvements, the cleanup pass on existing affine-cov proofs).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dmurfet dmurfet merged commit b844d7a into main May 7, 2026
0 of 2 checks passed
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