refactor: delete comap_comp_le wrapper, route call site through mathlib (−21 lines)#31
Merged
Merged
Conversation
The local `MartingaleHelpers.comap_comp_le` lemma had one real caller (`RevFiltration.lean:109`) and was a thin wrapper around the mathlib chain `MeasurableSpace.comap_comp` (equality) + `comap_mono` + the target function's `.comap_le`. Inline at the call site: rw [← MeasurableSpace.comap_comp] exact MeasurableSpace.comap_mono measurable_shiftSeq.comap_le The other two references to the lemma — `open ...MartingaleHelpers (comap_comp_le)` in `ViaKoopman/InfraCore.lean:103` and `ViaKoopman/KernelBridge.lean:31` — were vestigial after PR #22 (which deleted the local `Kernel.IndepFun.comp` that had used `comap_comp_le` internally). Dropped. - DeFinetti/MartingaleHelpers.lean: delete the lemma + its `section ComapTools` wrapper (-19 lines). - DeFinetti/ViaMartingale/RevFiltration.lean: inline the call (-0 lines net; 2 lines for 1). - DeFinetti/ViaKoopman/{InfraCore,KernelBridge}.lean: drop the vestigial `open` statements (-1 line each). Net -21 lines across 4 files. Build clean (3527 jobs), axioms standard, 0 sorries.
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
MartingaleHelpers.comap_comp_leprovedcomap (g ∘ f) m ≤ comap f mfor measurableg. It had one real caller (RevFiltration.lean:109) and was a thin wrapper around the mathlib chain. Two other reference sites (open ...MartingaleHelpers (comap_comp_le)inInfraCore.lean:103andKernelBridge.lean:31) were vestigial after PR #22 deleted the localKernel.IndepFun.compthat had used it internally.Net diff: 4 files, +2 / −23 (−21 lines).
What changed
Inline the call site against mathlib
DeFinetti/ViaMartingale/RevFiltration.lean:109:MeasurableSpace.comap_compis the mathlib equalitycomap g (comap f m) = comap (f ∘ g) m; combined withcomap_monoand the target function's.comap_le, it does exactly what the wrapper did. Two lines instead of one, but noMartingaleHelpersindirection.Delete the wrapper
DeFinetti/MartingaleHelpers.lean: delete thecomap_comp_lelemma + itssection ComapToolswrapper (-19 lines).Drop vestigial open statements
DeFinetti/ViaKoopman/InfraCore.lean:103andDeFinetti/ViaKoopman/KernelBridge.lean:31: drop theopen Exchangeability.DeFinetti.MartingaleHelpers (comap_comp_le)lines. Verified by grep that neither file uses the name after theopen.Verification
lake buildExchangeability)This closes out the post-bump "small targeted cleanup" series. The remaining docket items are larger: cylinder/product-measure refactor, file-by-file Probability bridge triage, and the
DirectingMeasureCore → IsCondKernelCDF.toKerneldesign PR.