Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
10000 commits
Select commit Hold shift + click to select a range
c7c433c
chore: drop redundant @[simps!] on Mon.mkIso / AddMon.mkIso
kim-em May 6, 2026
05124db
deprecation
kim-em May 6, 2026
084301b
fix
kim-em May 6, 2026
e27262b
deprecation
kim-em May 6, 2026
f238619
Merge remote-tracking branch 'nightly-testing/bump/nightly-2026-05-03…
kim-em May 6, 2026
cc77eee
chore: restore lost content from #38972 merge in Cartesian/Mon.lean
kim-em May 6, 2026
9a7efec
add missing imports (as public)
Kha May 5, 2026
c68d62a
chore: bump to nightly-2026-05-06
mathlib-nightly-testing[bot] May 6, 2026
b85b550
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13613
May 6, 2026
a3c7454
Update lean-toolchain for testing https://github.com/leanprover/lean4…
May 6, 2026
15e2f86
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13651
May 6, 2026
bd907b4
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 7, 2026
5176738
chore: bump to nightly-2026-05-07
mathlib-nightly-testing[bot] May 7, 2026
010b127
merge lean-pr-testing-13613
mathlib-nightly-testing[bot] May 7, 2026
c6c7e52
fix
kim-em May 8, 2026
2dc7f3c
remove `change` tactics flagged by unusedTactics linter
kim-em May 8, 2026
8f893cb
fix
kim-em May 8, 2026
6203e81
fix
kim-em May 8, 2026
fa05551
fix
kim-em May 8, 2026
81e9b52
fix
kim-em May 8, 2026
c34f13b
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 8, 2026
954f789
fix
kim-em May 8, 2026
03370a8
Merge branch 'nightly-testing' of github.com:leanprover-community/mat…
kim-em May 8, 2026
abace82
fixes
kim-em May 8, 2026
cb919af
fixes
kim-em May 8, 2026
17bde92
fixes
kim-em May 8, 2026
ae87437
fixes
kim-em May 8, 2026
9295f09
adaptation note
kim-em May 8, 2026
f6071c1
linting
kim-em May 8, 2026
ca47173
chore: adaptations for nightly-2026-05-03 (#215)
kim-em May 8, 2026
f18feac
Merge remote-tracking branch 'origin/master' into bump/v4.31.0
kim-em May 9, 2026
0ac33d3
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 9, 2026
6e9a136
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13651
May 9, 2026
4899732
chore: adaptations for nightly-2026-05-07
kim-em May 9, 2026
aacaaef
Apply suggestions from code review
kim-em May 9, 2026
ddb2214
chore: bump to nightly-2026-05-09
mathlib-nightly-testing[bot] May 9, 2026
90cc582
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 10, 2026
dac2e97
chore: revert spurious blank-line additions
kim-em May 10, 2026
3819811
chore: revert remaining spurious blank-line additions
kim-em May 10, 2026
fc1dbdf
chore: undo over-eager blank-line reverts (restore lines from PR base)
kim-em May 10, 2026
5b5cb2f
chore: bump to nightly-2026-05-10
mathlib-nightly-testing[bot] May 10, 2026
60053bf
chore(Cache/IO): drop `open private` for now-public `Lake.Glob.ofStri…
kim-em May 11, 2026
794ec9a
chore(Data/String/Lemmas): add `length_toList` to `simp` set in leftp…
kim-em May 11, 2026
34acbe6
chore(RingTheory/Bialgebra/TensorProduct): enable `backward.defeqAttr…
kim-em May 11, 2026
bb8b93e
Apply suggestions from code review
kim-em May 11, 2026
c11913a
fix: restore mapFreeIso_hom lemma from #38341
kim-em May 6, 2026
b099d52
Merge branch 'bump/nightly-2026-05-07' into nightly-testing
kim-em May 11, 2026
3513e6d
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 11, 2026
688045e
fix: drop stale Reorder defs re-added during merge
kim-em May 11, 2026
2e8dc8c
chore: adaptations for nightly-2026-05-07 (#218)
kim-em May 11, 2026
21f1484
fixes
kim-em May 11, 2026
e22c93c
fixes
kim-em May 11, 2026
1d44d76
fix
kim-em May 11, 2026
860fc28
fix
kim-em May 11, 2026
c3f8e83
Merge remote-tracking branch 'origin/master' into bump/v4.31.0
kim-em May 11, 2026
90ed4b0
chore: adaptations for nightly-2026-05-10
kim-em May 11, 2026
eb152ad
Merge remote-tracking branch 'nightly-testing/bump/nightly-2026-05-10…
kim-em May 11, 2026
79d7f18
chore: bump to nightly-2026-05-11
mathlib-nightly-testing[bot] May 11, 2026
131d38f
partial fixes
kmill May 11, 2026
0ba11e8
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 12, 2026
12c2da6
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13636
May 12, 2026
14c713e
fixes
kim-em May 12, 2026
aefd58c
fix
kim-em May 12, 2026
39ef911
fix
kim-em May 12, 2026
9fd11d2
chore: remove orphan blank lines left by f46fb2595a2 strip
kim-em May 12, 2026
78924d5
chore: adaptations for nightly-2026-05-10 (#219)
kim-em May 12, 2026
a4ae26a
Merge remote-tracking branch 'origin/master' into bump/v4.31.0
kim-em May 12, 2026
4452ddc
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13636
May 12, 2026
e066151
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13636
May 12, 2026
42c1e08
refactor: use `simpa using!` for lean4 PR 13636 (reducible-close)
kim-em May 12, 2026
b0fc830
chore: bump batteries pin to 5796d42 (simpa using! transformation)
kim-em May 12, 2026
cb18d2d
fix: convert 10 additional sites to `simpa using!` (post-Jack-wrappin…
kim-em May 12, 2026
b748a96
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13636
May 12, 2026
6dc76c6
fix: convert 11 more sites to `simpa using!` (second batch)
kim-em May 12, 2026
a139082
fix: revert over-converted using! in non-simpa tactics (filter_upward…
kim-em May 12, 2026
292bd11
fix: convert ~14 more sites to `simpa using!` (third batch + WittVect…
kim-em May 12, 2026
7d56950
fix: convert 4 more sites to `simpa using!` (fourth batch)
kim-em May 12, 2026
ae87442
fix: convert 4 more sites to `simpa using!` (fifth batch)
kim-em May 12, 2026
7526aa9
fix: convert 7 more sites to `simpa using!` (sixth batch)
kim-em May 12, 2026
edeabb3
fix: convert 9 more sites to `simpa using!` (seventh batch)
kim-em May 12, 2026
b8ea9d6
chore: bump to nightly-2026-05-12
mathlib-nightly-testing[bot] May 12, 2026
d423c5e
fix: convert 2 more sites to `simpa using!` (eighth batch)
kim-em May 12, 2026
5579ffd
fix: convert 9 more sites to `simpa using!` (ninth batch)
kim-em May 12, 2026
bedcf37
fix: convert 1 more site to `simpa using!` (tenth batch)
kim-em May 12, 2026
12fc5aa
fix: convert 2 more sites to `simpa using!` (eleventh batch)
kim-em May 12, 2026
7eda5ff
fix: line 194 of ZMod (missed in previous batch)
kim-em May 12, 2026
9ab2967
Merge remote-tracking branch 'upstream/master' into bump/v4.31.0
May 12, 2026
a42e983
chore: adaptations for nightly-2026-05-12
May 12, 2026
964f39a
style: split long lines exceeding 100 chars after `using!` conversion
kim-em May 12, 2026
175272f
fix: restructure Ramification.lean simpa to single-line (line-split b…
kim-em May 12, 2026
d8f7df6
fix: revert using! to using in FunctorExtension (test if Mathlib mast…
kim-em May 12, 2026
bfdd06c
fix: restore FunctorExtension and Filtration to pristine (using! conv…
kim-em May 12, 2026
825964e
fix: restore FunctorExtension/Filtration with using! + disable longLi…
kim-em May 12, 2026
797e147
Update lean-toolchain for testing https://github.com/leanprover/lean4…
May 12, 2026
0f0fdc7
fixes
kmill May 12, 2026
7fe97dd
update simps config
kmill May 12, 2026
2a35e75
fix test
kmill May 12, 2026
f5c8feb
update
kmill May 12, 2026
c4ac2e6
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13651
May 12, 2026
27bd14c
fix: add `simpaUsingBang` to flexible linter's allowed-finishers set
kim-em May 12, 2026
a176477
fix: convert 9 Archive sites to `simpa using!`
kim-em May 13, 2026
64adf67
fix: convert 7 Counterexamples sites to `simpa using!`
kim-em May 13, 2026
0a59ad8
docstrings to appease linter
kmill May 13, 2026
d50f482
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 13, 2026
f597865
style: split long line in DimensionPolynomial
kim-em May 13, 2026
f86677c
chore(nightly-testing): fix build after lean updates
kim-em May 13, 2026
2ecee66
Merge remote-tracking branch 'upstream/master' into bump/v4.31.0
kim-em May 13, 2026
6f87d4d
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13651
May 13, 2026
fc283d9
chore: fix `WhitespaceLinter` test
wkrozowski May 13, 2026
565b7a9
chore: bump to nightly-2026-05-13
mathlib-nightly-testing[bot] May 13, 2026
41c335d
Merge remote-tracking branch 'upstream/master' into bump/v4.31.0
May 13, 2026
160d5c0
Merge commit '565b7a94f01f2535d6aca55e00235019e32ea316' into bump/nig…
May 13, 2026
112cf00
chore: adaptations for nightly-2026-05-13
May 13, 2026
e120c76
chore: adaptations for nightly-2026-05-11 (#220)
kim-em May 13, 2026
b0f0aa3
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 14, 2026
34863ef
Merge remote-tracking branch 'upstream/master' into bump/v4.31.0
kim-em May 14, 2026
f676f20
Merge branch 'bump/v4.31.0' of github.com:leanprover-community/mathli…
kim-em May 14, 2026
6fb8199
chore: adaptations for nightly-2026-05-12 (#221)
mathlib-nightly-testing[bot] May 14, 2026
68cc1bd
merge bump/v4.31.0
kim-em May 14, 2026
1f8d390
chore: adaptations for nightly-2026-05-13 (#222)
mathlib-nightly-testing[bot] May 14, 2026
561f25a
Merge remote-tracking branch 'upstream/master' into bump/v4.31.0
May 14, 2026
b250138
chore: adaptations for nightly-2026-05-13
May 14, 2026
3cd45f1
Auto-resolved conflicts in lean-toolchain and lake-manifest.json
May 14, 2026
9570bf4
chore: adaptations for nightly-2026-05-13 (#223)
mathlib-nightly-testing[bot] May 14, 2026
a2eed6e
chore: bump to nightly-2026-05-14
mathlib-nightly-testing[bot] May 14, 2026
b1620a8
merge lean-pr-testing-13715
mathlib-nightly-testing[bot] May 14, 2026
2895951
Merge remote-tracking branch 'upstream/master' into bump/v4.31.0
May 14, 2026
6c61acd
Merge commit 'b1620a88d642c02d5224e8c41afdfdbfce3f9458' into bump/nig…
May 14, 2026
6445f08
chore: adaptations for nightly-2026-05-14
May 14, 2026
2ac669f
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13651
May 14, 2026
d0edd0d
chore: adaptations for nightly-2026-05-14 (#224)
mathlib-nightly-testing[bot] May 14, 2026
c6ebc10
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 15, 2026
96cd1bf
fixes
kim-em May 15, 2026
3260b35
fix
kim-em May 15, 2026
3d861ac
Merge remote-tracking branch 'upstream/master' into bump/v4.31.0
May 15, 2026
40a1d56
Merge commit 'b1620a88d642c02d5224e8c41afdfdbfce3f9458' into bump/nig…
May 15, 2026
1de0588
chore: adaptations for nightly-2026-05-14
May 15, 2026
b8982ae
Merge branch 'bump/nightly-2026-05-14' into nightly-testing
May 15, 2026
8da1e00
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13636
May 16, 2026
8cc4b4c
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 16, 2026
01c01fe
chore: bump to nightly-2026-05-16
mathlib-nightly-testing[bot] May 16, 2026
4490445
merge lean-pr-testing-13651
mathlib-nightly-testing[bot] May 16, 2026
bcc3208
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 17, 2026
bf70ea7
Update lean-toolchain for testing https://github.com/leanprover/lean4…
May 17, 2026
1d30e97
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13762
May 17, 2026
70483db
chore: bump to nightly-2026-05-17
mathlib-nightly-testing[bot] May 17, 2026
997c362
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13762
May 17, 2026
811dd7d
fixes
kmill May 17, 2026
ccaca65
Merge remote-tracking branch 'origin/master' into bump/v4.31.0
kim-em May 17, 2026
214f7c6
chore: adaptations for nightly-2026-05-17
kim-em May 17, 2026
f13d273
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 18, 2026
644a822
chore: bump to nightly-2026-05-18
mathlib-nightly-testing[bot] May 18, 2026
773c912
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 19, 2026
789eaa8
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 20, 2026
ec9cc67
chore: bump to nightly-2026-05-20
mathlib-nightly-testing[bot] May 20, 2026
63c9f6c
merge lean-pr-testing-13762
mathlib-nightly-testing[bot] May 20, 2026
c533e7a
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 21, 2026
4cfd462
some fixes
kmill May 21, 2026
016670f
some fixes
kmill May 21, 2026
f050455
some fixes
kmill May 21, 2026
ec76d9e
some fixes
kmill May 21, 2026
3cb9f1f
all fixed
kmill May 21, 2026
0c22b25
Update lean-toolchain for testing https://github.com/leanprover/lean4…
May 21, 2026
ced4313
fixes
kmill Apr 30, 2026
cefa2ca
fixes
kmill May 21, 2026
cec3c71
fix tests
kmill May 21, 2026
cb597fa
chore: bump to nightly-2026-05-21
mathlib-nightly-testing[bot] May 21, 2026
9f15213
merge lean-pr-testing-13807
mathlib-nightly-testing[bot] May 21, 2026
fbcd72b
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 22, 2026
11ca3ed
chore: bump to nightly-2026-05-22
mathlib-nightly-testing[bot] May 22, 2026
e055a9a
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 23, 2026
1b8a1ac
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 24, 2026
1eab619
chore: drop import of removed `Mathlib.Tactic.Linter.DeprecatedModule`
kim-em May 24, 2026
d8a7234
chore: bump batteries to pick up `Init.Data.Ord.String` adaptation
kim-em May 24, 2026
76b190c
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 25, 2026
9460fb9
chore: adapt `Mathlib.Data.String.Basic` to opaque `String.compare`
kim-em May 25, 2026
ff08f9a
fixes
kim-em May 25, 2026
397359c
fix
kim-em May 25, 2026
87d0b17
chore: switch `Ordinal/Notation` to non-deprecated `add_mul_add_one`
kim-em May 25, 2026
da743eb
chore: restore `_iff_` preserves lemmas dropped during master merge
kim-em May 25, 2026
c151f2d
remove redundant simp
kim-em May 25, 2026
158c213
chore: bump to nightly-2026-05-25
mathlib-nightly-testing[bot] May 25, 2026
cfb2894
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13636
May 25, 2026
cf3d79b
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13636
May 25, 2026
f8d329f
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 26, 2026
17768ea
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 27, 2026
44d9af6
chore: bump to nightly-2026-05-27
mathlib-nightly-testing[bot] May 27, 2026
a460068
merge lean-pr-testing-13636
mathlib-nightly-testing[bot] May 27, 2026
f8a230d
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 28, 2026
3241040
add import
kim-em May 28, 2026
6f0f21c
chore: nightly adaptations — `simpa using!` and drop merge-orphaned f…
kim-em May 28, 2026
6fc5fd4
chore: bump to nightly-2026-05-28
mathlib-nightly-testing[bot] May 28, 2026
aa541f1
chore: drop merge-orphaned `ConvexSpace.ofConvex` in `Analysis/Convex…
kim-em May 28, 2026
157d544
set_options
kim-em May 28, 2026
c7744ec
chore: more nightly adaptations
kim-em May 28, 2026
ff43c1f
chore: take master's versions of merge-orphaned modules; more `simpa …
kim-em May 28, 2026
c3b702f
fix: extend simp set in `OnePoint.not_continuous_cofiniteTopology_of_…
kim-em May 28, 2026
9476bf1
chore: take master's simplifications in `ConvergenceInDistribution` a…
kim-em May 28, 2026
cff6c79
chore: more `simpa using!`; drop merge-orphaned `RationalMap.lean`; r…
kim-em May 28, 2026
186dc1d
chore: bump toolchain to v4.31.0-rc1
Garmelon May 28, 2026
dec73df
Merge branch 'nightly-testing' into bump/v4.31.0
Garmelon May 28, 2026
a44b589
Merge branch 'master' into bump/v4.31.0
Garmelon May 28, 2026
60ca6f0
fix: restore `AdjoinRoot.mapAlgEquiv` proofs under reducible `simpa u…
kim-em May 28, 2026
e16ae30
chore: take master's shim for `ModularForms/DimensionFormulas/LevelOne`
kim-em May 28, 2026
d79d34f
fix: avoid `dsimp` of `restrict_hom`/`restrict_domain` in `Birational…
kim-em May 28, 2026
9344e08
fix: keep original `Birational/Dominant` proofs via `backward.defeqAt…
kim-em May 28, 2026
1144411
test: adapt `DeprecatedModule` tests to core `deprecated_module`
kim-em May 28, 2026
9d22f28
fix tactics
Garmelon May 28, 2026
8a9ccb2
chore: clear remaining nightly build warnings
kim-em May 28, 2026
f2adf02
merge master
kim-em May 28, 2026
4a2d9e9
lake update
kim-em May 28, 2026
7902c14
Merge branch 'bump/nightly-2026-05-17' into nightly-testing
kim-em May 28, 2026
35f5307
bad merge
kim-em May 28, 2026
efb76d9
fix
kim-em May 28, 2026
e19d74b
fixes
kim-em May 28, 2026
b625aa2
merge master
kim-em May 28, 2026
f58ed90
Merge remote-tracking branch 'origin/master' into bump/v4.31.0
kim-em May 28, 2026
4576e6e
feat: last adaptations for v4.31.0 (#229)
kim-em May 28, 2026
51306ec
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 29, 2026
72dc629
update lake manifest
sgraf812 May 29, 2026
ae4c6e0
Point batteries to testing branch
sgraf812 May 29, 2026
78c519d
update manifest
sgraf812 May 29, 2026
26269c2
update lean toolchain
sgraf812 May 29, 2026
f98b4e6
Merge remote-tracking branch 'origin/nightly-testing' into lean-pr-te…
sgraf812 May 29, 2026
7c261ed
Merge branch 'bump/v4.31.0' into nightly-testing
kim-em May 29, 2026
3c51652
fix
kim-em May 29, 2026
16da8c3
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13305
May 29, 2026
4852414
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13305
May 29, 2026
de34684
Merge remote-tracking branch 'origin/nightly-testing' into lean-pr-te…
sgraf812 May 29, 2026
0a3563e
Merge remote-tracking branch 'origin/lean-pr-testing-13305' into lean…
sgraf812 May 29, 2026
dfd4431
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 30, 2026
dee5730
update manifest
sgraf812 May 30, 2026
9b5e424
more fixes
sgraf812 May 30, 2026
bdb9dd6
update manifest
sgraf812 May 30, 2026
f04d86f
update manifest
sgraf812 May 30, 2026
ed7504c
Merge master into nightly-testing
mathlib-nightly-testing[bot] May 31, 2026
78c7340
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13305
May 31, 2026
b41eb32
Merge master into nightly-testing
mathlib-nightly-testing[bot] Jun 1, 2026
1e578d3
Merge branch 'nightly-testing' into lean-pr-testing-13305
sgraf812 Jun 1, 2026
74646e6
Merge master into nightly-testing
mathlib-nightly-testing[bot] Jun 2, 2026
1cdfd83
chore: bump to nightly-2026-06-02
mathlib-nightly-testing[bot] Jun 2, 2026
7f21e99
Merge branch 'nightly-testing' into lean-pr-testing-13305
sgraf812 Jun 2, 2026
29c1d73
soothe whitespace linter
sgraf812 Jun 2, 2026
dd06748
Merge master into nightly-testing
mathlib-nightly-testing[bot] Jun 3, 2026
17e199e
Merge lean-pr-testing-13305 into nightly-testing: adapt to new do ela…
kim-em Jun 3, 2026
451a5a6
fix(Cache): add BatteriesRecycling to isPartOfMathlibCache
kim-em Jun 3, 2026
a5db9cc
chore: bump to nightly-2026-06-03
mathlib-nightly-testing[bot] Jun 3, 2026
5475764
rerun ci with new cache handling
Rob23oba Jun 3, 2026
eabd958
chore: drop red-black map/tree entries from overview.yaml
kim-em Jun 3, 2026
b872eb8
chore: adaptations for nightly-2026-06-03
Jun 3, 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 Cache/IO.lean
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ TODO: write a better predicate. -/
def isPartOfMathlibCache (mod : Name) : Bool := #[
`Mathlib,
`Batteries,
`BatteriesRecycling,
`Aesop,
`Cli,
`ImportGraph,
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/CategoryTheory/Monoidal/OfHasFiniteProducts.lean
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ variable [PreservesLimit (Functor.empty.{0} C) F]
[PreservesLimitsOfShape (Discrete WalkingPair) F]

set_option backward.defeqAttrib.useBackward true in
set_option linter.deprecated false in
@[deprecated inferInstance (since := "2025-10-19")]
instance :
have : HasFiniteProducts C := hasFiniteProducts_of_has_binary_and_terminal
Expand All @@ -190,6 +191,7 @@ instance :
IsIso (η F) := by dsimp [η_eq]; apply instIsIsoTerminalComparison

set_option backward.defeqAttrib.useBackward true in
set_option linter.deprecated false in
@[deprecated inferInstance (since := "2025-10-19")]
instance (X Y : C) :
have : HasFiniteProducts C := hasFiniteProducts_of_has_binary_and_terminal
Expand Down
16 changes: 14 additions & 2 deletions Mathlib/CategoryTheory/MorphismProperty/Local.lean
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,13 @@ instance inf (P Q : MorphismProperty C) [IsLocalAtTarget P K] [IsLocalAtTarget Q

end IsLocalAtTarget

alias of_zeroHypercover_target := IsLocalAtTarget.of_zeroHypercover
set_option backward.defeqAttrib.useBackward true in
lemma of_zeroHypercover_target {P : MorphismProperty C} {K : Precoverage C} [K.HasPullbacks]
[P.IsLocalAtTarget K] {X Y : C} {f : X ⟶ Y} (𝒰 : Precoverage.ZeroHypercover.{w} K Y)
[Precoverage.ZeroHypercover.Small.{v} 𝒰] (h : ∀ i, P (pullback.snd f (𝒰.f i))) :
P f := by
rw [IsLocalAtTarget.iff_of_zeroHypercover (P := P) 𝒰.restrictIndexOfSmall]
simp [h]

alias iff_of_zeroHypercover_target := IsLocalAtTarget.iff_of_zeroHypercover

Expand Down Expand Up @@ -211,7 +217,13 @@ instance inf (P Q : MorphismProperty C) [IsLocalAtSource P K] [IsLocalAtSource Q

end IsLocalAtSource

alias of_zeroHypercover_source := IsLocalAtSource.of_zeroHypercover
set_option backward.defeqAttrib.useBackward true in
lemma of_zeroHypercover_source {P : MorphismProperty C} {K : Precoverage C}
[P.IsLocalAtSource K] {X Y : C} {f : X ⟶ Y} (𝒰 : Precoverage.ZeroHypercover.{w} K X)
[Precoverage.ZeroHypercover.Small.{v} 𝒰] (h : ∀ i, P (𝒰.f i ≫ f)) :
P f := by
rw [IsLocalAtSource.iff_of_zeroHypercover (P := P) 𝒰.restrictIndexOfSmall]
simp [h]

alias iff_of_zeroHypercover_source := IsLocalAtSource.iff_of_zeroHypercover

Expand Down
12 changes: 6 additions & 6 deletions Mathlib/Data/Fin/Tuple/Reflection.lean
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ open Lean Meta Qq
that shows it is equal to `∏ i, f i`. -/
meta def mkProdEqQ {u : Level} {α : Q(Type u)}
(inst : Q(CommMonoid $α)) (n : ℕ) (f : Q(Fin $n → $α)) :
MetaM <| (val : Q($α)) × Q(∏ i, $f i = $val) := do
MetaM <| (val : Q($α)) × Q(∏ i, $f i = $val) :=
match n with
| 0 => return ⟨q((1 : $α)), q(Fin.prod_univ_zero $f)⟩
| m + 1 =>
| 0 => do return ⟨q((1 : $α)), q(Fin.prod_univ_zero $f)⟩
| m + 1 => do
let nezero : Q(NeZero ($m + 1)) := q(⟨Nat.succ_ne_zero _⟩)
let val ← makeRHS (m + 1) f nezero (m + 1)
let _ : $val =Q FinVec.prod $f := ⟨⟩
Expand All @@ -198,10 +198,10 @@ where
that shows it is equal to `∑ i, f i`. -/
meta def mkSumEqQ {u : Level} {α : Q(Type u)}
(inst : Q(AddCommMonoid $α)) (n : ℕ) (f : Q(Fin $n → $α)) :
MetaM <| (val : Q($α)) × Q(∑ i, $f i = $val) := do
MetaM <| (val : Q($α)) × Q(∑ i, $f i = $val) :=
match n with
| 0 => return ⟨q((0 : $α)), q(Fin.sum_univ_zero $f)⟩
| m + 1 =>
| m + 1 => do
let nezero : Q(NeZero ($m + 1)) := q(⟨Nat.succ_ne_zero _⟩)
let val ← makeRHS (m + 1) f nezero (m + 1)
let _ : $val =Q FinVec.sum $f := ⟨⟩
Expand All @@ -228,7 +228,7 @@ open Qq Lean FinVec
simproc_decl prod_univ_ofNat (∏ _ : Fin _, _) := .ofQ fun u _ e => do
match u, e with
| .succ _, ~q(@Finset.prod (Fin $n) _ $inst (@Finset.univ _ $instF) $f) => do
match (generalizing := false) n.nat? with
match n.nat? with
| none =>
return .continue
| some nVal =>
Expand Down
77 changes: 40 additions & 37 deletions Mathlib/Tactic/Algebra/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -165,24 +165,24 @@ namespace RingCompute

/-- Evaluate the sum of two normalized expressions in `R` using `ring`. -/
def add (cR : Common.Cache sR) {a b : Q($A)} (za : BaseType sAlg a) (zb : BaseType sAlg b) :
MetaM (Common.Result (BaseType sAlg) q($a + $b) × Option Q(IsNat ($a + $b) 0)) := do
let ⟨r, vr⟩ := za
let ⟨s, vs⟩ := zb
let ⟨t, vt, pt⟩ ← Common.evalAdd (Ring.ringCompute cR) rcℕ vr vs
match vt with
| .zero =>
have : $t =Q 0 := ⟨⟩
return ⟨⟨_, .mk _ vt, q(add_algebraMap $pt)⟩, some q(add_algebraMap_isNat_zero $pt)⟩
| vt =>
return ⟨⟨_, .mk _ vt, q(add_algebraMap $pt)⟩, none⟩
MetaM (Common.Result (BaseType sAlg) q($a + $b) × Option Q(IsNat ($a + $b) 0)) :=
match za, zb with
| .mk r vr, .mk s vs => do
let ⟨t, vt, pt⟩ ← Common.evalAdd (Ring.ringCompute cR) rcℕ vr vs
match (dependent := true) vt with
| .zero =>
have : $t =Q 0 := ⟨⟩
return ⟨⟨_, .mk _ vt, q(add_algebraMap $pt)⟩, some q(add_algebraMap_isNat_zero $pt)⟩
| vt =>
return ⟨⟨_, .mk _ vt, q(add_algebraMap $pt)⟩, none⟩

/-- Evaluate the product of two normalized expressions in `R` using `ring`. -/
def mul (cR : Common.Cache sR) {a b : Q($A)} (za : BaseType sAlg a) (zb : BaseType sAlg b) :
MetaM (Common.Result (BaseType sAlg) q($a * $b)) := do
let ⟨r, vr⟩ := za
let ⟨s, vs⟩ := zb
let ⟨t, vt, pt⟩ ← Common.evalMul (Ring.ringCompute cR) rcℕ vr vs
return ⟨_, .mk _ vt, q(by simp [← $pt, map_mul])⟩
MetaM (Common.Result (BaseType sAlg) q($a * $b)) :=
match za, zb with
| .mk r vr, .mk s vs => do
let ⟨t, vt, pt⟩ ← Common.evalMul (Ring.ringCompute cR) rcℕ vr vs
return ⟨_, .mk _ vt, q(by simp [← $pt, map_mul])⟩

/-- Take an expression `r'` in a ring `R'` such that `R` is an `R'`-algebra and cast `r'` to `R`
using `algebraMap R' R`, so that the scalar multiplication action on `A` is preserved. -/
Expand All @@ -195,7 +195,7 @@ def cast (cR : Algebra.Cache sR) (u' : Level) (R' : Q(Type u'))
let ⟨r, pf_smul⟩ ← evalSMulCast q($sAlg) q($_smul) r'
let ⟨_r'', vr, pr⟩ ←
Common.eval rcℕ (Ring.ringCompute cR.toCache) cR.toCache q($r)
match vr with
match (dependent := true) vr with
| .zero .. =>
assumeInstancesCommute
return ⟨_, .zero, q(cast_zero_smul_eq_zero_mul $pr $pf_smul)⟩
Expand All @@ -206,37 +206,40 @@ def cast (cR : Algebra.Cache sR) (u' : Level) (R' : Q(Type u'))

/-- Evaluate the product of two normalized expressions in `R` using `ring`. -/
def neg (cR : Algebra.Cache sR) {a : Q($A)} (_rA : Q(CommRing $A)) (za : BaseType sAlg a) :
MetaM (Common.Result (BaseType sAlg) q(-$a)) := do
let ⟨r, vr⟩ := za
match cR.rα with
| some rR =>
let ⟨_, vt, pt⟩ ← Common.evalNeg (Ring.ringCompute cR.toCache) q($rR) vr
assumeInstancesCommute
return ⟨_, .mk _ vt, q(neg_algebraMap $pt)⟩
| none => failure
MetaM (Common.Result (BaseType sAlg) q(-$a)) :=
match za with
| .mk r vr => do
match cR.rα with
| some rR =>
let ⟨_, vt, pt⟩ ← Common.evalNeg (Ring.ringCompute cR.toCache) q($rR) vr
assumeInstancesCommute
return ⟨_, .mk _ vt, q(neg_algebraMap $pt)⟩
| none => failure

/-- Raise a normalized expression in `R` to the power of a normalized natural number expression
using `ring`. -/
def pow (cR : Common.Cache sR) {a : Q($A)} {b : Q(ℕ)} (za : BaseType sAlg a)
(vb : Common.ExProdNat q($b)) :
OptionT MetaM (Common.Result (BaseType sAlg) q($a ^ $b)) := do
let ⟨r, vr⟩ := za
let ⟨_, vs, ps⟩ ← Common.evalPow₁ (Ring.ringCompute cR) rcℕ vr vb
return ⟨_, ⟨_, vs⟩, q(pow_algebraMap $ps)⟩
OptionT MetaM (Common.Result (BaseType sAlg) q($a ^ $b)) :=
match za with
| .mk r vr => do
let ⟨_, vs, ps⟩ ← Common.evalPow₁ (Ring.ringCompute cR) rcℕ vr vb
return ⟨_, ⟨_, vs⟩, q(pow_algebraMap $ps)⟩

/-- Evaluate the inverse of two normalized expressions in `R` using `ring`. -/
/- We include the CharZero argument to match the type signature of the ringCompute entry. -/
@[nolint unusedArguments]
def inv (cR : Algebra.Cache sR) {a : Q($A)} (_ : Option Q(CharZero $A)) (fA : Q(Semifield $A))
(za : BaseType sAlg a) : AtomM (Option (Common.Result (BaseType sAlg) q($a⁻¹))) := do
match cR.dsα with
| some fR =>
let ⟨r, vr⟩ := za
let ⟨_, vs, ps⟩ ← Common.ExSum.evalInv (Ring.ringCompute cR.toCache) rcℕ q($fR) cR.czα vr
assumeInstancesCommute
return some ⟨_, ⟨_, vs⟩, q(inv_algebraMap $ps)⟩
| none =>
return none
(za : BaseType sAlg a) : AtomM (Option (Common.Result (BaseType sAlg) q($a⁻¹))) :=
match za with
| .mk r vr => do
match cR.dsα with
| some fR =>
let ⟨_, vs, ps⟩ ← Common.ExSum.evalInv (Ring.ringCompute cR.toCache) rcℕ q($fR) cR.czα vr
assumeInstancesCommute
return some ⟨_, ⟨_, vs⟩, q(inv_algebraMap $ps)⟩
| none =>
return none

/-- Evaluate constants in `A` using `norm_num`. -/
def derive (cR : Algebra.Cache sR) (cA : Algebra.Cache sA) (x : Q($A)) :
Expand Down
26 changes: 13 additions & 13 deletions Mathlib/Tactic/FieldSimp.lean
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def onExponent (l : qNF M) (f : ℤ → ℤ) : qNF M :=

/-- Build a transparent expression for the product of powers represented by `l : qNF M`. -/
def evalPrettyMonomial (iM : Q(GroupWithZero $M)) (r : ℤ) (x : Q($M)) :
MetaM (Σ e : Q($M), Q(zpow' $x $r = $e)) := do
MetaM (Σ e : Q($M), Q(zpow' $x $r = $e)) :=
match r with
| 0 => /- If an exponent is zero then we must not have been able to prove that x is nonzero. -/
return ⟨q($x / $x), q(zpow'_zero_eq_div ..)⟩
Expand Down Expand Up @@ -111,10 +111,10 @@ def removeZeros
of) the negative powers. -/
def split (iM : Q(CommGroupWithZero $M)) (l : qNF M) :
MetaM (Σ l_n l_d : qNF M, Q(NF.eval $(l.toNF)
= NF.eval $(l_n.toNF) / NF.eval $(l_d.toNF))) := do
= NF.eval $(l_n.toNF) / NF.eval $(l_d.toNF))) :=
match l with
| [] => return ⟨[], [], q(Eq.symm (div_one (1:$M)))⟩
| ((r, x), i) :: t =>
| ((r, x), i) :: t => do
let ⟨t_n, t_d, pf⟩ ← split iM t
if r > 0 then
return ⟨((r, x), i) :: t_n, t_d, (q(NF.cons_eq_div_of_eq_div $r $x $pf):)⟩
Expand All @@ -125,13 +125,13 @@ def split (iM : Q(CommGroupWithZero $M)) (l : qNF M) :
return ⟨t_n, ((r', x), i) :: t_d, (q(NF.cons_eq_div_of_eq_div' $r' $x $pf):)⟩

private def evalPrettyAux (iM : Q(CommGroupWithZero $M)) (l : qNF M) :
MetaM (Σ e : Q($M), Q(NF.eval $(l.toNF) = $e)) := do
MetaM (Σ e : Q($M), Q(NF.eval $(l.toNF) = $e)) :=
match l with
| [] => return ⟨q(1), q(rfl)⟩
| [((r, x), _)] =>
| [((r, x), _)] => do
let ⟨e, pf⟩ ← evalPrettyMonomial q(inferInstance) r x
return ⟨e, q(by rw [NF.eval_cons]; exact Eq.trans (one_mul _) $pf)⟩
| ((r, x), k) :: t =>
| ((r, x), k) :: t => do
let ⟨e, pf_e⟩ ← evalPrettyMonomial q(inferInstance) r x
let ⟨t', pf⟩ ← evalPrettyAux iM t
have pf'' : Q(NF.eval $(qNF.toNF (((r, x), k) :: t)) = (NF.eval $(qNF.toNF t)) * zpow' $x $r) :=
Expand All @@ -144,7 +144,7 @@ def evalPretty (iM : Q(CommGroupWithZero $M)) (l : qNF M) :
let ⟨l_n, l_d, pf⟩ ← split iM l
let ⟨num, pf_n⟩ ← evalPrettyAux q(inferInstance) l_n
let ⟨den, pf_d⟩ ← evalPrettyAux q(inferInstance) l_d
match l_d with
match (dependent := true) l_d with
| [] => return ⟨num, q(eq_div_of_eq_one_of_subst $pf $pf_n)⟩
| _ =>
let pf_n : Q(NF.eval $(l_n.toNF) = $num) := pf_n
Expand Down Expand Up @@ -281,14 +281,14 @@ def mkDenomConditionProofSucc {iM : Q(CommGroupWithZero $M)}
(disch : ∀ {u : Level} (type : Q(Sort u)), MetaM Q($type))
{cond : DenomCondition (M := M) q(inferInstance)}
{L : qNF M} (hL : cond.proof L) (e : Q($M)) (r : ℤ) (i : ℕ) :
MetaM (Q($e ≠ 0) × cond.proof (((r, e), i) :: L)) := do
MetaM (Q($e ≠ 0) × cond.proof (((r, e), i) :: L)) :=
match cond with
| .none => return (← disch q($e ≠ 0), Unit.unit)
| .nonzero =>
| .nonzero => do
let pf ← disch q($e ≠ 0)
let pf₀ : Q(NF.eval $(qNF.toNF L) ≠ 0) := hL
return (pf, q(NF.cons_ne_zero $r $pf $pf₀))
| .positive _ _ _ _ =>
| .positive _ _ _ _ => do
let pf ← disch q(0 < $e)
let pf₀ : Q(0 < NF.eval $(qNF.toNF L)) := hL
let pf' := q(NF.cons_pos $r (x := $e) $pf $pf₀)
Expand All @@ -301,14 +301,14 @@ def mkDenomConditionProofSucc' {iM : Q(CommGroupWithZero $M)}
(disch : ∀ {u : Level} (type : Q(Sort u)), MetaM Q($type))
{cond : DenomCondition (M := M) q(inferInstance)}
{L : qNF M} (hL : cond.proof L) (e : Q($M)) (r : ℤ) (i : ℕ) :
MetaM (cond.proof (((r, e), i) :: L)) := do
MetaM (cond.proof (((r, e), i) :: L)) :=
match cond with
| .none => return Unit.unit
| .nonzero =>
| .nonzero => do
let pf ← disch q($e ≠ 0)
let pf₀ : Q(NF.eval $(qNF.toNF L) ≠ 0) := hL
return q(NF.cons_ne_zero $r $pf $pf₀)
| .positive _ _ _ _ =>
| .positive _ _ _ _ => do
let pf ← disch q(0 < $e)
let pf₀ : Q(0 < NF.eval $(qNF.toNF L)) := hL
return q(NF.cons_pos $r (x := $e) $pf $pf₀)
Expand Down
14 changes: 7 additions & 7 deletions Mathlib/Tactic/FieldSimp/Lemmas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def Sign.expr : Sign M → Q($M) → Q($M)
the product with `c` of (± `y`) (here taking the specified sign) is ± `c * y`. -/
def Sign.mulRight (iM : Q(CommGroupWithZero $M)) (c y : Q($M)) (g : Sign M) :
MetaM Q($(g.expr q($c * $y)) = $c * $(g.expr y)) := do
match g with
match (dependent := true) g with
| .plus => pure q(rfl)
| .minus _ =>
assumeInstancesCommute
Expand All @@ -409,7 +409,7 @@ the product of (± `y₁`) and (± `y₂`) (here taking the specified signs) is
proof and the computed sign. -/
def Sign.mul (iM : Q(CommGroupWithZero $M)) (y₁ y₂ : Q($M)) (g₁ g₂ : Sign M) :
MetaM (Σ (G : Sign M), Q($(g₁.expr y₁) * $(g₂.expr y₂) = $(G.expr q($y₁ * $y₂)))) := do
match g₁, g₂ with
match (dependent := true) g₁, g₂ with
| .plus, .plus => pure ⟨.plus, q(rfl)⟩
| .plus, .minus i =>
assumeInstancesCommute
Expand All @@ -425,7 +425,7 @@ def Sign.mul (iM : Q(CommGroupWithZero $M)) (y₁ y₂ : Q($M)) (g₁ g₂ : Sig
the inverse of (± `y`) (here taking the specified sign) is ± `y⁻¹`. -/
def Sign.inv (iM : Q(CommGroupWithZero $M)) (y : Q($M)) (g : Sign M) :
MetaM (Q($(g.expr y)⁻¹ = $(g.expr q($y⁻¹)))) := do
match g with
match (dependent := true) g with
| .plus => pure q(rfl)
| .minus _ =>
assumeInstancesCommute
Expand All @@ -436,7 +436,7 @@ the quotient of (± `y₁`) and (± `y₂`) (here taking the specified signs) is
proof and the computed sign. -/
def Sign.div (iM : Q(CommGroupWithZero $M)) (y₁ y₂ : Q($M)) (g₁ g₂ : Sign M) :
MetaM (Σ (G : Sign M), Q($(g₁.expr y₁) / $(g₂.expr y₂) = $(G.expr q($y₁ / $y₂)))) := do
match g₁, g₂ with
match (dependent := true) g₁, g₂ with
| .plus, .plus => pure ⟨.plus, q(rfl)⟩
| .plus, .minus i =>
assumeInstancesCommute
Expand All @@ -452,7 +452,7 @@ def Sign.div (iM : Q(CommGroupWithZero $M)) (y₁ y₂ : Q($M)) (g₁ g₂ : Sig
the negation of (± `y`) (here taking the specified sign) is ∓ `y`. -/
def Sign.neg (iM : Q(Field $M)) (y : Q($M)) (g : Sign M) :
MetaM (Σ (G : Sign M), Q(-$(g.expr y) = $(G.expr y))) := do
match g with
match (dependent := true) g with
| .plus => pure ⟨.minus iM, q(rfl)⟩
| .minus _ =>
assumeInstancesCommute
Expand All @@ -463,7 +463,7 @@ the exponentiation to power `s : ℕ` of (± `y`) (here taking the specified sig
return this proof and the computed sign. -/
def Sign.pow (iM : Q(CommGroupWithZero $M)) (y : Q($M)) (g : Sign M) (s : ℕ) :
MetaM (Σ (G : Sign M), Q($(g.expr y) ^ $s = $(G.expr q($y ^ $s)))) := do
match g with
match (dependent := true) g with
| .plus => pure ⟨.plus, q(rfl)⟩
| .minus i =>
assumeInstancesCommute
Expand All @@ -479,7 +479,7 @@ the exponentiation to power `s : ℤ` of (± `y`) (here taking the specified sig
return this proof and the computed sign. -/
def Sign.zpow (iM : Q(CommGroupWithZero $M)) (y : Q($M)) (g : Sign M) (s : ℤ) :
MetaM (Σ (G : Sign M), Q($(g.expr y) ^ $s = $(G.expr q($y ^ $s)))) := do
match g with
match (dependent := true) g with
| .plus => pure ⟨.plus, q(rfl)⟩
| .minus i =>
assumeInstancesCommute
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Tactic/Linter/Whitespace.lean
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def whitespaceLinter : Linter where run := withSetOptionIn fun stx ↦ do

let fmt : Option Format := ←
try
liftCoreM <| PrettyPrinter.ppCategory `command stx
liftCoreM <| some <$> PrettyPrinter.ppCategory `command stx
catch _ =>
Linter.logLintIf linter.style.whitespace.verbose (stx.getHead?.getD stx)
m!"The `whitespace` linter had some parsing issues: \
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Tactic/NormNum/Core.lean
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ and returning the truth or falsity of `p' : Prop` from an equivalence `p ↔ p'`
def deriveBoolOfIff (p p' : Q(Prop)) (hp : Q($p ↔ $p')) :
MetaM ((b : Bool) × BoolResult p' b) := do
let ⟨b, pb⟩ ← deriveBool p
match b with
match (dependent := true) b with
| true => return ⟨true, q(Iff.mp $hp $pb)⟩
| false => return ⟨false, q((Iff.not $hp).mp $pb)⟩

Expand Down
Loading