chore: safe-subset mathlib cleanup batch (bdd_mul, iterate, pi prob, indicator) (−31 lines)#23
Merged
Merged
Conversation
…indicator) Four small, independent mathlib-alignment cleanups, all proof-body-only with statements unchanged. Net -31 lines. 1) Integrable.bdd_mul' → Integrable.bdd_mul (deprecated alias). 7 sites: - DeFinetti/ViaMartingale.lean (2) - DeFinetti/ViaKoopman/InfraGeneralized.lean (1) - Probability/TripleLawDropInfo/DropInfo.lean (4) 2) Delete local MeasurePreserving.iterate' wrapper in DeFinetti/ViaKoopman/CesaroL2ToL1.lean. The single caller switches to the dot-notation form `hσ.iterate k` which resolves directly to mathlib's `MeasurePreserving.iterate`. 3) Shorten the per-ω probability-measure proof for product kernels in Probability/MeasureKernels.lean (`hκ_prob`). The block already used typeclass inference to find `Measure.pi.instIsProbabilityMeasure`; collapse the surrounding plumbing from 6 lines to 3 and name the instance in a leading comment. 4) Delete the private wrapper `mul_indicator_one_eq_indicator_inter` in Probability/CondIndep/Indicator.lean. Its single caller switches to `(Set.inter_indicator_one ..).symm` from mathlib. Out of scope: the related manual case-splits in DeFinetti/ViaMartingale/IndicatorAlgebra.lean (`indProd_mul`) don't have a clean named-lemma replacement; left as-is.
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.
Summary
Four small, independent mathlib-alignment cleanups, batched into one PR per agreed scope. All proof-body-only with statements unchanged.
Net diff: 6 files, +12 / −43 (−31 lines).
Items
1.
Integrable.bdd_mul'→Integrable.bdd_mul(deprecated alias)Mathlib deprecated the prime-suffixed alias; the canonical name has been available for some time. Straight string substitution at 7 sites across 3 files:
DeFinetti/ViaMartingale.lean:281, 286DeFinetti/ViaKoopman/InfraGeneralized.lean:559Probability/TripleLawDropInfo/DropInfo.lean:153, 156, 159, 2072. Delete local
MeasurePreserving.iterate'DeFinetti/ViaKoopman/CesaroL2ToL1.lean:100defined a 5-line local lemma proving the iterate of a measure-preserving map is measure-preserving — which is exactlyMeasurePreserving.iteratein mathlib (provable viahT.iterate k). The single caller at line 691 switches fromMeasurePreserving.iterate' hσ ktohσ.iterate k.3. Shorten
hκ_probblock inProbability/MeasureKernels.leanThe per-ω probability-measure proof for the product kernel
κ ω = Measure.pi (fun _ : Fin m => ν ω)was a 6-line tactic block that already used typeclass inference to findMeasure.pi.instIsProbabilityMeasure. Collapse the surrounding plumbing (intro ω; classical; haveI; simp; infer_instance) to a 3-linefun ω => by haveI; simp only [κ]; infer_instance, and name the instance in a leading comment so the reader can see what's being inferred.(Tried
exact pi.instIsProbabilityMeasure _directly but the FQN doesn't resolve in this scope;simp only [κ]; infer_instanceis shorter than the FQN form here and clearer than the prior version.)4. Delete
mul_indicator_one_eq_indicator_interprivate wrapperProbability/CondIndep/Indicator.lean:61defined a 20-line private lemma provings.indicator 1 * t.indicator 1 = (s ∩ t).indicator 1. Mathlib'sSet.inter_indicator_oneis exactly this equation in the opposite direction. The single caller at line 162 switches to(Set.inter_indicator_one ..).symm.Out of scope
DeFinetti/ViaMartingale/IndicatorAlgebra.lean:110(indProd_mul) was flagged by the audit as "possibly" foldable, but it does manual case-splits on indicator membership inside aFinset.prod, and there's no clean single-named-lemma replacement. Leaving as-is.The σ-finiteness wrapper trim (
ForMathlib/MeasureTheory/Measure/TrimInstances.lean,Probability/CondExpBasic.lean:46) is the next planned PR — different shape (touches local export API), kept separate.Verification
lake buildExchangeability+ForMathlib)Notes
7301d1b5).