Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
5bb80b1
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Apr 14, 2025
2e56408
Update lean-toolchain for https://github.com/leanprover/lean4/pull/7965
leanprover-community-mathlib4-bot Oct 10, 2025
823dc94
Update toolchain & lake update
TwoFX Nov 25, 2025
33d633f
Update aesop
TwoFX Nov 25, 2025
e1bbe54
partial lake update
TwoFX Nov 25, 2025
21e03c7
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Nov 25, 2025
7c2608b
fix: remove compile_inductive% override for False.rec and Empty.rec
Rob23oba Nov 25, 2025
718be31
lake update
TwoFX Nov 25, 2025
b416a0d
lake update
TwoFX Nov 25, 2025
424d6ad
Fixes
TwoFX Nov 25, 2025
f200d43
Update lean-toolchain for https://github.com/leanprover/lean4/pull/7965
leanprover-community-mathlib4-bot Nov 25, 2025
931227a
Update lean-toolchain for https://github.com/leanprover/lean4/pull/7965
leanprover-community-mathlib4-bot Nov 25, 2025
69f7ed6
Merge master into nightly-testing
leanprover-community-mathlib4-bot Nov 26, 2025
5e416f6
deprecation
kim-em Nov 26, 2025
acd5056
chore: bump to nightly-2025-11-26
leanprover-community-mathlib4-bot Nov 26, 2025
1ea88e4
merge lean-pr-testing-11357
invalid-email-address Nov 26, 2025
9ce81b1
Merge master into nightly-testing
leanprover-community-mathlib4-bot Nov 27, 2025
90249a6
chore: bump to nightly-2025-11-27
leanprover-community-mathlib4-bot Nov 27, 2025
a33d629
Reset proofwidgets dependency
kim-em Nov 27, 2025
d6e7ecf
merge lean-pr-testing-10204
kim-em Nov 27, 2025
ff76558
bump ProofWidfgets
kim-em Nov 27, 2025
94994c5
deal with string changes in Linter/EmptyLine
kim-em Nov 27, 2025
07a6ea2
bad merge?
kim-em Nov 27, 2025
a3ad327
fix bad merge?
kim-em Nov 27, 2025
c27c923
fix merge:
kim-em Nov 27, 2025
b0a6d91
deprecations
kim-em Nov 27, 2025
f5fef01
deprecations
kim-em Nov 27, 2025
e142c62
deprecations
kim-em Nov 27, 2025
b0b7015
Reset manifest
nomeata Nov 27, 2025
4c80d29
Horrible work-around for changes due to https://github.com/leanprover…
nomeata Nov 27, 2025
49ee5a6
Less horrible fix using -implicitDefEqProofs
nomeata Nov 27, 2025
a9faeaa
Merge master into nightly-testing
leanprover-community-mathlib4-bot Nov 28, 2025
b1ccddb
replace a failing grind with norm_num; it's been minimized and report…
kim-em Nov 28, 2025
4481ab6
deprecations
kim-em Nov 28, 2025
42c6ec6
another adaptation note
kim-em Nov 28, 2025
53ef18c
Merge commit '42c6ec6c6d7049b7b774bad2ee7b91c789e01fa8' into bump/nig…
kim-em Nov 28, 2025
3592282
chore: adaptations for nightly-2025-11-27
kim-em Nov 28, 2025
e15fb6b
Update lean-toolchain for https://github.com/leanprover/lean4/pull/7965
leanprover-community-mathlib4-bot Nov 28, 2025
7c9c942
Fix proof widets (https://github.com/leanprover/lean4/pull/7965)
nomeata Nov 28, 2025
ab5b3c8
Update lean-toolchain for https://github.com/leanprover/lean4/pull/7965
leanprover-community-mathlib4-bot Nov 28, 2025
66b533b
chore: bump to nightly-2025-11-28
leanprover-community-mathlib4-bot Nov 28, 2025
2550f7e
Merge master into nightly-testing
leanprover-community-mathlib4-bot Nov 29, 2025
bfe3779
chore: revert adaptation notes for lean4#11410
kim-em Nov 29, 2025
b3687cd
chore: revert adaptation notes for lean4#11009
kim-em Nov 29, 2025
9d1030d
chore: bump to nightly-2025-11-29
leanprover-community-mathlib4-bot Nov 29, 2025
ae8e7b6
Merge master into nightly-testing
leanprover-community-mathlib4-bot Nov 30, 2025
7d99553
chore: bump to nightly-2025-11-30
leanprover-community-mathlib4-bot Nov 30, 2025
2f5a01d
chore: fix deprecation warnings (#129)
kim-em Nov 30, 2025
f5d4df1
fix
kim-em Nov 30, 2025
3fdd607
fixes for flexible linter
kim-em Nov 30, 2025
2bd1b8f
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 1, 2025
2100ee6
chore: bump to nightly-2025-12-01
leanprover-community-mathlib4-bot Dec 1, 2025
29a30dd
Update lean-toolchain for https://github.com/leanprover/lean4/pull/7965
leanprover-community-mathlib4-bot Dec 1, 2025
1f0482d
chore: adaptations for nightly-2025-12-01
kim-em Dec 1, 2025
430c5b4
merge bump/nightly-2025-12-01
kim-em Dec 1, 2025
25e5959
merge lean-pr-testing-11240
invalid-email-address Dec 1, 2025
d82e7a6
restore Mathlib/Algebra/Order/Group/Unbundled/Int.lean
kim-em Dec 1, 2025
ba92eea
restore Mathlib/Data/List/Chain.lean
kim-em Dec 1, 2025
fb74640
merge
kim-em Dec 1, 2025
871f8b1
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 2, 2025
dea6b8c
fix duplication from bad merge
kim-em Dec 2, 2025
e9941d0
fix bad merge
kim-em Dec 2, 2025
4ced090
chore: bump to nightly-2025-12-02
leanprover-community-mathlib4-bot Dec 2, 2025
ff1b41e
merge lean-pr-testing-7965
invalid-email-address Dec 2, 2025
6b38b2e
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Dec 2, 2025
057de64
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Dec 2, 2025
bc7fe68
Adapt to https://github.com/leanprover/lean4/pull/11474
nomeata Dec 2, 2025
6cd6fe9
Adapt to https://github.com/leanprover/lean4/pull/11474 (import all)
nomeata Dec 2, 2025
1d201bc
LibraryRewrite strikes again
datokrat Dec 2, 2025
a1a134f
Update lean-toolchain for https://github.com/leanprover/lean4/pull/11474
leanprover-community-mathlib4-bot Dec 2, 2025
56b8972
lake update Qq
kim-em Dec 2, 2025
4c7a6b2
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 3, 2025
6a8c1d8
.
kim-em Dec 3, 2025
5bfa162
fix merge
kim-em Dec 3, 2025
9c004d1
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Dec 3, 2025
9b3e347
chore: bump to nightly-2025-12-03
leanprover-community-mathlib4-bot Dec 3, 2025
e8eda6e
merge lean-pr-testing-11474
invalid-email-address Dec 3, 2025
2ec4508
fix
eric-wieser Dec 4, 2025
2dc0707
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 4, 2025
453cce8
update test
kim-em Dec 4, 2025
5d39138
update test
kim-em Dec 4, 2025
47232c8
lake update aesop
kim-em Dec 4, 2025
8a92767
chore: adaptations for nightly-2025-12-03
kim-em Dec 4, 2025
a245b73
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Dec 4, 2025
42f7d9c
chore: bump to nightly-2025-12-04
leanprover-community-mathlib4-bot Dec 4, 2025
567210c
add test
kim-em Dec 4, 2025
e0a4c9e
chore: adaptations for nightly-2025-12-04
kim-em Dec 5, 2025
96d98dd
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 5, 2025
85213d9
fix
kim-em Dec 5, 2025
31b7d82
Merge branch 'nightly-testing' of github.com:leanprover-community/mat…
kim-em Dec 5, 2025
74562be
chore: bump to nightly-2025-12-05
leanprover-community-mathlib4-bot Dec 5, 2025
175920e
merge lean-pr-testing-11321
invalid-email-address Dec 5, 2025
8dcceef
merge lean-pr-testing-11494
invalid-email-address Dec 5, 2025
d8fd1eb
Kick CI
nomeata Dec 5, 2025
a3f0e4f
Remove theorems now defined in core
nomeata Dec 5, 2025
ce00192
Please linter
nomeata Dec 5, 2025
beb1a1d
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 6, 2025
ed79179
chore: bump to nightly-2025-12-06
leanprover-community-mathlib4-bot Dec 6, 2025
f7826d3
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 7, 2025
ab1ad83
remove strary import
kim-em Dec 7, 2025
c1ec86e
deprecation
kim-em Dec 7, 2025
6d57538
fixes
kim-em Dec 7, 2025
1a5ba23
deprecation
kim-em Dec 7, 2025
dce50d0
chore: bump to nightly-2025-12-07
leanprover-community-mathlib4-bot Dec 7, 2025
f83e6b6
deprecation
kim-em Dec 7, 2025
5fa4f5c
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 8, 2025
e01f3aa
merge bump/v4.27.0
kim-em Dec 8, 2025
a24942c
merge
kim-em Dec 8, 2025
ba30ccc
merge
kim-em Dec 8, 2025
875db32
chore: bump to nightly-2025-12-08
leanprover-community-mathlib4-bot Dec 8, 2025
f96fb5a
lake update
kim-em Dec 8, 2025
64d8fd3
lake update
kim-em Dec 8, 2025
3e161e7
chore: adaptations for nightly-2025-12-08
kim-em Dec 9, 2025
77c6d93
chore: adaptations for nightly-2025-12-08
kim-em Dec 9, 2025
67c9a74
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 9, 2025
09937a1
chore: revert FinRange.lean to master
kim-em Dec 9, 2025
03ba5b1
revert: unnecessary adaptation to Small.lean
kim-em Dec 9, 2025
3fca82c
revert: remove unnecessary .eq_1 in Small.lean
kim-em Dec 9, 2025
7ce3f26
Merge branch 'bump/nightly-2025-12-08' into nightly-testing
kim-em Dec 9, 2025
0ba3b88
deprecation
kim-em Dec 9, 2025
2d4b102
chore: lake update importGraph
kim-em Dec 9, 2025
bbf1f53
chore: bump to nightly-2025-12-09
leanprover-community-mathlib4-bot Dec 9, 2025
d04a634
chore: adaptations for nightly-2025-12-09
Dec 9, 2025
d521203
Merge commit 'bbf1f53abe6a2fbb5d33d72a5ef0bec27e493ec5' into bump/nig…
Dec 9, 2025
a588114
chore: adaptations for nightly-2025-12-09
Dec 9, 2025
7390809
Merge branch 'bump/nightly-2025-12-09' into nightly-testing
Dec 9, 2025
cc425d8
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Dec 9, 2025
f7f11d8
Adapt to https://github.com/leanprover/lean4/pull/11562
nomeata Dec 9, 2025
a1e8445
merge master
kim-em Dec 9, 2025
dbe837b
fix(TextBased): use endPos instead of rawEndPos
kim-em Dec 9, 2025
ab7a8db
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 10, 2025
03d33bd
deprecation in lakefile
kim-em Dec 10, 2025
25918fa
chore: bump to nightly-2025-12-10
leanprover-community-mathlib4-bot Dec 10, 2025
83fa02b
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Dec 10, 2025
148dc61
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Dec 10, 2025
34527c1
chore: adaptations for nightly-2025-12-10
kim-em Dec 10, 2025
a0d62f5
Auto-resolved conflicts in lean-toolchain and lake-manifest.json
kim-em Dec 10, 2025
b4470de
chore: adaptations for nightly-2025-12-10
kim-em Dec 10, 2025
db12a4c
Auto-resolved conflicts in lean-toolchain and lake-manifest.json
kim-em Dec 10, 2025
cc46b34
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 11, 2025
522f580
fix for leanprover/lean4#11581
kim-em Dec 11, 2025
39dacb0
deprecation
kim-em Dec 11, 2025
35e5c59
remove unused argument
kim-em Dec 11, 2025
4dbfc6d
Merge branch 'bump/nightly-2025-12-10' into nightly-testing
kim-em Dec 11, 2025
249f247
merge
kim-em Dec 11, 2025
6696d58
fix deprecation in mk_all
kim-em Dec 11, 2025
fb21b43
Merge commit '25918fa625b53957490426f591c8f7efe477fe0d' into bump/nig…
Dec 11, 2025
c804a33
chore: adaptations for nightly-2025-12-10
Dec 11, 2025
371eac1
Auto-resolved conflicts in lean-toolchain and lake-manifest.json
Dec 11, 2025
35fa128
chore: bump to nightly-2025-12-11
leanprover-community-mathlib4-bot Dec 11, 2025
513ae5c
merge lean-pr-testing-11490
invalid-email-address Dec 11, 2025
99dc419
merge lean-pr-testing-11562
invalid-email-address Dec 11, 2025
fbd0d7c
merge lean-pr-testing-11581
invalid-email-address Dec 11, 2025
ee135c1
Kick CI
nomeata Dec 11, 2025
9aedaa2
lake update
kim-em Dec 11, 2025
bf20145
fix deps
Kha Dec 11, 2025
e589041
remove upstreamed
kim-em Dec 11, 2025
517d0ec
workaround
kim-em Dec 11, 2025
fc5f646
fix
Kha Dec 11, 2025
0e01e94
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 12, 2025
862da6f
chore: bump to nightly-2025-12-12
leanprover-community-mathlib4-bot Dec 12, 2025
c49c6fc
Update lean-toolchain for testing https://github.com/leanprover/lean4…
leanprover-community-mathlib4-bot Dec 12, 2025
73dcb81
more fix
Kha Dec 12, 2025
1a6e7c7
fix the fix
Kha Dec 12, 2025
b9d27c2
lake update
kim-em Dec 12, 2025
3dc6a53
adding a prime to NameMapExtension
kim-em Dec 12, 2025
3b118ae
Merge remote-tracking branch 'origin/master' into nightly-testing
Ruben-VandeVelde Dec 12, 2025
4f59b5c
adaptations for leanprover/lean4#11620
kim-em Dec 12, 2025
a43628d
revert spurious change
Ruben-VandeVelde Dec 12, 2025
af72668
warning
Ruben-VandeVelde Dec 12, 2025
b62a16d
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 13, 2025
65965e9
fixes
kim-em Dec 13, 2025
653a7b8
fix
kim-em Dec 13, 2025
9b2a093
deprecations
kim-em Dec 13, 2025
f307418
chore: bump to nightly-2025-12-13
leanprover-community-mathlib4-bot Dec 13, 2025
71e1058
merge lean-pr-testing-11587
leanprover-community-mathlib4-bot Dec 13, 2025
2cb7523
merge lean-pr-testing-11620
leanprover-community-mathlib4-bot Dec 13, 2025
62f51b3
lake update
kim-em Dec 13, 2025
f2e157e
lake update
kim-em Dec 13, 2025
cf06366
fix merge
kim-em Dec 13, 2025
7fa953e
revert a lia back to omega
kim-em Dec 13, 2025
d5eddc3
remove upstreamed
kim-em Dec 13, 2025
a3185bb
deprecation
kim-em Dec 13, 2025
04a6b93
fixes
kim-em Dec 13, 2025
72824e4
fix archive
Ruben-VandeVelde Dec 13, 2025
e0e4b37
Merge master into nightly-testing
leanprover-community-mathlib4-bot Dec 14, 2025
0c58827
lint
kim-em Dec 14, 2025
ed6eb20
merge
kim-em Dec 14, 2025
1daec5f
lake update aesop
kim-em Dec 14, 2025
f84a908
chore: adaptations for nightly-2025-12-13
kim-em Dec 14, 2025
c7af53e
remove aliases for upstreamed lemmas
kim-em Dec 14, 2025
d5780ce
deprecation
kim-em Dec 14, 2025
a7967a1
revert a lia back to omega
kim-em Dec 14, 2025
5fead68
chore: adaptations for nightly-2025-12-13
kim-em Dec 14, 2025
6c406a5
cutsat to lia
kim-em Dec 14, 2025
70b0094
merge
kim-em Dec 14, 2025
55efeb5
hm
kim-em Dec 14, 2025
1e29ba2
note
kim-em Dec 14, 2025
866449e
adaptation notes
kim-em Dec 14, 2025
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
2 changes: 1 addition & 1 deletion Archive/Imo/Imo2015Q6.lean
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ lemma pool_subset_Icc : ∀ {t}, pool a t ⊆ Icc 0 2014
| t + 1 => by
intro x hx
simp_rw [pool, mem_map, Equiv.coe_toEmbedding, Equiv.subRight_apply] at hx
obtain ⟨y, my, ey⟩ := hx
obtain ⟨y, my, rfl⟩ := hx
suffices y ∈ Icc 1 2015 by rw [mem_Icc] at this ⊢; lia
rw [mem_insert, mem_erase] at my; rcases my with h | ⟨h₁, h₂⟩
· exact h ▸ ha.1 t
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/GroupWithZero/Torsion.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ theorem IsMulTorsionFree.mk' (ih : ∀ x ≠ 0, ∀ y ≠ 0, ∀ n ≠ 0, (x ^ n
refine ⟨fun n hn x y hxy ↦ ?_⟩
by_cases h : x ≠ 0 ∧ y ≠ 0
· exact ih x h.1 y h.2 n hn hxy
grind [pow_eq_zero, zero_pow]
grind [eq_zero_of_pow_eq_zero, zero_pow]

variable [UniqueFactorizationMonoid M] [NormalizationMonoid M] [IsMulTorsionFree Mˣ]

Expand Down
13 changes: 12 additions & 1 deletion Mathlib/Algebra/Polynomial/Coeff.lean
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,18 @@ end Fewnomials
theorem coeff_mul_X_pow (p : R[X]) (n d : ℕ) :
coeff (p * Polynomial.X ^ n) (d + n) = coeff p d := by
rw [coeff_mul, Finset.sum_eq_single (d, n), coeff_X_pow, if_pos rfl, mul_one]
all_goals grind [mem_antidiagonal, mul_zero]
#adaptation_note
/--
It may be possible to change this back to
`all_goals grind [mem_antidiagonal, mul_zero]`
on nightly-2025-12-14 (or ideally without needing the `mul_zero`),
but if not just remove this note.
The proof by `grind` is a hack, doing arithmetic reasoning (i.e. `mul_zero`) by e-matching.
-/
· rintro ⟨i, j⟩ h1 h2
rw [coeff_X_pow, if_neg, mul_zero]
grind [mem_antidiagonal]
· grind [mem_antidiagonal]

@[simp]
theorem coeff_X_pow_mul (p : R[X]) (n d : ℕ) :
Expand Down
10 changes: 9 additions & 1 deletion Mathlib/Algebra/Polynomial/RuleOfSigns.lean
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,15 @@ theorem succ_signVariations_le_X_sub_C_mul (hη : 0 < η) (hP : P ≠ 0) :
· --P is zero degree, therefore a constant.
have hcQ : 0 < coeff P 0 := by grind [leadingCoeff]
have hxcQ : coeff ((X - C η) * P) 1 = coeff P 0 := by
grind [coeff_X_sub_C_mul, mul_zero, coeff_eq_zero_of_natDegree_lt]
#adaptation_note
/--
It may be possible to change this back to
`grind [coeff_X_sub_C_mul, mul_zero, coeff_eq_zero_of_natDegree_lt]`
on nightly-2025-12-14 (or ideally without needing the `mul_zero`),
but if not just remove this note.
The proof by `grind` is a hack, doing arithmetic reasoning (i.e. `mul_zero`) by e-matching.
-/
simp_all [coeff_X_sub_C_mul, coeff_eq_zero_of_natDegree_lt]
dsimp [signVariations, coeffList]
rw [withBotSucc_degree_eq_natDegree_add_one hP, withBotSucc_degree_eq_natDegree_add_one h_mul]
simp [h_deg_mul, hxcQ, hη, hcQ, hd, List.range_succ]
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/AlgebraicTopology/SimplicialSet/Path.lean
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def mk₂ {n : ℕ} {X : Truncated.{u} (n + 1)} (p q : X.Path 1)

/-- For `j + l ≤ m`, a path of length `m` restricts to a path of length `l`, namely
the subpath spanned by the vertices `j ≤ i ≤ j + l` and edges `j ≤ i < j + l`. -/
def interval (f : Path X m) (j l : ℕ) (h : j + l ≤ m := by lia) : Path X l where
def interval (f : Path X m) (j l : ℕ) (h : j + l ≤ m := by omega) : Path X l where
vertex i := f.vertex ⟨j + i, by lia⟩
arrow i := f.arrow ⟨j + i, by lia⟩
arrow_src i := f.arrow_src ⟨j + i, by lia⟩
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ lemma cfcₙHom_eq_cfcₙ_extend {a : A} (g : R → R) (ha : p a) (f : C(σₙ R
have hg0 : (Function.extend Subtype.val f g) 0 = 0 := by
rw [← quasispectrum.coe_zero (R := R) a, Subtype.val_injective.extend_apply]
exact map_zero f
generalize Function.extend Subtype.val f g = f' at *
rw [cfcₙ_apply ..]
congr!

Expand Down
10 changes: 5 additions & 5 deletions Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ variable {J : Type w}
inductive WalkingParallelFamily (J : Type w) : Type w
| zero : WalkingParallelFamily J
| one : WalkingParallelFamily J
deriving Inhabited

open WalkingParallelFamily

-- We do not use `deriving DecidableEq` here
-- because it generates an instance with unnecessary hypotheses.
instance : DecidableEq (WalkingParallelFamily J)
| zero, zero => isTrue rfl
| zero, one => isFalse fun t => WalkingParallelFamily.noConfusion t
| one, zero => isFalse fun t => WalkingParallelFamily.noConfusion t
| zero, one => isFalse fun t => by grind
| one, zero => isFalse fun t => by grind
| one, one => isTrue rfl

instance : Inhabited (WalkingParallelFamily J) :=
⟨zero⟩

-- Don't generate unnecessary `sizeOf_spec` lemma which the `simpNF` linter will complain about.
set_option genSizeOfSpec false in
/-- The type family of morphisms for the diagram indexing a wide (co)equalizer. -/
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/CategoryTheory/Shift/CommShiftTwo.lean
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ noncomputable def CommShift₂Setup.int [Preadditive D] [HasShift D ℤ]
assoc _ _ _ := by
dsimp
rw [← zpow_add, ← zpow_add]
cutsat
lia
commShift _ _ := ⟨by cat_disch⟩
ε p q := (-1) ^ (p * q)

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Combinatorics/Quiver/Path.lean
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def decidableEqBddPathsOfDecidableEq (n : ℕ) (h₁ : DecidableEq V)
| _, _, .nil, .nil => isTrue rfl
| _, _, .nil, .cons _ _
| _, _, .cons _ _, .nil =>
isFalse fun h => Quiver.Path.noConfusion rfl (heq_of_eq (Subtype.mk.inj h))
isFalse fun h => Quiver.Path.noConfusion rfl .rfl .rfl .rfl (heq_of_eq (Subtype.mk.inj h))
| _, _, .cons (b := v') p' α, .cons (b := v'') q' β =>
match v', v'', h₁ v' v'' with
| _, _, isTrue (Eq.refl _) =>
Expand Down
52 changes: 0 additions & 52 deletions Mathlib/Control/Lawful.lean
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ section

variable {σ : Type u} {m : Type u → Type v} {α β : Type u}

/--
`StateT` doesn't require a constructor, but it appears confusing to declare the
following theorem as a simp theorem.
```lean
@[simp]
theorem run_fun (f : σ → m (α × σ)) (st : σ) : StateT.run (fun s => f s) st = f st :=
rfl
```
If we declare this theorem as a simp theorem, `StateT.run f st` is simplified to `f st` by eta
reduction. This breaks the structure of `StateT`.
So, we declare a constructor-like definition `StateT.mk` and a simp theorem for it.
-/
protected def mk (f : σ → m (α × σ)) : StateT σ m α := f

@[simp]
theorem run_mk (f : σ → m (α × σ)) (st : σ) : StateT.run (StateT.mk f) st = f st :=
rfl

/-- A copy of `LawfulFunctor.map_const` for `StateT` that holds even if `m` is not lawful. -/
protected lemma map_const [Monad m] :
(Functor.mapConst : α → StateT σ m β → StateT σ m α) = Functor.map ∘ Function.const β :=
Expand All @@ -62,38 +44,4 @@ theorem run_monadLift {n} [Monad m] [MonadLiftT n m] (x : n α) :
(monadLift x : ExceptT ε m α).run = Except.ok <$> (monadLift x : m α) :=
rfl

@[simp]
theorem run_monadMap {n} [MonadFunctorT n m] (f : ∀ {α}, n α → n α) :
(monadMap (@f) x : ExceptT ε m α).run = monadMap (@f) x.run :=
rfl

end ExceptT

namespace ReaderT

section

variable {m : Type u → Type v}
variable {α σ : Type u}

/--
`ReaderT` doesn't require a constructor, but it appears confusing to declare the
following theorem as a simp theorem.
```lean
@[simp]
theorem run_fun (f : σ → m α) (r : σ) : ReaderT.run (fun r' => f r') r = f r :=
rfl
```
If we declare this theorem as a simp theorem, `ReaderT.run f st` is simplified to `f st` by eta
reduction. This breaks the structure of `ReaderT`.
So, we declare a constructor-like definition `ReaderT.mk` and a simp theorem for it.
-/
protected def mk (f : σ → m α) : ReaderT σ m α := f

@[simp]
theorem run_mk (f : σ → m α) (r : σ) : ReaderT.run (ReaderT.mk f) r = f r :=
rfl

end

end ReaderT
24 changes: 22 additions & 2 deletions Mathlib/Data/ENNReal/Inv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,29 @@ protected theorem div_le_iff' {x y z : ℝ≥0∞} (h1 : y ≠ 0) (h2 : y ≠
protected theorem mul_inv {a b : ℝ≥0∞} (ha : a ≠ 0 ∨ b ≠ ∞) (hb : a ≠ ∞ ∨ b ≠ 0) :
(a * b)⁻¹ = a⁻¹ * b⁻¹ := by
cases b
case top => grind [mul_top, mul_zero, inv_top, ENNReal.inv_eq_zero]
case top =>
#adaptation_note
/--
It may be possible to change this back to
`grind [mul_top, mul_zero, inv_top, ENNReal.inv_eq_zero]`
on nightly-2025-12-14 (or ideally without needing the `mul_zero`),
but if not just remove this note.
The proof by `grind` is a hack, doing arithmetic reasoning (i.e. `mul_zero`) by e-matching.
-/
simp_all only [Ne, not_true_eq_false, or_false, top_ne_zero, not_false_eq_true, or_true,
mul_top, inv_top, mul_zero]
cases a
case top => grind [top_mul, zero_mul, inv_top, ENNReal.inv_eq_zero]
case top =>
#adaptation_note
/--
It may be possible to change this back to
`grind [top_mul, zero_mul, inv_top, ENNReal.inv_eq_zero]`
on nightly-2025-12-14 (or ideally without needing the `zero_mul`),
but if not just remove this note.
The proof by `grind` is a hack, doing arithmetic reasoning (i.e. `zero_mul`) by e-matching.
-/
simp_all only [Ne, top_ne_zero, not_false_eq_true, coe_ne_top, or_self, not_true_eq_false,
coe_eq_zero, false_or, top_mul, inv_top, zero_mul]
grind [_=_ coe_mul, coe_zero, inv_zero, = mul_inv, coe_ne_top, ENNReal.inv_eq_zero,
=_ coe_inv, zero_mul, = mul_eq_zero, mul_top, mul_zero, top_mul]

Expand Down
13 changes: 0 additions & 13 deletions Mathlib/Data/Fin/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ assert_not_exists Monoid Finset

open Fin Nat Function

namespace Fin
protected alias val_sub := Fin.coe_sub
alias val_neg' := Fin.coe_neg
alias val_castSucc := coe_castSucc
alias val_castAdd := coe_castAdd
alias val_cast := coe_cast
alias val_castLT := coe_castLT
alias val_castLE := coe_castLE
alias val_natAdd := coe_natAdd
alias val_pred := coe_pred
alias val_subNat := coe_subNat
end Fin

attribute [simp] Fin.succ_ne_zero Fin.castSucc_lt_last

theorem Nat.forall_lt_iff_fin {n : ℕ} {p : ∀ k, k < n → Prop} :
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Fin/SuccPred.lean
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ theorem succAbove_succAbove_succAbove_predAbove {n : ℕ}
by saying that both functions are strictly monotone and have the same range `{i, i.succAbove j}ᶜ`,
we give a direct proof by case analysis to avoid extra dependencies. -/
ext
simp only [succAbove, predAbove, lt_def, val_castSucc, apply_dite Fin.val, coe_pred, coe_castPred,
simp only [succAbove, predAbove, lt_def, val_castSucc, apply_dite Fin.val, val_pred, coe_castPred,
dite_eq_ite, apply_ite Fin.val, val_succ]
split_ifs <;> lia

Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Data/Fin/VecNotation.lean
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ open Lean Qq
`let ⟨xs, tailn, tail⟩ ← matchVecConsPrefix n e` decomposes `e : Fin n → _` in the form
`vecCons x₀ <| ... <| vecCons xₙ <| tail` where `tail : Fin tailn → _`. -/
meta def matchVecConsPrefix (n : Q(Nat)) (e : Expr) : MetaM <| List Expr × Q(Nat) × Expr := do
meta partial def matchVecConsPrefix (n : Q(Nat)) (e : Expr) :
MetaM <| List Expr × Q(Nat) × Expr := do
match_expr ← Meta.whnfR e with
| Matrix.vecCons _ n x xs => do
let (elems, n', tail) ← matchVecConsPrefix n xs
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Int/Interval.lean
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ instance instLocallyFiniteOrder : LocallyFiniteOrder ℤ where
· lia
· intro
use (x - (a + 1)).toNat
lia
omega
finset_mem_Ioo a b x := by
simp_rw [mem_map, mem_range, Function.Embedding.trans_apply, Nat.castEmbedding_apply,
addLeftEmbedding_apply]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Data/List/Cycle.lean
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ theorem next_eq_getElem {l : List α} {a : α} (ha : a ∈ l) :

theorem next_getElem (l : List α) (h : Nodup l) (i : Nat) (hi : i < l.length) :
l.next l[i] (get_mem ..) = l[(i + 1) % l.length]'(Nat.mod_lt _ (i.zero_le.trans_lt hi)) := by
grind [next_eq_getElem, idxOf_getElem]
grind [next_eq_getElem]

theorem prev_eq_getElem?_idxOf_pred_of_ne_head {l : List α} {a : α} (ha : a ∈ l)
(ha₀ : a ≠ l.head (ne_nil_of_mem ha)) : l.prev a ha = l[l.idxOf a - 1]? := by
Expand Down Expand Up @@ -338,7 +338,7 @@ theorem prev_eq_getElem {l : List α} {a : α} (ha : a ∈ l) :

theorem prev_getElem (l : List α) (h : Nodup l) (i : Nat) (hi : i < l.length) :
l.prev l[i] (get_mem ..) = l[(i + (l.length - 1)) % l.length]'(Nat.mod_lt _ (by lia)) := by
grind [prev_eq_getElem, idxOf_getElem]
grind [prev_eq_getElem]

@[simp]
theorem next_getLast_eq_head (l : List α) (h : l ≠ []) (hn : l.Nodup) :
Expand Down
7 changes: 4 additions & 3 deletions Mathlib/Data/List/Infix.lean
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ theorem mem_inits : ∀ s t : List α, s ∈ inits t ↔ s <+: t
match s, mi with
| [], ⟨_, rfl⟩ => Or.inl rfl
| b :: s, ⟨r, hr⟩ =>
(List.noConfusion hr) fun ba (st : s ++ r = t) =>
Or.inr <| by rw [ba]; exact ⟨_, (mem_inits _ _).2 ⟨_, st⟩, rfl⟩⟩
(List.noConfusion rfl (heq_of_eq hr)) fun ba (st : s ++ r t) =>
Or.inr <| by rw [eq_of_heq ba]; exact ⟨_, (mem_inits _ _).2 ⟨_, eq_of_heq st⟩, rfl⟩⟩

@[simp]
theorem mem_tails : ∀ s t : List α, s ∈ tails t ↔ s <:+ t
Expand All @@ -222,7 +222,8 @@ theorem mem_tails : ∀ s t : List α, s ∈ tails t ↔ s <:+ t
fun e =>
match s, t, e with
| _, t, ⟨[], rfl⟩ => Or.inl rfl
| s, t, ⟨b :: l, he⟩ => List.noConfusion he fun _ lt => Or.inr ⟨l, lt⟩⟩
| s, t, ⟨b :: l, he⟩ =>
List.noConfusion rfl (heq_of_eq he) fun _ lt => Or.inr ⟨l, eq_of_heq lt⟩⟩

theorem inits_cons (a : α) (l : List α) : inits (a :: l) = [] :: l.inits.map fun t => a :: t := by
simp
Expand Down
1 change: 0 additions & 1 deletion Mathlib/Data/Nat/Find.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module

public import Mathlib.Data.Nat.Basic
public import Mathlib.Tactic.Push
public import Batteries.WF

/-!
# `Nat.find` and `Nat.findGreatest`
Expand Down
1 change: 0 additions & 1 deletion Mathlib/Data/PFun.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Authors: Mario Carneiro, Jeremy Avigad, Simon Hudon
-/
module

public import Batteries.WF
public import Batteries.Tactic.GeneralizeProofs
public import Mathlib.Data.Part
public import Mathlib.Data.Rel
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Part.lean
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def ofOption : Option α → Part α

@[simp]
theorem mem_ofOption {a : α} : ∀ {o : Option α}, a ∈ ofOption o ↔ a ∈ o
| Option.none => ⟨fun h => h.fst.elim, fun h => Option.noConfusion h
| Option.none => ⟨fun h => h.fst.elim, fun h => Option.noConfusion rfl (heq_of_eq h)
| Option.some _ => ⟨fun h => congr_arg Option.some h.snd, fun h => ⟨trivial, Option.some.inj h⟩⟩

@[simp]
Expand Down
6 changes: 4 additions & 2 deletions Mathlib/Data/Prod/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ namespace Prod
lemma swap_eq_iff_eq_swap {x : α × β} {y : β × α} : x.swap = y ↔ x = y.swap := by aesop

def mk.injArrow {x₁ : α} {y₁ : β} {x₂ : α} {y₂ : β} :
(x₁, y₁) = (x₂, y₂) → ∀ ⦃P : Sort*⦄, (x₁ = x₂ → y₁ = y₂ → P) → P :=
fun h₁ _ h₂ ↦ Prod.noConfusion h₁ h₂
(x₁, y₁) = (x₂, y₂) → ∀ ⦃P : Sort*⦄, (x₁ = x₂ → y₁ = y₂ → P) → P := by
intros h P w
cases h
exact w rfl rfl

@[simp]
theorem mk.eta : ∀ {p : α × β}, (p.1, p.2) = p
Expand Down
6 changes: 4 additions & 2 deletions Mathlib/Data/Prod/PProd.lean
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ variable {α β γ δ : Sort*}
namespace PProd

def mk.injArrow {α : Type*} {β : Type*} {x₁ : α} {y₁ : β} {x₂ : α} {y₂ : β} :
(x₁, y₁) = (x₂, y₂) → ∀ ⦃P : Sort*⦄, (x₁ = x₂ → y₁ = y₂ → P) → P :=
fun h₁ _ h₂ ↦ Prod.noConfusion h₁ h₂
(x₁, y₁) = (x₂, y₂) → ∀ ⦃P : Sort*⦄, (x₁ = x₂ → y₁ = y₂ → P) → P := by
intros h P w
cases h
exact w rfl rfl

@[simp]
theorem mk.eta {p : PProd α β} : PProd.mk p.1 p.2 = p :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Set/Image.lean
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ theorem isCompl_range_inl_range_inr : IsCompl (range <| @Sum.inl α β) (range S
IsCompl.of_le
(by
rintro y ⟨⟨x₁, rfl⟩, ⟨x₂, h⟩⟩
exact Sum.noConfusion h)
exact Sum.noConfusion rfl rfl (heq_of_eq h))
(by rintro (x | y) - <;> [left; right] <;> exact mem_range_self _)

@[simp]
Expand Down
12 changes: 8 additions & 4 deletions Mathlib/Data/Sigma/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ instance instDecidableEqSigma [h₁ : DecidableEq α] [h₂ : ∀ a, DecidableEq
| _, b₁, _, b₂, isTrue (Eq.refl _) =>
match b₁, b₂, h₂ _ b₁ b₂ with
| _, _, isTrue (Eq.refl _) => isTrue rfl
| _, _, isFalse n => isFalse fun h ↦ Sigma.noConfusion h fun _ e₂ ↦ n <| eq_of_heq e₂
| _, _, _, _, isFalse n => isFalse fun h ↦ Sigma.noConfusion h fun e₁ _ ↦ n e₁
| _, _, isFalse n => isFalse fun h ↦
Sigma.noConfusion rfl .rfl (heq_of_eq h) fun _ e₂ ↦ n (eq_of_heq e₂)
| _, _, _, _, isFalse n => isFalse fun h ↦
Sigma.noConfusion rfl .rfl (heq_of_eq h) fun e₁ _ ↦ n (eq_of_heq e₁)

theorem mk.inj_iff {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂} :
Sigma.mk a₁ b₁ = ⟨a₂, b₂⟩ ↔ a₁ = a₂ ∧ b₁ ≍ b₂ := by simp
Expand Down Expand Up @@ -228,8 +230,10 @@ instance decidableEq [h₁ : DecidableEq α] [h₂ : ∀ a, DecidableEq (β a)]
| _, b₁, _, b₂, isTrue (Eq.refl _) =>
match b₁, b₂, h₂ _ b₁ b₂ with
| _, _, isTrue (Eq.refl _) => isTrue rfl
| _, _, isFalse n => isFalse fun h ↦ PSigma.noConfusion h fun _ e₂ ↦ n <| eq_of_heq e₂
| _, _, _, _, isFalse n => isFalse fun h ↦ PSigma.noConfusion h fun e₁ _ ↦ n e₁
| _, _, isFalse n => isFalse fun h ↦
PSigma.noConfusion rfl .rfl (heq_of_eq h) fun _ e₂ ↦ n (eq_of_heq e₂)
| _, _, _, _, isFalse n => isFalse fun h ↦
PSigma.noConfusion rfl .rfl (heq_of_eq h) fun e₁ _ ↦ n (eq_of_heq e₁)

theorem mk.inj_iff {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂} :
@PSigma.mk α β a₁ b₁ = @PSigma.mk α β a₂ b₂ ↔ a₁ = a₂ ∧ b₁ ≍ b₂ :=
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/FieldTheory/IntermediateField/Adjoin/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ scoped macro:max K:term "⟮" xs:term,* "⟯" : term => do ``(adjoin $K $(← mk

open Lean PrettyPrinter.Delaborator SubExpr in
@[app_delab IntermediateField.adjoin]
meta def delabAdjoinNotation : Delab := whenPPOption getPPNotation do
meta partial def delabAdjoinNotation : Delab := whenPPOption getPPNotation do
let e ← getExpr
guard <| e.isAppOfArity ``adjoin 6
let F ← withNaryArg 0 delab
Expand Down
Loading
Loading