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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5239,6 +5239,7 @@ public import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls
public import Mathlib.MeasureTheory.Measure.LevyProkhorovMetric
public import Mathlib.MeasureTheory.Measure.LogLikelihoodRatio
public import Mathlib.MeasureTheory.Measure.Map
public import Mathlib.MeasureTheory.Measure.MassFunction
public import Mathlib.MeasureTheory.Measure.MeasureSpace
public import Mathlib.MeasureTheory.Measure.MeasureSpaceDef
public import Mathlib.MeasureTheory.Measure.MeasuredSets
Expand Down
6 changes: 6 additions & 0 deletions Mathlib/Algebra/GroupWithZero/Indicator.lean
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ lemma indicator_eq_one_iff_mem : indicator s 1 i = (1 : M₀) ↔ i ∈ s := by
lemma indicator_one_inj (h : indicator s (1 : ι → M₀) = indicator t 1) : s = t := by
ext; simp_rw [← indicator_eq_one_iff_mem M₀, h]

omit [Nontrivial M₀] in
@[simp]
lemma indicator.mul_indicator_eq (f : ι → M₀) (a : ι) :
f a * s.indicator 1 a = s.indicator f a := by
simp only [Set.indicator, mul_ite, Pi.one_apply, mul_one, mul_zero]

end MulZeroOneClass
end Set

Expand Down
14 changes: 14 additions & 0 deletions Mathlib/Data/Set/Pairwise/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -433,3 +433,17 @@ lemma subsingleton_setOf_mem_iff_pairwise_disjoint {f : ι → Set α} :

lemma pairwise_ne_iff_injective {f : ι → α} : Pairwise (fun i j ↦ f i ≠ f j) ↔ f.Injective := by
simp

section subtype

lemma Set.PairwiseDisjoint.singleton_subtype' (s : Set α) :
Pairwise (Disjoint on fun (x : s) => ({x.val} : Set α)) := by
intro a b hab
simp_rw [Set.disjoint_singleton_left, Set.mem_singleton_iff, Subtype.coe_ne_coe.mpr hab,
not_false_eq_true]

lemma Set.PairwiseDisjoint.fiber_subtype {g : α → β} (s : Set β) :
Pairwise (Disjoint on fun (x : s) => (g⁻¹' {x.val} : Set α)) :=
fun _ _ hab ↦ pairwise_disjoint_fiber g (Subtype.coe_ne_coe.mpr hab)

end subtype
203 changes: 203 additions & 0 deletions Mathlib/MeasureTheory/Measure/MassFunction.lean
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)

/-- 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
Loading