Repository navigation
Conversation
|
Hi @teorth , I noticed that this project has diverged from mathlib quite significantly, so I took the time to bump the version with the help of Claude. I haven't worked through the textbook yet, so I can't vouch for the faithfulness of all fixes, but I think they look reasonable and nothing stands out in particular to me. Hopefully you're ok with this and I'll propose fixes if I notice any in the future. There are still some outstanding tasks which I'm planning to do if this is merged, including moving the project to the module system, some style warnings and replacing the |
|
Thanks for this — and for pinning I'm not merging it on my own initiative, because the pinned toolchain and Mathlib version are a project-wide decision for @teorth rather than a routine review call, so I've flagged it for him. Two notes meanwhile, neither a problem with the PR:
Sorry to add a rebase to a 70-file PR — the import gap is the reason, and it's now fixed. |
Update lean-toolchain, pin mathlib, verso and doc-gen4 to their v4.35.0 tags, and regenerate lake-manifest.json. Repair the proofs that broke across the six Mathlib releases since v4.29.0-rc8 (missing transitive imports from Mathlib.Tactic, structure proof fields no longer unfolded by simp, 1-indexed List.TFAE.out, renamed lemmas, stricter simp/convert, instances with non-inferable arguments, column-zero continuation lines, and the Verso kw role for ≤). No statements or definitions changed and no sorry added. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Mechanical one-to-one renames following the deprecation warnings emitted by Mathlib v4.35.0; no proof structure changed. Covers push_neg -> push Not, Set.mem_setOf_eq -> Set.mem_ofPred_eq, if_pos/if_neg/if_true/if_false -> ite_eq_left/ite_eq_right/ite_true/ ite_false, dif_pos/dif_neg -> dite_eq_left/dite_eq_right, the Set.*diff* family -> Set.*sdiff*, tendsto_finset_sum/prod and continuous_finset_sum/prod -> camelCase, sSup_diff_singleton_bot, Finset.toFinset_bitIndices_twoPowSum, Set.setOf_true/false, and the deprecated imports Mathlib.Data.Real.Sign -> Mathlib.Basic.Real.Sign and Mathlib.Algebra.Field.Power -> Mathlib.Algebra.Ring.Int.Parity. Two replacements are not literally the same statement: Equiv.apply_eq_iff_eq_symm_apply is replaced by Equiv.eq_symm_apply with the arrow dropped (the sides of the iff are swapped), and List.tfae_cons_self by List.tfae_cons_of_mem inside a simp_all list where the linter reports it as unused either way. The 40 uses of `peel` are left alone: its replacements (`gconvert`, `congr!`) are not drop-in and each site needs re-checking. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The MeasureTheory PRs merged since this branch was cut (teorth#694-teorth#737) were written against v4.29.0-rc8, and teorth#737 put Section_1_4_1 through Section_1_4_5 into the build for the first time. Under v4.35.0 they need the same repairs as the rest of the library: - eleven new `List.TFAE.out i j` calls in Section_1_3_2 bumped to 1-based indices; - Section_1_4_1: two `simpa [LebesgueMeasurable.boolean_algebra]` steps that relied on unfolding the `measurable` structure field now `show` the unfolded goal first, and two exercise statements declared as `instance` with non-class types are `theorem`s; - Section_1_4_2 imports `Mathlib.MeasureTheory.MeasurableSpace.Defs` and Section_1_4_3 imports `Mathlib.MeasureTheory.Measure.NullMeasurable`, since `Mathlib.Tactic` no longer provides `MeasurableSpace`, `Measure`, `Measure.completion` or `NullMeasurableSet` transitively; - `Measure.toCountablyAdditiveMeasure` is `noncomputable`, as `ENNReal.toEReal` now is. No statements changed. Full `lake build` passes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bf945dc to
1af04e8
Compare
…ce_reducible for class-typed defs Two linters introduced since v4.29 fire on the MeasureTheory files: - `linter.defProp`: 40 proofs were declared with `def`. They are now `theorem` (the 10 that carry a book label and the 14 helpers in the all-`theorem` Section 1.4 files) or `lemma` (the 16 unlabelled helpers in Sections 1.1.1, 1.3.1 and 1.3.4, matching the convention that unlabelled helpers in that tree are mostly `lemma`). - `warn.classDefReducibility`: 32 `def`s produce values of the class types `ConcreteBooleanAlgebra`/`ConcreteSigmaAlgebra`/`MeasurableSpace` and are now marked `@[instance_reducible]`, as the warning suggests, so instance-transparency unfolding can see their fields. Keyword and attribute changes only; no statement or proof body changed. Full `lake build` passes; warnings drop from 319 to 247, leaving only the module-system notices, the 40 `peel` deprecations and style lints. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Rebased on the latest |
`kw!` is the documented way to skip the keyword role's atom check while still recording and validating the intended syntax kind. It renders the same as `lit`, but keeps `(of := «term_≤_»)` in the source so the full `kw` role can be restored in one step once core handles `unicode(...)` atoms (reported on Zulip). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Bumps the project from
v4.29.0-rc8tov4.35.0(Lean and Mathlib).Dependency changes
lean-toolchain:leanprover/lean4:v4.35.0lakefile.lean: Mathlib pinned tov4.35.0;versoanddoc-gen4pinned to theirv4.35.0tags (theirmainbranches have already moved on tov4.36.0-rc1, which would not build on this toolchain).lake-manifest.jsonregenerated withlake update -R -Kenv=dev. Verso now pulls inilluminateas a transitive dependency.Source changes
Only proofs were changed; no statements, definitions or exercise
sorrys were touched, and nosorrywas added. Recurring causes, in rough order of frequency:Mathlib.Tacticno longer transitively imports analysis/topology modules, so explicit imports were added whereEuclideanSpace,HasDerivWithinAt,exists_deriv_eq_slope,CauSeq.tendsto_limit,Real.mem_closure_iff,ContDiffOn,Uncountable ℝetc. are used.Function.Embedding.inj',AddMonoidHom.map_add') are no longer unfolded bysimp/rwunder the new transparency check; the proof field now gets an explicitshow Function.Injective _ by ...(or the surrounding step avoids the coercion).simpfails when it makes no progress;convertleaves side goals that previously closed byrfl; a fewgrindcalls now time out oninteg/upper_integralgoals and were replaced byunfold ...; linarith.List.TFAE.outis now 1-indexed (all call sites bumped; the Appendix A.1 note about 0-indexing was updated).Finset.prod_le_prod→Finset.prod_le_prod₀(ordered semiring version),Finset.sum_inter_add_sum_diff→Finset.sum_inter_add_sum_sdiff,tendsto_finset_sum→tendsto_finsetSum,Finsupp.single_*onAddMonoidAlgebra→AddMonoidAlgebra.single_*,_root_.not_imp→Classical.not_imp,DFunLike.coe_injective'→coe_injective,isWellFounded_iffno longer needed forWellFoundedLT.HasSubset.Subset.transdot-notation no longer applies to the custom⊆onBoundedInterval; replaced by_root_.trans(theIsTransinstance already exists).instancedeclarations with explicit non-inferable hypotheses are now errors; two were changed totheorem/def(TaggedPartition.nhds_zero_neBot,IsElementary.ae_equiv), their call sites pass the arguments explicitly already.{kw (of := «term_≤_»)}fails because core now defines≤viaunicode(" ≤ ", " <= "), which thekwrole's atom matcher does not handle; switched to{kw! (of := «term_≤_»)}for those three sites, the documented way to skip the atom check while still validating the kind name (<and the otherkwuses still resolve). This is a core Lean bug, reported on Zulip: https://leanprover.zulipchat.com/#narrow/channel/270676-lean4/topic/.7Bkw.7D.20docstring.20role.20fails.20for.20unicode.28.2E.2E.2E.29.20notations.20like.20.E2.89.A4/with/632378234Verification
lake buildof the whole library passes locally (Windows, Lean v4.35.0).lake query :literateHtml(the Verso book) builds.lake -R -Kenv=dev build Analysis:docswas not run locally: compiling doc-gen4's C dependencies fails with the local mingwcc, unrelated to this change. CI (Ubuntu) should exercise it.Deprecation renames (second commit)
The second commit mechanically applies the deprecation warnings Mathlib v4.35.0 emits for this library:
push_neg→push Not,Set.mem_setOf_eq→Set.mem_ofPred_eq,if_pos/if_neg/if_true/if_false→ite_eq_left/ite_eq_right/ite_true/ite_false,dif_pos/dif_neg→dite_eq_left/dite_eq_right, theSet.*diff*family →Set.*sdiff*,tendsto_finset_sum/continuous_finset_prodand friends → camelCase, and the deprecated importsMathlib.Data.Real.Sign→Mathlib.Basic.Real.SignandMathlib.Algebra.Field.Power→Mathlib.Algebra.Ring.Int.Parity. All replacements are statement-identical aliases exceptEquiv.apply_eq_iff_eq_symm_apply→Equiv.eq_symm_apply(sides of the iff swapped, so the←was dropped) and oneList.tfae_cons_self→List.tfae_cons_of_memin asimp_alllist where the argument is unused either way. After this commit the only remaining deprecation warnings are the 40 uses ofpeel, whose suggested replacements (gconvert/congr!) are not drop-in and are left for a follow-up. The 136 "consider addingmodule" notices are likewise left for a separate PR.Rebase onto #737 (third commit)
Rebased onto
mainafter #737 put Section 1.4 into the build. The MeasureTheory PRs merged in between (#694–#737) were written against 4.29 and needed the same kinds of repair under 4.35, kept in a separate commit: eleven newList.TFAE.outcalls in Section_1_3_2 shifted to 1-based indices; in Section_1_4_1 twosimpa [LebesgueMeasurable.boolean_algebra]steps nowshowthe unfolded goal first and two exercise statements declared asinstancewith non-class types becametheorems; Section_1_4_2 importsMathlib.MeasureTheory.MeasurableSpace.Defsand Section_1_4_3 importsMathlib.MeasureTheory.Measure.NullMeasurable(no longer provided transitively byMathlib.Tactic); andMeasure.toCountablyAdditiveMeasureis markednoncomputablesinceENNReal.toERealnow is. Section_1_4_4 and Section_1_4_5 compiled without changes. Every file on disk is reached fromAnalysis.leanexceptMisc/equational.lean, which has never been imported and compiles cleanly standalone on 4.35.New Lean linters (fourth commit)
Two linters added since 4.29 fire on the MeasureTheory files.
linter.defPropflagged 40 proofs declared withdef; they are nowtheorem(the 10 carrying a book label, plus the 14 helpers in the all-theoremSection 1.4 files) orlemma(the 16 unlabelled helpers in Sections 1.1.1, 1.3.1 and 1.3.4, following the tree's tendency for helpers).warn.classDefReducibilityflagged 32defs that build values of the class typesConcreteBooleanAlgebra,ConcreteSigmaAlgebraandMeasurableSpace; they now carry@[instance_reducible]as the warning suggests. Keyword and attribute changes only. Warnings drop from 319 to 247; what remains is the 140 module-system notices, the 40peeldeprecations and style lints (haveI, unused simp args, unused tactics).🤖 Generated with Claude Code