Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
baa71fa
Update lean-toolchain for testing https://github.com/leanprover/lean4…
Mar 24, 2026
cbf62a7
feat: add `Lean.Grind.PowIdentity` instance for finite fields
kim-em Mar 24, 2026
f420f53
Update lean-toolchain for testing https://github.com/leanprover/lean4…
Mar 26, 2026
28dc0ab
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13132
Mar 26, 2026
d7aee7e
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13132
Mar 26, 2026
deb87e3
Update lean-toolchain for testing https://github.com/leanprover/lean4…
Apr 1, 2026
b465a60
Update lean-toolchain for testing https://github.com/leanprover/lean4…
Apr 1, 2026
f841c8f
chore: indent tactic blocks after `by` and `decreasing_by`
nomeata Mar 31, 2026
b779d44
chore: indent tactic block in EmptyLine test
nomeata Mar 31, 2026
61a6a0f
chore: indent expression continuations at column 0
nomeata Apr 1, 2026
e714425
chore: indent expression continuations at column 0
nomeata Apr 1, 2026
7845a1a
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13229
Apr 1, 2026
7eff816
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13223
Apr 1, 2026
e533fde
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13229
Apr 1, 2026
37ec501
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13229
Apr 1, 2026
dd773b3
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13223
Apr 1, 2026
3602bc0
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13229
Apr 2, 2026
ce608e7
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13223
Apr 2, 2026
f8c6bd6
chore: fix linter tests
wkrozowski Apr 2, 2026
638efeb
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 7, 2026
8d08e27
lake update
kim-em Apr 7, 2026
940f396
fix hash command linter
kim-em Apr 7, 2026
12400c5
fix bad merge
kim-em Apr 7, 2026
89270ab
fixes
kim-em Apr 7, 2026
c102fda
fixes
kim-em Apr 7, 2026
3a751b4
unpleasant fix.
kim-em Apr 7, 2026
5212dc4
touch for CI
kim-em Apr 7, 2026
ac5cf06
cleanup of adaptation notes
kim-em Apr 7, 2026
ac1ee15
Merge commit '5212dc478426d5caca02fc5aea6df6d211fbdd7e' into bump/nig…
Apr 7, 2026
85c19f2
chore: adaptations for nightly-2026-04-06
Apr 7, 2026
939b283
chore: bump to nightly-2026-04-07
mathlib-nightly-testing[bot] Apr 7, 2026
9189553
Merge branch 'nightly-testing' of github.com:leanprover-community/mat…
kim-em Apr 7, 2026
e59ea1d
Merge commit '939b2837a108267d255e41aece8c6aca29009a2a' into bump/nig…
Apr 7, 2026
fc6fe78
chore: adaptations for nightly-2026-04-07
Apr 7, 2026
8bea2c2
merge
kim-em Apr 8, 2026
d0e2436
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 8, 2026
177922a
chore: bump to nightly-2026-04-08
mathlib-nightly-testing[bot] Apr 8, 2026
755deb4
merge lean-pr-testing-13223
mathlib-nightly-testing[bot] Apr 8, 2026
9e49d8c
Update lean-toolchain for testing https://github.com/leanprover/lean4…
Apr 8, 2026
6cc8eaf
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13262
Apr 8, 2026
2e1e83b
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 9, 2026
8335db3
universe fixes
kmill Apr 9, 2026
ba688b0
chore: bump to nightly-2026-04-09
mathlib-nightly-testing[bot] Apr 9, 2026
6b9dcf5
merge lean-pr-testing-13086
mathlib-nightly-testing[bot] Apr 9, 2026
5815ab3
merge lean-pr-testing-13229
mathlib-nightly-testing[bot] Apr 9, 2026
7f29606
Update lean-toolchain for testing https://github.com/leanprover/lean4…
Apr 9, 2026
7dae754
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13346
Apr 9, 2026
8a63c26
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 10, 2026
5c03f00
lake update
kim-em Apr 10, 2026
e512945
fixes
kim-em Apr 10, 2026
f55f739
fix tests
kim-em Apr 10, 2026
3f81638
ci: skip inputRev validation on nightly-testing branch
kim-em Apr 10, 2026
d5cca85
chore: bump to nightly-2026-04-10
mathlib-nightly-testing[bot] Apr 10, 2026
77f0e70
merge lean-pr-testing-13262
mathlib-nightly-testing[bot] Apr 10, 2026
40c6fcb
fix
Kha Apr 10, 2026
aaa0ccc
chore(nolints): add docBlame exceptions for auto-generated `instInhab…
kim-em Apr 10, 2026
ba9bf0f
fix(lint-style): filter out duplicate `Init` from `Mathlib.lean` imports
kim-em Apr 10, 2026
b6db754
fix
Kha Apr 10, 2026
f053cf0
fix plausible
Kha Apr 10, 2026
9b1fae7
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13346
Apr 10, 2026
f48d5bb
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13346
Apr 10, 2026
0960739
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 11, 2026
a1c9945
chore: update importGraph, remove duplicate Init workaround
kim-em Apr 11, 2026
0ab07d5
chore: bump to nightly-2026-04-11
mathlib-nightly-testing[bot] Apr 11, 2026
8da25c3
silence linter
kim-em Apr 11, 2026
957e226
chore: adaptations for nightly-2026-04-10
kim-em Apr 12, 2026
d2d45e8
broken test: still broken, but doesn't stop the build.
kim-em Apr 12, 2026
fb70c13
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 12, 2026
eb7a774
fix: exempt files registering initializers from the `privateModule` l…
thorimur Apr 12, 2026
853d41e
Revert "silence linter"
thorimur Apr 12, 2026
7a5e5b4
chore: remove unused sections in front of lone `declare_aesop_rule_sets`
thorimur Apr 12, 2026
8568f33
chore: restore `initialize` test for `privateModule` linter with corr…
thorimur Apr 12, 2026
d49f1ed
chore: restore `privateModule` `initialize` test with linter turned on
thorimur Apr 12, 2026
365191c
fixes
kim-em Apr 12, 2026
bea414c
Merge branch 'nightly-testing' of https://github.com/leanprover-commu…
kim-em Apr 12, 2026
7913a69
fix from nightly-testing
kim-em Apr 12, 2026
af85844
importGraph has been fixed
kim-em Apr 12, 2026
c949d5c
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 13, 2026
3439f4f
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13132
Apr 13, 2026
0b824b5
chore: bump to nightly-2026-04-13
mathlib-nightly-testing[bot] Apr 13, 2026
7fccdee
Update lean-toolchain for testing https://github.com/leanprover/lean4…
Apr 13, 2026
02083f3
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13325
Apr 13, 2026
19b8510
chore: silence simp `varHead` and `varOther` warnings
wkrozowski Apr 13, 2026
4462ca1
chore: silence `varHead` warning
wkrozowski Apr 13, 2026
39ef8de
chore: fix `globalAtrtributeIn` test
wkrozowski Apr 13, 2026
d044337
chore: fix `Archive` build
wkrozowski Apr 13, 2026
f74b5ed
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13325
Apr 13, 2026
670c0bf
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13325
Apr 13, 2026
2f4e09c
fix from nightly-testing
kim-em Apr 13, 2026
5cc009b
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 14, 2026
d3e9985
chore: bump to nightly-2026-04-14
mathlib-nightly-testing[bot] Apr 14, 2026
fa06fde
merge lean-pr-testing-13132
mathlib-nightly-testing[bot] Apr 14, 2026
48d0a7b
merge lean-pr-testing-13325
mathlib-nightly-testing[bot] Apr 14, 2026
88db77b
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 15, 2026
606f569
chore: bump to nightly-2026-04-15
mathlib-nightly-testing[bot] Apr 15, 2026
2edcb2a
adapt to lean4#13363: canUnfoldAtMatcher allowlist changes
nomeata Apr 15, 2026
737564c
fix lint errors from lean4#13363 adaptation
nomeata Apr 15, 2026
c533eff
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 16, 2026
9e7eebd
fixes
kim-em Apr 16, 2026
8ba9584
fix
kim-em Apr 16, 2026
f9ae5cc
fixes
kim-em Apr 16, 2026
cecf37b
chore: bump to nightly-2026-04-16
mathlib-nightly-testing[bot] Apr 16, 2026
83c4f31
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 17, 2026
6d92cce
fix tests
kim-em Apr 17, 2026
f4804b9
chore: adaptations for nightly-2026-04-16
kim-em Apr 17, 2026
d6af0d0
merge master
kim-em Apr 17, 2026
55ca726
Merge branch 'bump/nightly-2026-04-10' of github.com:leanprover-commu…
kim-em Apr 17, 2026
c33286b
fix upstreamed import
kim-em Apr 17, 2026
32b824d
chore: bump to nightly-2026-04-17
mathlib-nightly-testing[bot] Apr 17, 2026
bba4e07
set_option
kim-em Apr 17, 2026
1ebf1cc
Update lean-toolchain for testing https://github.com/leanprover/lean4…
Apr 17, 2026
b098eb1
chore: adaptations for leanprover/lean4#13389
wkrozowski Apr 17, 2026
a450fa0
fixes
kim-em Apr 17, 2026
e479388
fixes
kim-em Apr 17, 2026
183f0cd
merge
kim-em Apr 17, 2026
d33ab3c
fixes
kim-em Apr 17, 2026
eb5fd08
Merge branch 'lean-pr-testing-13346' of https://github.com/leanprover…
kim-em Apr 17, 2026
4f40f6e
fix Init filter in MinImports
kim-em Apr 17, 2026
6f52cc6
merge bump/nightly-2026-04-10
kim-em Apr 17, 2026
ebb5175
merge bump/nightly-2026-04-16
kim-em Apr 17, 2026
23925f2
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 18, 2026
5b25c4e
fix test
kim-em Apr 18, 2026
0647d35
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 19, 2026
6723fdb
add set_options
kim-em Apr 19, 2026
4c45d0e
chore: bump to nightly-2026-04-19
mathlib-nightly-testing[bot] Apr 19, 2026
eab9a03
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 20, 2026
eaa4c1f
chore: bump to nightly-2026-04-20
mathlib-nightly-testing[bot] Apr 20, 2026
85b88b5
merge lean-pr-testing-13441
mathlib-nightly-testing[bot] Apr 20, 2026
efc26a2
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 21, 2026
9d91c9d
fix bad merge
kim-em Apr 21, 2026
67244f5
fix #guard_msgs output
kim-em Apr 21, 2026
0777acc
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 22, 2026
eac921f
chore: bump to nightly-2026-04-22
mathlib-nightly-testing[bot] Apr 22, 2026
f2e6589
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 23, 2026
2d5b4c4
chore: bump to nightly-2026-04-23
mathlib-nightly-testing[bot] Apr 23, 2026
ec09924
cleanup
kim-em Apr 23, 2026
f0689d0
revert an unnecessary change
kim-em Apr 23, 2026
a6de9c2
revert unnecessary changes
kim-em Apr 23, 2026
c619ce1
add adaptation notes
kim-em Apr 24, 2026
4ab7318
minor fixes, whitespace and PR links
kim-em Apr 24, 2026
2eb2ebb
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 24, 2026
a1669dc
two improvements
kim-em Apr 24, 2026
ad19764
improvements
kim-em Apr 24, 2026
6819973
slightly improve the proof in Limits/Shapes/Equalizers.lean
TwoFX Apr 24, 2026
7f2aed1
More
TwoFX Apr 24, 2026
ea11aab
chore: bump to nightly-2026-04-24
mathlib-nightly-testing[bot] Apr 24, 2026
b5c35d6
adapt to lean4#13363: canUnfoldAtMatcher allowlist changes
nomeata Apr 24, 2026
354733e
chore: remove unused helper lemmas from Ordinal/Notation adaptation
nomeata Apr 24, 2026
6674d99
Merge branch 'nightly-testing-green' of https://github.com/leanprover…
nomeata Apr 24, 2026
227f9b9
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13363
Apr 24, 2026
335001c
adapt Limits/Shapes/ConcreteCategory to lean4#13363
nomeata Apr 24, 2026
a76fdf7
Merge branch 'lean-pr-testing-13363' of https://github.com/leanprover…
nomeata Apr 24, 2026
ad1873b
Bump batteries
nomeata Apr 24, 2026
21286e9
Update lean-toolchain for https://github.com/leanprover/lean4/pull/13363
Apr 24, 2026
706a5a9
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 25, 2026
18ebfae
chore: bump to nightly-2026-04-25
mathlib-nightly-testing[bot] Apr 25, 2026
60da88c
merge lean-pr-testing-13363
mathlib-nightly-testing[bot] Apr 25, 2026
358f262
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 26, 2026
c22b6cc
satisfy linter
kim-em Apr 26, 2026
f1fe074
Merge master into nightly-testing
mathlib-nightly-testing[bot] Apr 27, 2026
9fc131c
chore: bump to nightly-2026-04-27
mathlib-nightly-testing[bot] Apr 27, 2026
a5a6e46
chore: adaptations for nightly-2026-04-27
kim-em Apr 28, 2026
0d79925
Apply suggestion from @kim-em
kim-em Apr 28, 2026
0c40808
Apply suggestion from @kim-em
kim-em Apr 28, 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
2 changes: 1 addition & 1 deletion Mathlib/Algebra/BigOperators/Group/List/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ lemma prod_mul_prod_eq_prod_zipWith_mul_prod_drop :
| [], ys => by simp
| xs, [] => by simp
| x :: xs, y :: ys => by
simp only [drop, zipWith_cons_cons, prod_cons]
simp only [zipWith_cons_cons, prod_cons]
conv =>
lhs; rw [mul_assoc]; right; rw [mul_comm, mul_assoc]; right
rw [mul_comm, prod_mul_prod_eq_prod_zipWith_mul_prod_drop xs ys]
Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Algebra/Group/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,8 @@ theorem npowRec'_two_mul {M : Type*} [Semigroup M] [One M] (k : ℕ) (m : M) :
match k' with
| 0 => rfl
| 1 => simp [npowRec']
| k + 2 => simp [npowRec', ← mul_assoc, ← ih]
| k + 2 =>
simp [npowRec', ← mul_assoc, ← ih, Nat.mul_succ]

@[to_additive]
theorem npowRec'_mul_comm {M : Type*} [Semigroup M] [One M] {k : ℕ} (k0 : k ≠ 0) (m : M) :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,12 @@ abbrev inr' (x y : SimplexCategory) : y ⟶ tensorObjOf x y := WithInitial.down
set_option backward.isDefEq.respectTransparency false in
lemma inl'_eval (x y : SimplexCategory) (i : Fin (x.len + 1)) :
(inl' x y).toOrderHom i = (i.castAdd _).cast (Nat.succ_add x.len (y.len + 1)) := by
dsimp [inl', inl, MonoidalCategoryStruct.rightUnitor, MonoidalCategoryStruct.whiskerLeft,
tensorHom, WithInitial.down, rightUnitor, tensorObj]
ext
simp [OrderEmbedding.toOrderHom]
simp [inl', inl, MonoidalCategoryStruct.rightUnitor, MonoidalCategoryStruct.whiskerLeft,
MonoidalCategoryStruct.tensorUnit, MonoidalCategoryStruct.tensorObj,
tensorUnit, tensorHom, WithInitial.down, rightUnitor, tensorObj, CategoryStruct.id,
CategoryStruct.comp, WithInitial.comp, WithInitial.id,
OrderEmbedding.toOrderHom]

set_option backward.isDefEq.respectTransparency false in
lemma inr'_eval (x y : SimplexCategory) (i : Fin (y.len + 1)) :
Expand Down
19 changes: 19 additions & 0 deletions Mathlib/CategoryTheory/Bicategory/Coherence.lean
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,25 @@ def normalizeIso {a : B} :
| _, _, p, Hom.comp f g =>
(α_ _ _ _).symm ≪≫ whiskerRightIso (normalizeIso p f) g ≪≫ normalizeIso (normalizeAux p f) g

-- Equation lemmas for `normalizeIso`/`normalizeAux` matching `≫`/`𝟙`
-- (i.e., `CategoryStruct.comp`/`CategoryStruct.id` for `FreeBicategory`) instead of
-- `Hom.comp`/`Hom.id`. Needed because after leanprover/lean4#13363, `canUnfoldAtMatcher`
-- no longer unfolds class projections in match discriminants.
@[simp] theorem normalizeAux_comp {a : B} {b c d : FreeBicategory B}
(p : Path a b) (f : b ⟶ c) (g : c ⟶ d) :
normalizeAux p (f ≫ g) = normalizeAux (normalizeAux p f) g := rfl
@[simp] theorem normalizeAux_id {a : B} {b : FreeBicategory B} (p : Path a b) :
normalizeAux p (𝟙 b) = p := rfl
@[simp] theorem normalizeIso_comp {a : B} {b c d : FreeBicategory B}
(p : Path a b) (f : b ⟶ c) (g : c ⟶ d) :
normalizeIso p (f ≫ g) =
(α_ _ _ _).symm ≪≫ whiskerRightIso (normalizeIso p f) g ≪≫
normalizeIso (normalizeAux p f) g := rfl
@[simp] theorem normalizeIso_id {a : B} {b : FreeBicategory B} (p : Path a b) :
normalizeIso p (𝟙 b) = ρ_ _ := rfl
@[simp] theorem quot_whisker_left {a b c : FreeBicategory B} (f : a ⟶ b) {g h : b ⟶ c}
(η : Hom₂ g h) : Quot.mk Rel (Hom₂.whisker_left f η) = f ◁ (Quot.mk Rel η) := rfl

/-- Given a 2-morphism between `f` and `g` in the free bicategory, we have the equality
`normalizeAux p f = normalizeAux p g`.
-/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ corresponding locally discrete bicategories.
def Functor.toPseudofunctor : LocallyDiscrete C ⥤ᵖ (LocallyDiscrete D) :=
pseudofunctorOfIsLocallyDiscrete
(fun ⟨X⟩ ↦ .mk <| F.obj X) (fun ⟨f⟩ ↦ (F.map f).toLoc)
(fun ⟨X⟩ ↦ eqToIso (by simp)) (fun f g ↦ eqToIso (by simp))
(fun ⟨X⟩ ↦ eqToIso (by simp [CategoryStruct.id]))
(fun ⟨f⟩ ⟨g⟩ ↦ eqToIso (by simp [CategoryStruct.comp]))

@[deprecated (since := "2026-02-08")] alias Functor.toPseudoFunctor := Functor.toPseudofunctor

Expand Down Expand Up @@ -145,7 +146,8 @@ be promoted to a pseudofunctor from `LocallyDiscrete I` to `B`.
def Functor.toPseudofunctor' : LocallyDiscrete I ⥤ᵖ B :=
pseudofunctorOfIsLocallyDiscrete
(fun ⟨X⟩ ↦ F.obj X) (fun ⟨f⟩ ↦ F.map f)
(fun ⟨X⟩ ↦ eqToIso (by simp)) (fun f g ↦ eqToIso (by simp))
(fun ⟨X⟩ ↦ eqToIso (by simp [CategoryStruct.id]))
(fun f g ↦ eqToIso (by obtain ⟨f⟩ := f; obtain ⟨g⟩ := g; simp [CategoryStruct.comp]))

@[deprecated (since := "2026-02-08")] alias Functor.toPseudoFunctor' := Functor.toPseudofunctor'

Expand Down
4 changes: 2 additions & 2 deletions Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ def multiequalizerEquivAux {J : MulticospanShape.{w, w'}} (I : MulticospanIndex
| WalkingMulticospan.right b => I.fst b (x.1 _)
property := by
rintro (a | b) (a' | b') (f | f | f)
· simp
· simp only [WalkingMulticospan.Hom.id_eq_id, Functor.map_id]; rfl
· rfl
· dsimp
exact (x.2 b').symm
· simp }
· simp only [WalkingMulticospan.Hom.id_eq_id, Functor.map_id]; rfl }
left_inv := by
intro x; ext (a | b)
· rfl
Expand Down
51 changes: 38 additions & 13 deletions Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean
Original file line number Diff line number Diff line change
Expand Up @@ -210,24 +210,49 @@ theorem walkingParallelPairOpEquiv_counitIso_inv_app_op_one :
walkingParallelPairOpEquiv.counitIso.inv.app (op one) = 𝟙 (op one) :=
rfl

variable {C : Type u} [Category.{v} C]
variable {C : Type u}
variable {X Y : C}

namespace parallelPair

/-- Implementation of `parallelPair`, do not use directly. -/
@[instance_reducible]
def parallelPairObj (X Y : C) (x : WalkingParallelPair) : C :=
match x with
| zero => X
| one => Y

@[simp] theorem parallelPairObj_zero : parallelPairObj X Y zero = X := rfl
@[simp] theorem parallelPairObj_one : parallelPairObj X Y one = Y := rfl

variable [Category.{v} C]

/-- Implementation of `parallelPair`, do not use directly. -/
def parallelPairHom (f g : X ⟶ Y) {x y : WalkingParallelPair} (h : x ⟶ y) :
parallelPairObj X Y x ⟶ parallelPairObj X Y y :=
match h with
| .id _ => 𝟙 _
| .left => f
| .right => g

@[simp] theorem parallelPairHom_id {f g : X ⟶ Y} {x : WalkingParallelPair} :
parallelPairHom f g (𝟙 x) = 𝟙 (parallelPairObj X Y x) := (rfl)
@[simp] theorem parallelPairHom_left {f g : X ⟶ Y} :
parallelPairHom f g .left = f := (rfl)
@[simp] theorem parallelPairHom_right {f g : X ⟶ Y} :
parallelPairHom f g .right = g := (rfl)

end parallelPair

variable [Category.{v} C]

open parallelPair in
/-- `parallelPair f g` is the diagram in `C` consisting of the two morphisms `f` and `g` with
common domain and codomain. -/
def parallelPair (f g : X ⟶ Y) : WalkingParallelPair ⥤ C where
obj x :=
match x with
| zero => X
| one => Y
map h :=
match h with
| WalkingParallelPairHom.id _ => 𝟙 _
| left => f
| right => g
-- `sorry` can cope with this, but it's too slow:
map_comp := by
rintro _ _ _ ⟨⟩ g <;> cases g <;> simp
obj x := parallelPairObj X Y x
map h := parallelPairHom f g h
map_comp := by rintro _ _ _ ⟨⟩ ⟨⟩ <;> simp

@[simp]
theorem parallelPair_obj_zero (f g : X ⟶ Y) : (parallelPair f g).obj zero = X := rfl
Expand Down
30 changes: 30 additions & 0 deletions Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,21 @@ def ofι {J : MulticospanShape.{w, w'}} (I : MulticospanIndex J C)
| WalkingMulticospan.left _ => ι _
| WalkingMulticospan.right b => ι (J.fst b) ≫ I.fst b
naturality := by
#adaptation_note /-- Proof repaired after leanprover/lean4#13363.
The proof used to finish from this point as
```
rintro (_ | _) (_ | _) (_ | _ | _) <;>
dsimp <;> simp only [Category.id_comp, Category.comp_id]
apply w
```
The replacement proof is a short-term fix, and we request that the authors/maintainers of
this file review the proof, and either approve it by removing this note,
revise the proof or the prerequisites appropriately, or minimize a problem in lean4 that
still needs addressing. -/
rintro (_ | _) (_ | _) (_ | _ | _) <;>
simp only [WalkingMulticospan.Hom.id_eq_id,
Functor.map_id, Functor.const_obj_map, Category.comp_id] <;>
dsimp <;> simp only [Category.id_comp]
apply w }

@[simp]
Expand Down Expand Up @@ -658,11 +671,28 @@ def ofPiFork
| WalkingMulticospan.left _ => a.ι ≫ c.proj _
| WalkingMulticospan.right _ => a.ι ≫ I.fstPiMapOfIsLimit c hd ≫ d.proj _
π.naturality := by
#adaptation_note /-- Proof repaired after leanprover/lean4#13363.
The proof used to finish from this point as
```
rintro (_ | _) (_ | _) (_ | _ | _)
· simp
· simp
· dsimp; rw [a.condition_assoc]; simp
· simp
```
The replacement proof is a short-term fix, and we request that the authors/maintainers of
this file review the proof, and either approve it by removing this note, revise
the proof or the prerequisites appropriately, or minimize a problem in lean4 that still
needs addressing. -/
rintro (_ | _) (_ | _) (_ | _ | _)
· simp only [WalkingMulticospan.Hom.id_eq_id, Functor.map_id,
Functor.const_obj_map, Category.comp_id]
exact Category.id_comp _
· simp
· dsimp; rw [a.condition_assoc]; simp
· simp only [WalkingMulticospan.Hom.id_eq_id, Functor.map_id,
Functor.const_obj_map, Category.comp_id]
exact Category.id_comp _

@[simp]
theorem ofPiFork_ι (a : Fork (I.fstPiMapOfIsLimit c hd) (I.sndPiMapOfIsLimit c hd)) (i) :
Expand Down
19 changes: 14 additions & 5 deletions Mathlib/CategoryTheory/Monoidal/Free/Coherence.lean
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ theorem normalizeObj_tensor (X Y : F C) (n : NormalMonoidalObject C) :
/-- Auxiliary definition for `normalize`. -/
def normalizeObj' (X : F C) : N C ⥤ N C := Discrete.functor fun n ↦ ⟨normalizeObj X n⟩

@[simp]
theorem as_obj_normalizeObj' (X : F C) (n : N C) :
((normalizeObj' X).obj n).as = normalizeObj X n.as := rfl

section

open Hom
Expand Down Expand Up @@ -186,14 +190,20 @@ def normalizeIsoApp :

/-- Almost non-definitionally equal to `normalizeIsoApp`, but has a better definitional property
in the proof of `normalize_naturality`. -/
@[simp]
def normalizeIsoApp' :
∀ (X : F C) (n : NormalMonoidalObject C), inclusionObj n ⊗ X ≅ inclusionObj (normalizeObj X n)
| of _, _ => Iso.refl _
| unit, _ => ρ_ _
| tensor X Y, n =>
(α_ _ _ _).symm ≪≫ whiskerRightIso (normalizeIsoApp' X n) Y ≪≫ normalizeIsoApp' _ _

@[simp] theorem normalizeIsoApp'_tensor (X Y : F C) (n : NormalMonoidalObject C) :
normalizeIsoApp' C (X ⊗ Y) n =
(α_ _ _ _).symm ≪≫ whiskerRightIso (normalizeIsoApp' C X n) Y ≪≫
normalizeIsoApp' C Y _ := rfl
@[simp] theorem normalizeIsoApp'_unit (n : NormalMonoidalObject C) :
normalizeIsoApp' C (𝟙_ (F C)) n = ρ_ _ := rfl

theorem normalizeIsoApp_eq :
∀ (X : F C) (n : N C), normalizeIsoApp C X n = normalizeIsoApp' C X n.as
| of _, _ => rfl
Expand All @@ -202,7 +212,7 @@ theorem normalizeIsoApp_eq :
rw [normalizeIsoApp, normalizeIsoApp']
rw [normalizeIsoApp_eq X n]
rw [normalizeIsoApp_eq Y ⟨normalizeObj X n.as⟩]
rfl
simp

@[simp]
theorem normalizeIsoApp_tensor (X Y : F C) (n : N C) :
Expand Down Expand Up @@ -253,13 +263,13 @@ theorem normalize_naturality (n : NormalMonoidalObject C) {X Y : F C} (f : X ⟶
case comp f g ihf ihg => simp [ihg, reassoc_of% (ihf _)]
case whiskerLeft X' X Y f ih =>
intro n
dsimp only [normalizeObj_tensor, normalizeIsoApp', tensor_eq_tensor, Iso.trans_hom,
dsimp only [normalizeObj_tensor, normalizeIsoApp'_tensor, Iso.trans_hom,
Iso.symm_hom, whiskerRightIso_hom, Function.comp_apply, inclusion_obj]
rw [associator_inv_naturality_right_assoc, whisker_exchange_assoc, ih]
simp
case whiskerRight X Y h η' ih =>
intro n
dsimp only [normalizeObj_tensor, normalizeIsoApp', tensor_eq_tensor, Iso.trans_hom,
dsimp only [normalizeObj_tensor, normalizeIsoApp'_tensor, Iso.trans_hom,
Iso.symm_hom, whiskerRightIso_hom, Function.comp_apply, inclusion_obj]
rw [associator_inv_naturality_middle_assoc, ← comp_whiskerRight_assoc, ih]
have := dcongr_arg (fun x => (normalizeIsoApp' C η' x).hom) (normalizeObj_congr n h)
Expand All @@ -268,7 +278,6 @@ theorem normalize_naturality (n : NormalMonoidalObject C) {X Y : F C} (f : X ⟶

end

set_option backward.isDefEq.respectTransparency false in
/-- The isomorphism between `n ⊗ X` and `normalize X n` is natural (in both `X` and `n`, but
naturality in `n` is trivial and was "proved" in `normalizeIsoAux`). This is the real heart
of our proof of the coherence theorem. -/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def multicospanMap {P Q : C₀ᵒᵖ ⥤ A} (f : P ⟶ Q) :
| WalkingMulticospan.left i => f.app _
| WalkingMulticospan.right j => f.app _
naturality := by
rintro (i₁ | j₁) (i₂ | j₂) (_ | _)
all_goals simp
rintro (i₁ | j₁) (i₂ | j₂) (_ | _) <;>
simp [MulticospanIndex.multicospan]

/-- The natural isomorphism between the diagrams attached to `data : F.PreOneHypercoverDenseData X`
that are induced by isomorphisms in `C₀ᵒᵖ ⥤ A`. -/
Expand Down
4 changes: 3 additions & 1 deletion Mathlib/CategoryTheory/Sites/Hypercover/One.lean
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,9 @@ def Hom.mapMulticospan {E : PreOneHypercover.{w} S} {F : PreOneHypercover.{w'} S
| .id _ => .id _
| .fst i => WalkingMulticospan.Hom.fst (J := F.multicospanShape) (f.s₁' i)
| .snd i => WalkingMulticospan.Hom.snd (J := F.multicospanShape) (f.s₁' i)
map_id := by simp
map_id
| .left _ => rfl
| .right _ => rfl
map_comp
| .id _, _ => by simp
| .fst _, .id _ => by simp
Expand Down
14 changes: 13 additions & 1 deletion Mathlib/CategoryTheory/Sites/Whiskering.lean
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,20 @@ def multicospanComp : (S.index (P ⋙ F)).multicospan ≅ (S.index P).multicospa
| WalkingMulticospan.left _ => Iso.refl _
| WalkingMulticospan.right _ => Iso.refl _)
(by
#adaptation_note /-- Proof repaired after leanprover/lean4#13363.
The body of this `by` block was previously
```
rintro (a | b) (a | b) (f | f | f)
all_goals cat_disch)
all_goals cat_disch
```
The replacement proof is a short-term fix, and we request that the authors/maintainers of
this file review the proof, and either approve it by removing this note,
revise the proof or the prerequisites appropriately, or minimize a problem in lean4 that
still needs addressing. -/
rintro (a | b) (a | b) (f | f | f) <;>
simp only [WalkingMulticospan.Hom.id_eq_id, Iso.refl_hom, Category.id_comp,
Category.comp_id, Functor.map_id] <;>
dsimp [CategoryStruct.comp] <;> simp)

/-- Mapping the multifork associated to a cover `S : J.Cover X` and a presheaf `P` with
respect to a functor `F` is isomorphic (upto a natural isomorphism of the underlying functors)
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/List/Permutation.lean
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ theorem length_permutationsAux :
refine permutationsAux.rec (by simp) ?_
intro t ts is IH1 IH2
have IH2 : length (permutationsAux is nil) + 1 = is.length ! := by simpa using IH2
simp only [factorial, Nat.mul_comm, add_eq] at IH1
simp only [List.length_cons, factorial, Nat.mul_comm, add_eq] at IH1
rw [permutationsAux_cons,
length_foldr_permutationsAux2' _ _ _ _ _ fun l m => (perm_of_mem_permutations m).length_eq,
permutations, length, length, IH2, Nat.succ_add, Nat.factorial_succ, Nat.mul_comm (_ + 1),
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/ModelTheory/Order.lean
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ language. -/
@[simps] def orderLHom : Language.order →ᴸ L where
onRelation | _, .le => leSymb

@[simp]
@[simp, nolint simpNF]
theorem orderLHom_leSymb :
(orderLHom L).onRelation leSymb = (leSymb : L.Relations 2) :=
rfl
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/ModelTheory/Semantics.lean
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ theorem realize_top : (⊤ : L.BoundedFormula α l).Realize v xs ↔ True := by

@[simp]
theorem realize_inf : (φ ⊓ ψ).Realize v xs ↔ φ.Realize v xs ∧ ψ.Realize v xs := by
simp [Realize]
simp [Realize, Min.min]

@[simp]
theorem realize_foldr_inf (l : List (L.BoundedFormula α n)) (v : α → M) (xs : Fin n → M) :
Expand Down
Loading
Loading