Skip to content

refactor: drop unused triple_ratio_bundle variants in FreeEnergyRatios - #4672

Merged
phasetr merged 3 commits into
mainfrom
refactor/drop-freeenergyratios-triple-bundles
Jul 23, 2026
Merged

refactor: drop unused triple_ratio_bundle variants in FreeEnergyRatios#4672
phasetr merged 3 commits into
mainfrom
refactor/drop-freeenergyratios-triple-bundles

Conversation

@phasetr

@phasetr phasetr commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Per the #4639 adoption rule.

Summary

Delete seven zero-consumer, reference-0 wrapper theorems from
IsingModel/Conditioning/HighTempClosed/FreeEnergyRatios.lean — pure
_beta_zero / _ferromagnetic re-bundlings of the four published base bundles,
with no consumer anywhere in the library, docs, or tex:

  1. freeEnergy_high_temp_h_zero_ratio_sandwich_bundle_ferromagnetic
  2. partitionFunction_high_temp_expansion_h_zero_triple_ratio_sandwich_bundle_beta_zero
  3. partitionFunction_high_temp_expansion_h_zero_triple_ratio_sandwich_bundle_ferromagnetic
  4. partitionFunction_high_temp_expansion_h_zero_triple_ratio_sandwich_bundle_beta_zero_ferromagnetic
  5. partitionFunction_high_temp_expansion_h_zero_triple_ratio_bound_bundle_beta_zero
  6. partitionFunction_high_temp_expansion_h_zero_triple_ratio_bound_bundle_ferromagnetic
  7. partitionFunction_high_temp_expansion_h_zero_triple_ratio_bound_bundle_beta_zero_ferromagnetic

Protected base bundles (untouched, docs:2127 verbatim citations):
freeEnergy_high_temp_h_zero_ratio_sandwich_bundle,
partitionFunction_high_temp_expansion_h_zero_triple_ratio_sandwich_bundle,
partitionFunction_high_temp_expansion_h_zero_triple_ratio_bound_bundle,
partitionFunction_high_temp_expansion_h_zero_strict_deviation_bundle.
Every sibling layer (Lambda / AlongExhaustion / latticeGraph) is untouched;
proof power is unchanged.

Same-commit bookkeeping (permanent fix for stale-reference recurrence)

Verification

  • lake build (FreeEnergyRatios + HighTempClosed importer): PASS, zero warnings.
  • audit_gate.py --full: V1-V4 PASS. --self-test: 166 OK.
  • dead_candidate_scan.py --self-test: 79 OK (after fixture recalibration).
  • lake exe GKSTest: PASS.
  • git grep: the 7 deleted names are absent from IsingModel/, docs/, tex/;
    the 4 base bundles remain intact.

Fixture recalibration (breakdown invariant, only SAFE+total+zero-consumer drop by 5)

The 5 deleted decls ending in _ferromagnetic (#1,#3,#4,#6,#7) are the only ones
in the _ferromagnetic calibration family; #2 and #5 (plain _beta_zero) are
outside it.

ferromagnetic family: total 236 (was 241)
  safe-to-delete:  105 (was 110)   <- drops by 5
  uncertain:        44 (invariant)
  load-bearing:     52 (invariant)
  published-result: 35 (invariant)
  zero-consumer:   123 (was 128)   <- drops by 5

Healthy signature: only SAFE + total + zero-consumer drop by exactly 5; the other
three classes are invariant, so no live lemma was reclassified (#4655).

Post-deletion cascade check (base 4, textual)

-- published-result: 4 --
  freeEnergy_high_temp_h_zero_ratio_sandwich_bundle
      reason: cited verbatim in the public documentation
      cross-file consumer: IsingModel/AmbientLattice/Defs/HighTempPartition/Ratios.lean:243
  partitionFunction_high_temp_expansion_h_zero_strict_deviation_bundle
      reason: cited verbatim in the public documentation
  partitionFunction_high_temp_expansion_h_zero_triple_ratio_bound_bundle
      reason: cited verbatim in the public documentation
  partitionFunction_high_temp_expansion_h_zero_triple_ratio_sandwich_bundle
      reason: cited verbatim in the public documentation
-- load-bearing: 0 --
-- uncertain: 0 --
-- safe-to-delete: 0 --
-- cascade (informational, never auto-deleted): 0 --

Post-deletion cascade check (base 4, --lean build-backed)

--lean cross-check: 4 candidate(s) compared against the elaborated graph;
  no consumer seen by Lean was missed on a safe-to-delete verdict
-- published-result: 4 --
-- load-bearing: 0 --
-- uncertain: 0 --
-- safe-to-delete: 0 --
-- cascade (informational, never auto-deleted): 0 --

Cascade is zero: no base decl became reference-0.

LIMITS banner (scanner)

LIMITS: this scan is textual. It cannot see simp/aesop set usage, tactic-generated
references, open/export-shortened names, or metaprogrammed names. It does not check
autoImplicit binder drift (a `#check @` dump is a separate gate). Doc rows that depend
on a lemma without naming it are invisible. Run with --lean on a green build to
cross-check the elaborated dependency graph; run --explain for the full table.
A "safe-to-delete" verdict is a necessary, not a sufficient, condition for deletion.

🤖 Generated with Claude Code

…s (WIP scaffold)

This is a placeholder commit for PR #4672 scaffold. Implementation and full
verification will follow in subsequent commits on this branch.
@phasetr
phasetr force-pushed the refactor/drop-freeenergyratios-triple-bundles branch from 207573f to 1fbd02e Compare July 23, 2026 02:04
phasetr and others added 2 commits July 23, 2026 11:22
…n FreeEnergyRatios

Remove seven zero-consumer, reference-0 wrapper theorems from
`IsingModel/Conditioning/HighTempClosed/FreeEnergyRatios.lean`:
- `freeEnergy_high_temp_h_zero_ratio_sandwich_bundle_ferromagnetic`
- `partitionFunction_high_temp_expansion_h_zero_triple_ratio_sandwich_bundle_beta_zero`
- `partitionFunction_high_temp_expansion_h_zero_triple_ratio_sandwich_bundle_ferromagnetic`
- `partitionFunction_high_temp_expansion_h_zero_triple_ratio_sandwich_bundle_beta_zero_ferromagnetic`
- `partitionFunction_high_temp_expansion_h_zero_triple_ratio_bound_bundle_beta_zero`
- `partitionFunction_high_temp_expansion_h_zero_triple_ratio_bound_bundle_ferromagnetic`
- `partitionFunction_high_temp_expansion_h_zero_triple_ratio_bound_bundle_beta_zero_ferromagnetic`

These are pure `_beta_zero` / `_ferromagnetic` re-bundlings of the four
published base bundles, with no consumer anywhere in the library, docs, or
tex. The four base bundles (`_triple_ratio_sandwich_bundle`,
`_triple_ratio_bound_bundle`, `_strict_deviation_bundle`,
`freeEnergy_..._ratio_sandwich_bundle`) and every sibling layer
(Lambda / AlongExhaustion / latticeGraph) are untouched; proof power is
unchanged.

Same-commit bookkeeping:
- reconcile the docs/index.md §18.3 abstract-layer prose that enumerated the
  now-deleted `_beta_zero` / `_ferromagnetic` variants (5-layer -> 4-layer
  count for the beta=0 triple sandwich bundle);
- recalibrate the `_ferromagnetic` family fixtures in
  `scripts/test_dead_candidate_scan.py` (241 -> 236, safe 110 -> 105,
  zero-consumer 128 -> 123; uncertain / load-bearing / published invariant).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The §18.3 note claimed the β=0 ferromagnetic triple_ratio_sandwich_bundle
exists 'at all 4 layers'. Grep of the current tree shows only 3 layer
variants survive: along-ex (`partitionFunctionAlongExhaustion_h_zero_..._beta_zero_ferromagnetic`),
ℤ^d Λ (`partitionFunctionΛ_latticeGraph_h_zero_..._beta_zero_ferromagnetic`),
and ℤ^d along-ex (`partitionFunctionAlongExhaustion_latticeGraph_h_zero_..._beta_zero_ferro`).
No Λ-layer ferromagnetic β=0 variant exists. Docs-only; no logic change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@phasetr
phasetr marked this pull request as ready for review July 23, 2026 04:01
@phasetr
phasetr merged commit 7de92cd into main Jul 23, 2026
1 check passed
@phasetr
phasetr deleted the refactor/drop-freeenergyratios-triple-bundles branch July 23, 2026 04:01
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.

2 participants