Repository navigation
chore: bump mathlib to be31cde, preserve PMF APIs - #1079
mathlib-nightly-testing[bot] wants to merge 3 commits into
Conversation
…iform): change uniformOfFinset and ofMultiset from PMF to Measure (#42909) (2026-10-05)
|
I've migrated to measure theory for the impacted aspects of this PR. Curious to get anyone else's perspective. For me, this lowers my comprehension and requires me to think about measures and what these terms mean more than I want to. However, I am not opposed to this if Mathlib is going to deprecate PMF after all. Some more eyes other than me would be ideal, but I'll continue to think about this tonight and tomorrow. |
|
cc @crei |
|
Just to repeat some conversation that Sam and I had earlier. There are a couple of short-term options:
I typically advocate very hard for staying aligned with Mathlib, and Sam mentioned some evidence that it could be useful here, along with innovations in I'll leave all this to your discretion, I just ask that one of these options gets merged in this PR fairly soon, please feel free to merge as soon as you decide. (There is not a rush, but I usually try to not go more than a couple of days before merging these.) |
|
I'm going to suppress the warnings for now and have a think about this and then write something up on the Zulip. I think these proofs and theorem statements are just worse the way things are on this PR. |
|
I'll push something up in a few minutes. |
Bump Mathlib from 9a6fbe0 to be31cde, preserving CSLib's PMF-based probability APIs.
The new Mathlib uniform-sampler aliases return measures, so suppressing deprecation warnings alone cannot compile the existing code. Keep a small compatibility shim in
Cslib.Probability.PMFforuniformOfFinset,uniformOfFintype, and the three lemmas used downstream. The shim adapts the previous Mathlib definitions, with credit to Josha Dekker, Devon Tuma, and Kexing Ying.The crypto files only change sampler imports and references. Their PMF models and proofs are preserved, deferring the broader probability API decision. Regression tests cover singleton sampling, a proper finite subset, and a uniform four-element sample mapped to a fair bit; the existing crypto tests continue to pass.
Validation:
lake build --wfail --iofaillake exe mk_all --checklake testlake lintlake exe lint-styleAI assistance: Codex prepared the compatibility shim, restored the PMF APIs, added regression tests, and ran the checks above.
Closes #1078