Repository navigation
Conversation
The archive is outside the fork's defaultTargets (Fin74, Neighborhood), so
nothing had built it since the 4.33.1 bump: Modal.Tableau failed with six
errors, and every Modal/Kripke/Logic/* module depends on it. With this commit
`lake build ModalLogicArchive` (247 modules, 1302 jobs) succeeds in a
consumer at Lean 4.33.1 / mathlib 0df444a360.
Most breakages share one cause. Defs such as Tableau.Consistent begin with
`∀ {Γ Δ}`. When a hypothesis of that type is elaborated without an expected
type (`if_pos h`, `simpa using h`), Lean 4.33 instantiates its implicit
binders, and `split` / `split_ifs` no longer recognise an `if` whose
condition is such a def. The fix passes `@h`, and replaces `split` by
explicit equation lemmas (`lindenbaum_next_of_consistent`,
`lindenbaum_next_of_not_consistent`, `lindenbaum_next_cases`, and their
Modal.Tableau counterparts).
Other 4.33 / mathlib changes handled here:
- simp no longer closes proof-irrelevant subtype equalities, nor goals on
`Fin 1` / `Fin ↑1`: use Subtype.ext, `Fin.eq_zero` + `subst`, omega;
- `dsimp [f, h]` cannot rewrite an `if` with a Prop hypothesis `h`:
use `rw [f, if_pos h]`;
- `Rel.Iterate R 1` is no longer simp-reducible: use `Rel.Iterate.iff_succ`;
- simp lemmas stated on `t.1.1` for SaturatedConsistentTableau do not fire
on worlds of the canonical model: apply them explicitly with `(t := t)`;
- the auto-generated name of the GrzPoint3 soundness instance followed
mathlib's spelling of set-builder notation (`setOf` became `ofPred`), so
the instance is now named `sound_finite_GrzPoint3'`.
No proof is removed and no `sorry` is added. The eight `sorry` the archive
already carried (NNFormula, AxiomMk, Balloon, GrzPoint3, S4H, Makinson,
Modality/Basic) are unchanged. Not measured under the branch's own
lean-toolchain (v4.31.0).
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Grain: DEEP/lean — lane myia-po-2025:CoursIA — prev: MED/notebook-dotnet jsboige/CoursIA#17513
Summary
ModalLogicArchivedid not build under Lean 4.33.1.Modal.Tableaufailed with six errors, and everyModal/Kripke/Logic/*module depends on it, so the frame classes, the per-system soundness/completeness instances and the⪱instances between systems could not be used from a consumer. Nothing flagged it: the archive is outsidedefaultTargets(Fin74,Neighborhood), and CI (lake build) never builds it.This PR makes the whole archive build:
lake build ModalLogicArchive(247 modules, 1302 jobs) succeeds. Tracked in jsboige/CoursIA#17522.Root cause
Most failures share one cause. Several defs start with implicit binders, for instance
Tableau.Consistent 𝓢 t := ∀ {Γ Δ}, .... When a hypothesis of such a type is elaborated without an expected type (if_pos h,simpa using h), Lean 4.33 instantiates the implicits.split/split_ifsthen fail on anifwhose condition is such a def.Fixes: pass
@h, and replacesplitby explicit equation lemmas.Propositional.ConsistentTableau:lindenbaum_next_of_consistent,lindenbaum_next_of_not_consistent,lindenbaum_next_cases.Modal.Tableau: the matching lemmas.The rewritten proofs (
next_parametericConsistent,mem_lindenbaum_next_indexed,lindenbaum_next_indexed_subset₁/₂_of_lt, ...) keep their statements.Other 4.33 / mathlib changes
simp_all/simp/calc … by simpon pair or subtype equalitiesProd.ext,Subtype.extModal.Tableau,ConsistentTableau(equality_def,equality_of₁),Treesimp at hto discharge a hypothesish : ¬ a = aexact h rfl/exact absurd rfl hTree,Logic/GLPoint3simpon goals overFin 1/Fin ↑1Fin.eq_zero(+subst),omegaRank,ExtendRootdsimp [f, h]to rewrite anifwith a Prop hypothesishrw [f, if_pos h]FMT/CompletenesssimponRel.Iterate R 1Rel.Iterate.iff_succRankt.1.1(not_mem₁_falsum,iff_mem₁_and,iff_mem₁_or,canonicalFrame.rel₁) on worlds of the canonical model(t := t), andTableau.subset_defPropositional/Kripke/Completeness,AxiomWLEMsimp/grindonFinsetpreimage membership,rintropattern sized for the old simp normal formFinset.mem_preimage,Finset.mem_union_*,Finset.mem_filterLogic/Grz/Completeness,Propositional/Kripke/AxiomKreiselPutnamsimpa using hyon a conjunctionsimpa using hy.1AxiomMcKsetOfbecameofPred)sound_finite_GrzPoint3'and reference itLogic/GrzPoint3,ModalCompanion/Standard/LC14 files changed: +160 / −83, all under
ModalLogicArchive/.Fin74andNeighborhooddo not import the archive (0 occurrences), so they are unaffected.Verification
Measured in a consumer at Lean 4.33.1, mathlib
0df444a360, Foundation81810b9f22, with this branch checked out as theModalLogicpackage:The aggregate
ModalLogicArchive.leanimports all 247 modules of the archive, so this covers every file,Modal.Kripke.Logic.S5included.No proof removed, no
sorryadded. The diff adds nosorry. AcollectAxiomsscan over every declaration of 21 modules reportssorryAxin exactly three:LC.boxdotModalCompanion_LC;GrzPoint3'sComplete … finite_GrzPoint3;GrzPoint2 ⪱ GrzPoint3.All three rest on the literal
sorryatLogic/GrzPoint3.lean:58, which predates this PR. The 21 modules are the repaired ones, plus S4/S5/KT/KTB/KD45/K4 andKripke.Completeness. Scan results:Modal.Tableau: 113 declarations, 0sorryAx;Kripke.Logic.S5: 45 declarations, 0sorryAx;Propositional.ConsistentTableau: 83 declarations, 0sorryAx.The eight
sorrywarnings of the full build are the ones the archive already carried:NNFormula×2,AxiomMk,Balloon,GrzPoint3,S4H,Makinson,Modality/Basic.Not measured: the branch's own
lean-toolchain(v4.31.0). The fixes target the 4.33.1 configuration that the consumer pins.CI: the archive is still unguarded (item 2 of CoursIA#17522)
This PR does not add a CI step, and that is deliberate.
ci.ymltriggers only onpush/pull_request/merge_grouptomain. It builds with the branch'slean-toolchain, v4.31.0. So:coursia-v4.33.1-compat;lake buildwould test Lean v4.31.0, not the 4.33.1 configuration that broke.A guard that matches the consumer needs one of two things:
lean-toolchainand manifest with the consumer (4.33.1 / mathlib0df444a360), then trigger CI on this branch;lake build ModalLogicArchive.Modal.Kripke.Logic.S5.That choice belongs to the fork maintainer. It stays open in CoursIA#17522.
🤖 Generated with Claude Code