-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat(MeasureTheory): Introduce MassFunction α giving rise to a Measure α ⊤
#34138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pfaffelh
wants to merge
1,012
commits into
leanprover-community:master
Choose a base branch
from
pfaffelh:pfaffelh_MF0
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 250 commits
Commits
Show all changes
1012 commits
Select commit
Hold shift + click to select a range
37a6c37
feat(Combinatorics/Graph): add Compatible definition and API (#34783)
Jun2M 3489ffc
chore(Order/Types/Arithmetic): golf addition/multiplication instances…
vihdzp 8d60762
feat(CategoryTheory): more API for jointly faithful functors (#35527)
joelriou d548d2c
chore(RingTheory/AdicCompletion): update the definition of `AdicCompl…
BryceT233 77401aa
feat(RingTheory/IsTensorProduct): heterogeneous associativity (#35557)
chrisflav 07db439
feat(CategoryTheory/Limits): isIso_colimMap (#35575)
joelriou 39e3d93
feat(Data/Finsupp/Order): add lemma Finsupp.single_le_sum (#35258)
MichaelStollBayreuth e57c1f8
chore: remove `simp` from `Ordinal.add_one_eq_succ` (#35553)
vihdzp 1fe2d01
feat(CategoryTheory): products of finally small categories (#35691)
joelriou b64accd
feat: add (m)differentiableAt_of_(m)fderiv_injective (#35284)
grunweg 6e95f1c
feat: shrink time and enlarge Lipschitz constant in `IsPicardLindelof…
winstonyin 25c938d
fix(Analysis): decouple text from markdown lists (#35476)
harahu df1fd7e
chore(scripts): add set_option migration tools (#35520)
kim-em 21470f6
chore: bump toolchain to v4.29.0-rc2 (#35708)
kim-em 59c91c5
feat(Data/Set): infinite sets have a countably infinite subset (#35579)
felixpernegger 719f236
feat: RestrictedProduct.mulSingle_eq_same (#35621)
bwangpj e8318b0
chore: tag `MeasurableSet.mem` with `fun_prop` (#35644)
gasparattila 670f372
doc(RingTheory/Kaehler/Basic): fix markdown list (#35704)
plp127 d059922
feat: more lemmas on `Ordinal.type` (#35519)
vihdzp 3698e9d
feat(AlgebraicTopology): various localized equivalences (#34643)
joelriou f01ae51
chore: weekly lints for 2026-02-23 (#35678)
chenson2018 ed27b1e
chore: mark `RelEmbedding.collapse` as `no_expose` (#35624)
vihdzp fe48901
refactor(RingTheory/Ideal/AssociatedPrime/Basic): redefine associated…
tb65536 a5fa695
feat: define `Matrix.ProjGenLinGroup` (#34987)
urkud c61786f
refactor: change definition of distance in normed group (#35037)
sgouezel a70bcea
feat(Topology/Spectral): a spectral space is quasi-compact with the c…
chrisflav 3414ab6
feat(Analysis/LocallyConvex/WeakDual): Weak Representation Theorem (#…
PrParadoxy bf60a0b
feat(RingTheory/Radical): positivity extension for radical of natural…
b-mehta b507733
feat(Module/RCLike): convenience lemma to prove antilipschitz over RC…
b-mehta 0e80ba7
feat: definition of equivalence of representations (#34888)
stepan2698-cpu 8249d4e
chore: replace `aesop` with `simp`/`simp_all` where applicable (#35712)
euprunin f9510f8
feat: local frames in a vector bundle (#30083)
grunweg 3ceb0d4
feat: Poisson Integral Formula for ℂ-differentiable functions (#35399)
kebekus f6c7dd9
feat(LinearAlgebra/QuadraticForm): radical of a quadratic form (#34493)
loefflerd 9441100
feat(AlgebraicGeometry): globalize flat + smooth fibers implies smoot…
chrisflav 08e39a6
feat: lemmas for the analytic part of the proof of the Gelfond–Schnei…
mkaratarakis 853a50e
feat(Analysis/Normed/Module/FiniteDimension): add lemmas on IsTheta a…
jvanwinden 0080586
feat(Analysis/InnerProductSpace): a linear map composed with its adjo…
nielsvoss bdfee86
feat(Analysis/InnerProductSpace/Rayleigh): basic API for Rayleigh quo…
tb65536 3f3bde9
chore: golf proofs (#35304)
euprunin d853b0d
chore(Tactic): improve `econstructor` and `fconstructor` tactic docst…
Vierkantor 30ef62d
feat(SimpleGraph): `take` is path if original walk is path (#33249)
Rida-Hamadani baf4b6b
feat(SetTheory/Cardinal): generalize infinite pigeonhole principle (#…
staroperator bffb164
chore(Order/InitialSeg): remove backward.privateInPublic (#35626)
vihdzp 4222ae2
feat(Analysis): `{LinearMap, Matrix}.trace` as a positive linear map …
themathqueen d61e1aa
feat(Algebra/Polynomial/PartialFractions): generalize to powers (#35000)
plp127 a6d842f
refactor: improve API connecting `ℝ`- and `𝕜`-linear functionals (#34…
j-loreaux 6eb65d6
refactor(Algebra/*): generalize `of_ringEquiv` lemmas (#35351)
urkud ad15cbc
feat(Algebra/Homology/SpectralSequence): complex shapes for pages of …
joelriou 5dc6020
feat(FieldTheory/Finite/Valuation): add IsTrivialOn (#35531)
mariainesdff 90406c2
chore: update Mathlib dependencies 2026-02-25 (#35749)
mathlib-update-dependencies[bot] 21f26a9
chore(*): reduce defeq abuse around `Set` (#35752)
urkud bada5d5
feat(Analysis/InnerProductSpace/Rayleigh): the norm of a symmetric op…
tb65536 a63abe3
feat(RingTheory/Valuation): add IsTrivialOn_lemmas (#35503)
mariainesdff 9a9b6dc
feat(CategoryTheory/Sites): characterization of covering sieves using…
joelriou 402394d
feat(AlgebraicGeometry): weakly étale morphisms (#35717)
chrisflav f78c939
feat: singleton indicators as functions with locally finite support (…
kebekus b366a89
chore: add theorem attributes, trivial theorems on orders of meromorp…
kebekus 0370005
feat(Geometry/Euclidean/Angle/Oriented/Affine): oriented angle bisect…
jsm28 22287f4
feat(Geometry/Polygon): nondegeneracy conditions and interconversion …
A-M-Berns 65f8eaa
feat(CategoryTheory): constructor for abelian categories (#35381)
joelriou 22d7444
feat(AlgebraicGeometry): Zariski sheaves preserve products (#35508)
chrisflav 624a7a2
feat(Algebra/Homology/ComplexShape): use `to_dual` (#35019)
JovanGerb 0b89131
feat: add congruence lemmas for integrability (#35086)
kebekus e3845ce
feat: add a LE version of previous lt_one_iff_num_lt_denom theorem (#…
pevogam 1b2019a
chore(Tactic): improve `continuity` tactic and attribute docstrings (…
Vierkantor 0d709b4
chore(Tactic): document `existsi`, `use` and `use_discharger` tactics…
Vierkantor f491441
chore(Data/Bool/Count): golf using grind (#35021)
SnirBroshi 9fb9cd9
feat: introduce `HarmonicContOnCl` (#35564)
kebekus 821eb2f
feat: asymptotic lemmas on the `cobounded` filter (#34920)
Parcly-Taxel 36e01fc
feat(Geometry/Euclidean): Simplex.closedInterior is closed (#35358)
wwylele fdec208
chore(Finset): drop `Membership` instance (#35780)
urkud af829d9
chore: remove no-longer-needed backwards compatibility options (#35737)
kim-em ca325a7
chore: remove 21 redundant set_option backward.whnf.reducibleClassFie…
kim-em 9a835cb
chore: make `liftFun_antisymmRel` public (#35625)
vihdzp 13a77b2
feat(CategoryTheory/Sites): `Presieve.IsSheafFor` is local on the tar…
chrisflav 78d00d7
feat(LinearAlgebra/AffineSpace): small lemmas about lineMap and homot…
wwylele b6e2e0d
feat(Submodule/Lattice): Add `Submodule.disjoint_iff_add_eq_zero` (#3…
xgenereux a203d51
chore(Mathlib/RingTheory/Algebraic/Basic.lean): automated extraction …
mathlib-splicebot[bot] ee74747
chore(Tactic): fix indentation in markdown lists (#35438)
harahu a77e939
feat(MulAction): add a SMulDistribClass instance for subgroups (#35371)
xroblot 74abe1f
chore(CategoryTheory): use predicates to define `Presieve` (#35799)
urkud 596fc40
feat(RamicationInertia): define decomposition and inertia fields (#35…
xroblot a00690e
refactor(Computability/TMComputable): generalize from `FinEncoding` (…
tb65536 2a83d19
feat(GroupTheory/Focal): add focal subgroup theorem (#34380)
Rogerhu12 54d40e6
feat: PrimeSpectrum.irreducibleSpace_iff_nilradical_isPrime (#35574)
bwangpj f45231f
feat(Algebra/Category/Ring): equalizers of pushout maps of tensor pro…
yonggyuchoimath 9bf58e9
feat: `SeparatelyContinuousMul` class for multiplication which is con…
j-loreaux 1116013
feat: give functor categories an instance of `HasBinaryBiproducts` (#…
leomayer1 b4b8f01
feat(CategoryTheory/EffectiveEpi): composition preserves resp. reflec…
chrisflav f5d44d6
chore: update Mathlib dependencies 2026-02-26 (#35816)
mathlib-update-dependencies[bot] ccea946
chore(Tactic): rewrite `extract_goal` tactic docstring (#35817)
Vierkantor ac01dbe
chore(CategoryTheory/Sites): fix IsSheaf.isSheafFor (#35711)
joelriou 1d40f10
feat(GroupTheory/FiniteAbelian): construct bijection between subgroup…
xroblot 17b20b2
chore(CategoryTheory): make `Kleisli` and `Cokleisli` one-field struc…
robin-carlier 3e84a1a
feat(CategoryTheory/Abelian/Preradical): introduce basic definition o…
farmanb 76094eb
feat(Algebra/Category/ModuleCat/Sheaf): the category of sheaves of mo…
joelriou 203184a
feat(Combinatorics/SimpleGraph/Diam): drop `Finite α` from `ediam_le_…
IvanRenison 90fe48a
feat: `Cauchy.map` for functions uniformly continuous on a set (#35206)
j-loreaux 183ff88
feat(Algebra/Homology): definition of the category of spectral sequen…
joelriou 3e5ab47
feat(AlgebraicGeometry/EllipticCurve/Affine/Point): add equivalences …
Multramate f30f6d2
feat: a nilpotent simple group is cyclic (#34318)
adomani 761c792
feat: IMO 2002 Q3 (#34556)
Parcly-Taxel 90ea9db
feat(Topology/Bornology): a locally bounded function maps a compact s…
CoolRmal 648af4b
feat: `Subobject.topologicalClosure_mono` (#35205)
j-loreaux 4c5d570
feat(LinearAlgebra/Finsupp): add lemmas about `lsum` and submodule (#…
BryceT233 f24b824
feat(Archive): minimal axioms for Boolean algebra (#35172)
Parcly-Taxel 91ca6fd
feat: restrict normal function to `Iio` intervals (#35792)
vihdzp 37080fc
refactor: make `Order.succ_eq_add_one` a `simp` lemma (#35741)
vihdzp 5225f5a
perf(scripts): pass all files to lean --deps-json in a single invocat…
kim-em 04a5d80
feat(Algebra): projective dimension equal supremum of localized modul…
Thmoas-Guan dbbdd8d
feat: Add Function.Injective.addTorsor Function.Injective.normedAddTo…
jstoobysmith 25be45f
feat: generalize `prod_eq_mul_prod_diff_singleton` (#35482)
xgenereux 051e89c
chore(SetTheory/Ordinal/Basic): deprecate `succ_eq_add_one` and `succ…
vihdzp e00375c
feat: classical "decidability" instances on sets and ideals (#33757)
fpvandoorn 7afd04c
chore: golf using `grind` (and add one supporting `grind` annotation)…
euprunin 3fa427f
feat(Algebra/Ring/NegOnePow): add negOnePow ↔ natAbs bridge lemmas (#…
jessealama f3b373d
refactor: nicer definition for ordinal division (#35849)
vihdzp d1f0073
feat(AlgebraicGeometry): pullback comparison map of `Scheme.forgetToT…
chrisflav 5b994c5
chore(SetTheory/Ordinal/FixedPointApproximations): fix `unusedVariabl…
vihdzp b8c543c
chore: reduce import in IMO 2002 Q3 (#35836)
Parcly-Taxel a834fd5
chore: mark `Encodable.ofCountable` as `no_expose` (#35838)
vihdzp 50ec0a1
feat(RingTheory/Noetherian/Basic): semilinear generalizations (#35491)
mariainesdff 18563fb
chore(CategoryTheory): fix indentation in markdown lists (#35681)
harahu 8419656
feat: vector measures associated to functions of bounded variation (#…
sgouezel 2c2d540
chore(Data/List/Rotate): add simp attributes (#33214)
JJYYY-JJY e73f018
chore: refactor `Lean.MVarId.gcongr` to use a monad (#35478)
JovanGerb c12d280
chore(Data/Fin/Tuple/Basic): rename recursor arguments (#35703)
plp127 4374cdd
feat: equivalent characterisation of split continuous linear maps (#3…
grunweg 64894f5
fix(Geometry/Manifold/Notation): better error message if the expected…
grunweg d1adc16
feat(CategoryTheory/Abelian): the localization w.r.t. a Serre class (…
joelriou 6dafe01
chore: fix `adjoinAlgebraMap` lemma names (#35860)
xgenereux ae225a4
feat(CategoryTheory/Sites): skyscraper sheaves (#35719)
joelriou 1270b0d
chore: move Pretrivialization, Trivialization to the Bundle namespace…
grunweg 3ca69c5
feat: Semi-direct sum of Lie algebras (#35300)
Ljon4ik4 4a05f45
feat(RingTheory): pure ideals (#35516)
chrisflav af1a865
chore(Data/Nat/Choose): add grind annotations (#35279)
BoltonBailey c069c2d
chore: rename nat_abs_sum_le (#35309)
Ruben-VandeVelde 4d12387
doc(AlgebraicGeometry/Morphisms/Basic): tidy docstrings (#35320)
harahu d33fb0b
feat(CategoryTheory/Sites): descent data when we have pullbacks (#35396)
joelriou f63a853
chore(CategoryTheory): add `IsRegularEpi.of_epi_of_exists` and `IsReg…
chrisflav d3ed596
chore(Translate): use `Term.applyAttributes` (#35409)
JovanGerb eae73bc
feat(Data/Set/Basic): add some missing lemmas (#35416)
joneugster 888237e
chore(CategoryTheory): a regular monomorphism in `Cᵒᵖ` is a regular e…
chrisflav c0a5cd3
chore: move a lemma (#31339)
grunweg bf792fd
feat: root space decomposition of ideals of Lie algebras (#35326)
jano-wol 70268d5
feat(Geometry/Manifold): API for extended coordinate changes (#35391)
peabrainiac bbbddd1
chore: update Mathlib dependencies 2026-02-27 (#35876)
mathlib-update-dependencies[bot] ee85950
chore(misc): fix indentation in markdown lists (#35714)
harahu 1093819
feat(CategoryTheory/Triangulated): abelian subcategories (#35387)
joelriou 7ff237f
chore(Algebra): fix diamond with `Algebra.compHom` at reducible trans…
chrisflav 4f3b923
feat(CategoryTheory/Limits/FormalCoproducts): an extradegeneracy for …
joelriou 9e50127
feat(AlgebraicGeometry/IdealSheaf/IrreducibleComponent): subscheme st…
tb65536 1b08ac5
fix: provide `#min_imports` and other commands in `Mathlib.Init` (#35…
SnirBroshi d4808a6
feat(Algebra/Homology): definition of spectral objects in abelian cat…
joelriou 85cce64
feat(RingTheory/Ideal/Span): add pair lemmas (#25992)
Multramate 478f08f
chore(SetTheory/Ordinal/Arithmetic): avoid terminal `simp only` (#35854)
vihdzp 6b56eff
feat(label_new_contributor): link to the 'why is my PR not on the que…
grunweg 019f1b1
feat(Data/Set/Card): tag `encard_le_encard` with `@[gcongr]` (#35894)
SnirBroshi 4419c14
feat(scripts/autolabel): introduce topic label dependencies (#34066)
joneugster 35aaedc
feat(Topology/Algebra/Ring/Ideal): the connected component of zero is…
tb65536 54358c9
feat(Geometry/Manifold): the interior of a manifold is open (#33189)
peabrainiac 30b5681
feat: CategoryTheory.toSheafify induces an isomorphism on stalks (#35…
Brian-Nugent 76b7f34
feat(CategoryTheory/Sites): constructor for isomorphisms of pre-`1`-h…
chrisflav 1a120c6
feat(CategoryTheory/Adhesive): subobjects in adhesive categories have…
mckoen d6561b0
feat(Tactic): add `#defeq_abuse` tactic combinator (#35750)
kim-em 086f1cc
feat(RingTheory): Module being injective is local property (#31995)
Thmoas-Guan ffd9b70
chore: fix whitespace (#35909)
grunweg 26028a6
chore(RingTheory/Adjoin/Polynomial): move to `Basic.lean` (#35883)
xgenereux c21b2a8
chore(Adjoin/Polynomial): deprecate module (#35913)
xgenereux 7dc5ea0
feat(Combinatorics/SimpleGraph/Acyclic): acyclic and bridge theorems …
SnirBroshi 68a8e25
feat(Combinatorics/SimpleGraph): more API for Turán density (#29449)
mitchell-horner bcd1b34
chore: replace `aesop` with `lia` where possible (#35695)
euprunin 086c770
feat(Combinatorics/SimpleGraph): define `CompleteEquipartiteSubgraph`…
mitchell-horner 0a5d9a4
feat(Data/Finset/Sym): prove two lemmas (#35694)
AntoineChambert-Loir 5c4174e
chore(*): reduce defeq abuse about `Set` (#35795)
urkud 4f86f41
chore(CategoryTheory): reduce defeq abuse about `Set`s (#35885)
urkud 3fb5dfa
chore(LinearAlgebra): reduce defeq abuse of `Set α = α → Prop` (#35888)
urkud 599545f
chore: bump toolchain to v4.29.0-rc3 (#35942)
kim-em 8c65e90
chore: mark Submodule.toAddSubgroup @[reducible] (#35761)
kim-em 65b7b15
chore: delete entries from prime nolint file (#35955)
BoltonBailey 779a4c4
feat(Algebra/Category/Ring/EqualizerPushout): add effectiveEpi_of_fai…
yonggyuchoimath 45f32e6
feat(CategoryTheory/Triangulated): Rotated octahedron axiom (#35496)
justus-springer f5f3e70
feat(MeasureTheory): Add `MeasurableSingletonClass` version of `Measu…
DavidLedvinka 10500a7
feat(MeasureTheory): add lemma for sum_smul_dirac_singleton (#35835)
b-mehta dc76bdd
feat(MeasureTheory): mulEquivHaarChar_eq_one_of_compactSpace (#34192)
bwangpj ac73579
feat(Topology/Algebra): Add API for Sheaves of abelian groups (#34267)
Brian-Nugent 13bca8e
feat(Algebra/GroupWithZero/WithZero): add the multiplicative embeddin…
faenuccio 60703c6
refactor: use 1-field structure to define the `WithVal` type synonym …
smmercuri 349e32d
feat: perfect subgroups (#34611)
adomani 8619b56
feat: Radon-Nikodym derivative of a composition-product (#35014)
RemyDegenne 54644dd
feat(Logic): graded functions (#30355)
kckennylau 852fc35
refactor: make `OrderIso.ofHomInv` take actual `OrderHom`s instead of…
j-loreaux 79a7c53
feat(RingTheory/Localization/FractionRing): add DecidableEq instance …
mariainesdff b935a2a
feat(MeasureTheory): Add an AEMeasurable version of `Measure.map_add`…
DavidLedvinka 39d2d2b
feat(AlgebraicGeometry): constant sheaf associated to a topological s…
chrisflav 876af30
chore(CategoryTheory): improve Factorisation (#35932)
joelriou cd7a683
feat(CategoryTheory/Shift): naturality lemmas for ShiftedHom.map (#35…
joelriou 3abc4a3
feat: `push` lemmas for `Filter.NeBot` (#35261)
j-loreaux 8d1b423
feat(CategoryTheory/Triangulated): add extension_product (#35497)
justus-springer be7f0fd
chore(RingTheory/Etale/Kaehler): mention `FormallyEtale` in the names…
chrisflav 4d5572d
chore(Algebra/Group/Finsupp): fix argument names (#35706)
vihdzp f79c2f3
chore(SetTheory/Ordinal/Basic): deprecate `Ordinal.induction` → `Well…
vihdzp 488c314
fix(Translate): remap ConstantInfo.all during declaration translation…
adamtopaz 8d9cbbf
feat(CategoryTheory/Abelian): lemmas for diagram chasing in short com…
joelriou f0d1c9b
feat(Algebra/Homology): limits of degreewise eventually constant proj…
joelriou 0a386e4
feat(CategoryTheory/Monoidal/Grp_): `Grp` has terminal objects (#35967)
tb65536 535945d
feat: characteristic function of a sum of independent variables (#35968)
EtienneC30 7a4923c
chore: remove extra monic hypotheses from divByMonic and modByMonic l…
kckennylau e9498fd
chore(Analysis/Complex): simplify proof of `Complex.orderClosedTopolo…
euprunin 5a7fdbd
chore: use `to_dual` on `WellFoundedLT.toOrderBot` (#35758)
vihdzp 8e8234e
chore(Tactic): rewrite `field`/`field_simp` tactic documentation (#35…
Vierkantor 1cb4e6d
feat(Algebra/Homology): more lemmas for the biproduct of complexes (#…
joelriou 028e5bc
feat(CategoryTheory/Triangulated/TStructure): more on `truncLT` and `…
joelriou 8d4b7d4
refactor: make `Order.pred_eq_sub_one` a simp lemma (#35742)
vihdzp 0ef7adc
chore(AlgebraicGeometry): Remove TODO and fix documentation (#35845)
Brian-Nugent 1a21154
chore: delete deprecated modules to end August 2025 (#35873)
Parcly-Taxel 888bed6
chore: move differential geometry elaborators tests into a separate d…
grunweg 826a20c
refactor(Topology/Sheaves/LocallySurjective): change `isLocallySurjec…
smorel394 81dbf22
feat(SetTheory/Ordinal/CantorNormalForm): Evaluate a Finsupp as a CNF…
vihdzp 86770c7
refactor: use 1-field structure to define the `WithAbs` type synonym …
smmercuri a2d32e3
chore(Topology): fix indentation in markdown lists (#35437)
harahu a123c1f
chore: golf using `simp` (#35726)
euprunin 9435679
ci: Decouple workflow scripts into the mathlib-ci repository (#35823)
marcelolynch cf830a6
chore: make CompleteLattice helpers instance reducible (#35903)
matthewjasper c7349f3
feat(GroupTheory/Descent): add abstract descent theorem (#35918)
MichaelStollBayreuth e794cfe
feat(NumberTheory/Height): formula for logHeight₁ (#35919)
MichaelStollBayreuth 0f0d4f5
chore(RepresentationTheory/Basic): generalise to Semiring (#35981)
Whysoserioushah 3850928
feat(CategoryTheory/Monoidal/Grp_): zero morphisms in `Grp C` (#35982)
tb65536 716d72f
feat(MeasureTheory): tightness of the range of a sequence (#26292)
RemyDegenne ab834fb
doc: capitalize the proper name Kan (#35321)
harahu d27eda8
chore(Manifold/VectorBundle/LieBracket): golf using custom elaborator…
grunweg 5be7ed4
doc(misc): fix typos (#35856)
harahu 1ffdf61
feat(Algebra/Star/StarProjection): add `IsStarProjection.map` (#35898)
themathqueen 5a9ad3c
feat(GroupTheory): explicit isomorphism between infinite cyclic group…
erdOne f38c59a
run mk_all
pfaffelh 20b483a
Merge remote-tracking branch 'upstream/master' into pfaffelh_MF0
pfaffelh c5c0f32
Merge remote-tracking branch 'upstream/master'
pfaffelh 8309728
Merge remote-tracking branch 'upstream/master' into pfaffelh_MF0
pfaffelh cb18269
repair?
pfaffelh 0730ca0
Merge remote-tracking branch 'upstream' into pfaffelh_MF0
pfaffelh 0f6f98a
repair dissipate
pfaffelh b6061cb
separate indicator
pfaffelh 145c35c
Merge remote-tracking branch 'upstream/master' into pfaffelh_MF0
pfaffelh 9ad3038
before splitting PRs
pfaffelh a4b0235
Merge remote-tracking branch 'upstream/master'
pfaffelh 0d2d9f2
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] 951ecae
initial commit
pfaffelh a8f5b92
split PRs
pfaffelh c7e52e0
Merge branch 'pfaffelh_indicator' into pfaffelh_MF0
pfaffelh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,203 @@ | ||
| /- | ||
| Copyright (c) 2026 Peter Pfaffelhuber. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Peter Pfaffelhuber | ||
| -/ | ||
| module | ||
|
|
||
| public import Mathlib.MeasureTheory.Constructions.Polish.Basic | ||
| public import Mathlib.MeasureTheory.Measure.Dirac | ||
|
|
||
| /-! | ||
| # Mass functions | ||
| This is about discrete measures as given by a (mass/weight) function `α → ℝ≥0∞`. | ||
| We define `MassFunction α := α → ℝ≥0∞`. | ||
|
|
||
| Given `μ : MassFunction α`, `MassFunction.toMeasure` constructs a `Measure α ⊤`, | ||
| by assigning each set the sum of the weights of each of its elements. | ||
| For this measure, every set is measurable. | ||
|
|
||
| ## Main definitions | ||
| * `MassFunction`: A mass function (giving rise to a discrete measure) is a function `α → ℝ≥0∞`. | ||
|
|
||
| ## Tags | ||
|
|
||
| mass function, weight function, discrete measure | ||
|
|
||
| -/ | ||
|
|
||
| @[expose] public section | ||
|
|
||
| open MeasureTheory Measure Function | ||
|
|
||
| open scoped ENNReal | ||
|
|
||
| universe u | ||
|
|
||
| variable {α β γ δ : Type*} | ||
|
|
||
| lemma Function.support_subsingleton_of_disjoint [Zero β] {s : δ → Set α} (f : α → β) | ||
| (hs : Pairwise (Disjoint on s)) (i : α) [DecidablePred (fun d => i ∈ s d)] (j : δ) | ||
| (hj : i ∈ s j) : Function.support (fun d ↦ if i ∈ s d then f i else 0) ⊆ {j} := by | ||
| intro d | ||
| simp_rw [Set.mem_singleton_iff, Function.mem_support, ne_eq, ite_eq_right_iff, Classical.not_imp] | ||
| rw [← not_imp_not] | ||
| intro hd e | ||
| obtain r := Set.disjoint_iff_inter_eq_empty.mp (hs hd) | ||
| revert r | ||
| change s d ∩ s j ≠ ∅ | ||
| rw [← Set.nonempty_iff_ne_empty, Set.nonempty_def] | ||
| exact ⟨i, ⟨e.1, hj⟩⟩ | ||
|
|
||
| lemma Set.indicator_iUnion_of_disjoint [AddCommMonoid β] [TopologicalSpace β] | ||
| (s : δ → Set α) (hs : Pairwise (Disjoint on s)) (f : α → β) (i : α) : | ||
| (⋃ d, s d).indicator f i = ∑' d, (s d).indicator f i := by | ||
| classical | ||
| simp only [Set.indicator, Set.mem_iUnion] | ||
| by_cases h₀ : ∃ d, i ∈ s d <;> simp only [h₀, ↓reduceIte] | ||
| · obtain ⟨j, hj⟩ := h₀ | ||
| rw [← tsum_subtype_eq_of_support_subset (s := {j})] | ||
| · simp only [tsum_fintype, Finset.univ_unique, Set.default_coe_singleton, Finset.sum_singleton, | ||
| left_eq_ite_iff] | ||
| exact fun h ↦ False.elim (h hj) | ||
| · apply (support_subsingleton_of_disjoint f hs i j hj) | ||
| · push_neg at h₀ | ||
| simp_rw [if_neg (h₀ _), tsum_zero] | ||
|
|
||
| open ENNReal MeasureTheory | ||
|
|
||
| namespace MeasureTheory | ||
|
|
||
| /-- A mass function (giving rise to a discrete measure) is a function `α → ℝ≥0∞`. -/ | ||
| def MassFunction (α : Type u) : Type u := α → ℝ≥0∞ | ||
|
|
||
| namespace MassFunction | ||
|
|
||
| instance instFunLike : FunLike (MassFunction α) α ℝ≥0∞ where | ||
| coe p a := p a | ||
| coe_injective' _ _ h := h | ||
|
|
||
| @[ext] | ||
| protected theorem ext {v w : MassFunction α} (h : ∀ x, v x = w x) : v = w := | ||
| DFunLike.ext v w h | ||
|
|
||
| /-- The support of a `MassFunction` is the set where it is nonzero. -/ | ||
| def support (w : MassFunction α) : Set α := Function.support w | ||
|
|
||
| @[simp] | ||
| theorem mem_support_iff (w : MassFunction α) (a : α) : a ∈ w.support ↔ w a ≠ 0 := Iff.rfl | ||
|
|
||
| theorem apply_eq_zero_iff (w : MassFunction α) (a : α) : w a = 0 ↔ a ∉ w.support := by | ||
| rw [mem_support_iff, Classical.not_not] | ||
|
|
||
| theorem apply_pos_iff (w : MassFunction α) (a : α) : 0 < w a ↔ a ∈ w.support := | ||
| pos_iff_ne_zero.trans (w.mem_support_iff a).symm | ||
|
|
||
| /-- The `@Measure α ⊤` as defined through a `MassFunction α` (mass function) through a sum of | ||
| diracs. -/ | ||
| noncomputable def toMeasure (w : MassFunction α) : @Measure α ⊤ := | ||
| Measure.sum (fun a ↦ (w a) • @Measure.dirac α ⊤ a) | ||
ocfnash marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /-- The `@Measure α mα` as defined through a `MassFunction α` (mass function) through a sum of | ||
| diracs, using a given `MeasurableSpace α`. -/ | ||
| noncomputable def toMeasure' (w : MassFunction α) (mα : MeasurableSpace α) : Measure[mα] α := | ||
| Measure.sum (fun a ↦ (w a) • @Measure.dirac α mα a) | ||
|
|
||
| lemma toMeasure_trim_eq_toMeasure' (w : MassFunction α) [mα : MeasurableSpace α] : | ||
| (w.toMeasure).trim (le_top) = w.toMeasure' mα := by | ||
| ext s hs | ||
| rw [trim_measurableSet_eq _ hs, toMeasure, toMeasure', sum_apply _ hs, | ||
| sum_apply _ MeasurableSpace.measurableSet_top] | ||
| simp_rw [smul_apply] | ||
| apply tsum_congr fun b ↦ ?_ | ||
| congr 1 | ||
| simp only [dirac_apply', MeasurableSpace.measurableSet_top] | ||
| rw [dirac_apply' _ hs] | ||
|
|
||
| lemma toMeasure_apply (μ : MassFunction α) (s : Set α) : | ||
| μ.toMeasure s = ∑' (i : α), μ i * s.indicator 1 i := by | ||
| simp [toMeasure] | ||
|
|
||
| lemma toMeasure_apply₁ (μ : MassFunction α) (s : Set α) : | ||
| μ.toMeasure s = ∑' (i : α), s.indicator μ i := by | ||
| simp [toMeasure_apply] | ||
|
|
||
| lemma toMeasure_apply₂ (μ : MassFunction α) (s : Set α) : μ.toMeasure s = ∑' (a : s), (μ a) := by | ||
| simp [toMeasure_apply, tsum_subtype] | ||
|
|
||
| @[simp] | ||
| lemma toMeasure_apply_singleton (μ : MassFunction α) (a : α) : μ.toMeasure {a} = μ a := by | ||
| simp only [toMeasure_apply, Set.indicator.mul_indicator_eq] | ||
| rw [← tsum_subtype, tsum_singleton] | ||
|
|
||
| theorem toMeasure_apply_eq_zero_iff {μ : MassFunction α} {s : Set α} : | ||
| μ.toMeasure s = 0 ↔ Disjoint μ.support s := by | ||
| rw [toMeasure_apply₁, ENNReal.tsum_eq_zero] | ||
| exact funext_iff.symm.trans Set.indicator_eq_zero' | ||
|
|
||
| @[simp] | ||
| theorem toMeasure_apply_inter_support {μ : MassFunction α} {s : Set α} : | ||
| μ.toMeasure (s ∩ μ.support) = μ.toMeasure s := by | ||
| simp only [toMeasure_apply, support] | ||
| apply tsum_congr (fun a ↦ ?_) | ||
| aesop | ||
|
|
||
| theorem toMeasure_apply_eq_of_inter_support_eq {μ : MassFunction α} {s t : Set α} | ||
| (h : s ∩ μ.support = t ∩ μ.support) : μ.toMeasure s = μ.toMeasure t := by | ||
| rw [← toMeasure_apply_inter_support (s := s), ← toMeasure_apply_inter_support (s := t), h] | ||
|
|
||
| /- Additivity for `μ.toMeasure` for a `μ : MassFunction` not only applies to countable unions, but | ||
| to arbitrary ones. -/ | ||
| lemma toMeasure_additive (μ : MassFunction α) (s : δ → Set α) (hs : Pairwise (Disjoint on s)) : | ||
| μ.toMeasure (⋃ d, s d) = ∑' (d : δ), μ.toMeasure (s d) := by | ||
| simp only [toMeasure_apply, Set.indicator.mul_indicator_eq] | ||
| rw [ENNReal.tsum_comm] | ||
| exact tsum_congr (fun b ↦ Set.indicator_iUnion_of_disjoint s hs μ b) | ||
|
|
||
| theorem toMeasure_apply_finset {μ : MassFunction α} (s : Finset α) : μ.toMeasure s = ∑ x ∈ s, μ x | ||
| := by | ||
| rw [toMeasure_apply₁, tsum_eq_sum (s := s)] | ||
| · exact Finset.sum_indicator_subset μ fun ⦃a⦄ a_1 => a_1 | ||
| · exact fun b a => Set.indicator_of_notMem a μ | ||
|
|
||
| @[simp] | ||
| theorem toMeasure_apply_fintype {μ : MassFunction α} (s : Set α) [Fintype α] : | ||
| μ.toMeasure s = ∑ x, s.indicator μ x := by | ||
| rw [toMeasure_apply₁] | ||
| exact tsum_fintype (s.indicator μ) | ||
|
|
||
| lemma toMeasure_apply_univ (μ : MassFunction α) : μ.toMeasure Set.univ = ∑' (a : α), μ a := by | ||
| simp [toMeasure_apply] | ||
|
|
||
| lemma toMeasure_apply_univ' (μ : MassFunction α) (s : δ → Set α) (hs₀ : Pairwise (Disjoint on s)) | ||
| (hs₁ : Set.univ = ⋃ d, s d) : μ.toMeasure Set.univ = ∑' (d : δ), μ.toMeasure (s d) := by | ||
| rw [hs₁] | ||
| exact toMeasure_additive μ s hs₀ | ||
|
|
||
| theorem toMeasure_injective : (toMeasure : MassFunction α → @Measure α ⊤).Injective := by | ||
| intro μ ν h | ||
| ext x | ||
| rw [← toMeasure_apply_singleton μ, ← toMeasure_apply_singleton ν, h] | ||
|
|
||
| @[simp] | ||
| theorem toMeasure_inj {μ ν : MassFunction α} : μ.toMeasure = ν.toMeasure ↔ μ = ν := | ||
| toMeasure_injective.eq_iff | ||
|
|
||
| theorem toMeasure_ext {μ ν : MassFunction α} (h : μ.toMeasure = ν.toMeasure) : μ = ν := | ||
| toMeasure_inj.mp h | ||
|
|
||
| theorem toMeasure_mono {s t : Set α} {μ : MassFunction α} (h : s ∩ μ.support ⊆ t) : | ||
| μ.toMeasure s ≤ μ.toMeasure t := by | ||
| rw [← μ.toMeasure_apply_inter_support] | ||
| exact OuterMeasureClass.measure_mono μ.toMeasure h | ||
|
|
||
| @[simp] | ||
| theorem restrict_toMeasure_support {μ : MassFunction α} : | ||
| μ.toMeasure.restrict μ.support = μ.toMeasure := by | ||
| apply @Measure.ext α ⊤ | ||
| intro s hs | ||
| rw [Measure.restrict_apply hs, μ.toMeasure_apply_inter_support] | ||
|
|
||
| end MassFunction | ||
|
|
||
| end MeasureTheory | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.