Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 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
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
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
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
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
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
bba4e07
set_option
kim-em 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
4f40f6e
fix Init filter in MinImports
kim-em Apr 17, 2026
6f52cc6
merge bump/nightly-2026-04-10
kim-em Apr 17, 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 .github/workflows/build_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ jobs:

- name: validate lake-manifest.json inputRevs
# Only enforce this on the main mathlib4 repository, not on nightly-testing
if: github.repository == 'leanprover-community/mathlib4'
if: github.repository == 'leanprover-community/mathlib4' && github.ref_name != 'nightly-testing'
shell: bash
run: |
cd pr-branch
Expand Down
1 change: 1 addition & 0 deletions Archive/Examples/IfNormalization/Result.lean
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ We add some local simp lemmas so we can unfold the definitions of the normalizat
attribute [local simp] normalized hasNestedIf hasConstantIf hasRedundantIf disjoint vars
List.disjoint

set_option warning.simp.varHead false in

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to set up tech debt counters for these?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I think this would be a good idea, as each such silencing means that there is an inefficient lemma in the simp set, but in the core lean4 there was an example, where this was done deliberately on a small local simpset.

attribute [local simp] apply_ite ite_eq_iff'

variable {b : Bool} {f : ℕ → Bool} {i : ℕ} {t e : IfExpr}
Expand Down
2 changes: 2 additions & 0 deletions Archive/Imo/Imo2024Q6.lean
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ lemma Aquaesulian.injective : Function.Injective f := by
· exact (h.eq_of_apply_eq_inl he.symm hc).symm
· exact h.eq_of_apply_eq_inl he hc

set_option warning.simp.varHead false in
@[simp]
lemma Aquaesulian.apply_zero : f 0 = 0 := by
refine h.injective ?_
Expand All @@ -68,6 +69,7 @@ lemma Aquaesulian.apply_neg_apply_add (x : G) : f (-(f x)) + x = 0 := by
· rw [add_neg_cancel, h.apply_zero] at hc
exact hc.symm

set_option warning.simp.varHead false in
@[simp]
lemma Aquaesulian.apply_neg_apply (x : G) : f (-(f x)) = -x := by
rw [← add_eq_zero_iff_eq_neg]
Expand Down
7 changes: 2 additions & 5 deletions Mathlib/Algebra/BigOperators/Group/List/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,8 @@ lemma prod_map_erase [DecidableEq α] (f : α → M) {a} :

@[to_additive] lemma Perm.prod_eq (h : Perm l₁ l₂) : prod l₁ = prod l₂ := h.foldr_op_eq

-- In order to make `to_additive` work, this theorem is adjusted to `List.sum_reverse` from core
@[to_additive existing, simp]
lemma prod_reverse [One α] [Mul α] [@Std.Associative α (· * ·)] [@Std.Commutative α (· * ·)]
[@Std.LawfulLeftIdentity α α (· * ·) 1] (l : List α) : prod l.reverse = prod l :=
@List.sum_reverse α ⟨1⟩ ⟨(· * ·)⟩ _ _ _ l
set_option linter.existingAttributeWarning false in
attribute [to_additive existing] prod_reverse

@[to_additive]
lemma prod_mul_prod_eq_prod_zipWith_mul_prod_drop :
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/ModuleCat/Presheaf/Monoidal.lean
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ noncomputable instance monoidalCategory :

open BraidedCategory

instance symmetricCategory :
noncomputable instance symmetricCategory :
SymmetricCategory (PresheafOfModules.{u} (R ⋙ forget₂ _ _)) where
braiding M₁ M₂ :=
isoMk (fun X ↦ braiding (C := ModuleCat (R.obj X)) (M₁.obj X) (M₂.obj X))
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/CharP/Two.lean
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ theorem natCast_cases (n : ℕ) : (n : R) = 0 ∨ (n : R) = 1 :=
theorem natCast_eq_mod (n : ℕ) : (n : R) = (n % 2 : ℕ) := by
simp [natCast_eq_ite, Nat.even_iff]

set_option warning.simp.varHead false in
@[scoped simp]
theorem ofNat_eq_mod (n : ℕ) [n.AtLeastTwo] : (ofNat(n) : R) = (ofNat(n) % 2 : ℕ) :=
natCast_eq_mod n
Expand Down
6 changes: 1 addition & 5 deletions Mathlib/Algebra/Group/Ext.lean
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,7 @@ theorem CancelMonoid.toRightCancelMonoid_injective {M : Type u} :
theorem CancelCommMonoid.toCommMonoid_injective {M : Type u} :
Function.Injective (@CancelCommMonoid.toCommMonoid M) := by
rintro @⟨@⟨@⟨⟩⟩⟩ @⟨@⟨@⟨⟩⟩⟩ h
#adaptation_note /-- Before leanprover/lean4#13166, the last line was `grind`.
The new type-directed canonicalizer tries to synthesize `Monoid M` / `CommMonoid M` to normalize
sub-expressions, but fails because after `rintro` the instances exist only as destructured fields
in the local context, not as registered typeclass instances. -/
cases h; rfl
grind

@[to_additive (attr := ext)]
theorem CancelCommMonoid.ext {M : Type*} ⦃m₁ m₂ : CancelCommMonoid M⦄
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Module/Submodule/LinearMap.lean
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ theorem subtype_comp_codRestrict (p : Submodule R₂ M₂) (h : ∀ b, f b ∈ p
section

variable {M₂' : Type*} [AddCommMonoid M₂'] [Module R₂ M₂']
(p : M₂' →ₗ[R₂] M₂) (hp : Injective p) (h : ∀ c, f c ∈ range p)
(p : M₂' →ₗ[R₂] M₂) (hp : Injective p) (h : ∀ c, f c ∈ range p)

/-- A linear map `f : M → M₂` whose values lie in the image of an injective linear map
`p : M₂' → M₂` admits a unique lift to a linear map `M → M₂'`. -/
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/Algebra/Order/Floor/Div.lean
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ noncomputable instance instFloorDiv : FloorDiv α (ι →₀ β) where
zero_floorDiv a := by ext; exact zero_floorDiv _

lemma floorDiv_def (f : ι →₀ β) (a : α) : f ⌊/⌋ a = f.mapRange (· ⌊/⌋ a) (zero_floorDiv _) := rfl
set_option warning.simp.otherHead false in
@[norm_cast] lemma coe_floorDiv (f : ι →₀ β) (a : α) : f ⌊/⌋ a = fun i ↦ f i ⌊/⌋ a := rfl
@[simp] lemma floorDiv_apply (f : ι →₀ β) (a : α) (i : ι) : (f ⌊/⌋ a) i = f i ⌊/⌋ a := rfl

Expand All @@ -267,6 +268,7 @@ noncomputable instance instCeilDiv : CeilDiv α (ι →₀ β) where
zero_ceilDiv a := by ext; exact zero_ceilDiv _

lemma ceilDiv_def (f : ι →₀ β) (a : α) : f ⌈/⌉ a = f.mapRange (· ⌈/⌉ a) (zero_ceilDiv _) := rfl
set_option warning.simp.otherHead false in
@[norm_cast] lemma coe_ceilDiv_def (f : ι →₀ β) (a : α) : f ⌈/⌉ a = fun i ↦ f i ⌈/⌉ a := rfl
@[simp] lemma ceilDiv_apply (f : ι →₀ β) (a : α) (i : ι) : (f ⌈/⌉ a) i = f i ⌈/⌉ a := rfl

Expand Down
4 changes: 2 additions & 2 deletions Mathlib/AlgebraicTopology/SimplicialSet/Horn.lean
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ lemma horn_obj_eq_univ {n : ℕ} (i : Fin (n + 1)) (m : ℕ) (h : m + 1 < n := b
Finset.card_singleton, add_le_add_iff_right] at this
have : n ≤ m + 1 := by simpa using this.trans Finset.card_image_le
lia
have : ∃ j, ¬j = i ∧ ∀ (i : Fin (m + 1)), ¬(stdSimplex.objEquiv.symm.{u} f) i = j :=
have : ∃ j, ¬j = i ∧ ∀ (i : Fin (m + 1)), ¬(stdSimplex.objEquiv.{u}.symm f) i = j :=
⟨j, hij, fun k hk ↦ hj ⟨k, hk⟩⟩
simpa [horn_eq_iSup] using this

Expand Down Expand Up @@ -140,7 +140,7 @@ lemma face_le_horn_iff {n : ℕ} (S : Finset (Fin (n + 2))) (j : Fin (n + 2)) :

lemma objEquiv_symm_notMem_horn_of_isIso {n : ℕ} (i : Fin (n + 1))
{d : SimplexCategory} (f : d ⟶ ⦋n⦌) [IsIso f] :
stdSimplex.objEquiv.symm.{u} f ∉ Λ[n, i].obj (op d) := by
stdSimplex.objEquiv.{u}.symm f ∉ Λ[n, i].obj (op d) := by
rw [mem_horn_iff, ne_eq, not_not]
ext i
simpa using Or.inr ⟨inv f i, by simp [stdSimplex.coe_asOrderHom_objEquiv_symm.{u}]⟩
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Analytic/ChangeOrigin.lean
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ open scoped NNReal ENNReal Topology
open Filter Set

variable {𝕜 E F : Type*} [NontriviallyNormedField 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 E]
[NormedAddCommGroup F] [NormedSpace 𝕜 F]
[NormedAddCommGroup F] [NormedSpace 𝕜 F]

namespace FormalMultilinearSeries

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Distribution/Distribution.lean
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ end mapCLM
section DiracDelta

/-- The Dirac delta distribution. This is zero if `x` does not belong to `Ω`. -/
def delta (x : E) : 𝓓'^{n}(Ω, ℝ) where
noncomputable def delta (x : E) : 𝓓'^{n}(Ω, ℝ) where
toFun f := f x
map_add' _ _ := rfl
map_smul' _ _ := rfl
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Normed/Module/Ray.lean
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public section
open Real

variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*}
[NormedAddCommGroup F] [NormedSpace ℝ F]
[NormedAddCommGroup F] [NormedSpace ℝ F]

namespace SameRay

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Normed/Operator/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ theorem closedBall_subset_range_iff_surjective [RingHomSurjective σ₁₂] {f :
by simp_all⟩

variable {F' 𝓕' : Type*} [NormedAddCommGroup F'] [NormedSpace ℝ F'] [Nontrivial F']
{τ : 𝕜 →+* ℝ} [FunLike 𝓕' E F'] [SemilinearMapClass 𝓕' τ E F']
{τ : 𝕜 →+* ℝ} [FunLike 𝓕' E F'] [SemilinearMapClass 𝓕' τ E F']

theorem sphere_subset_range_iff_surjective [RingHomSurjective τ] {f : 𝓕'} {x : F'} {r : ℝ}
(hr : 0 < r) : sphere x r ⊆ Set.range f ↔ (⇑f).Surjective := by
Expand Down
6 changes: 1 addition & 5 deletions Mathlib/Analysis/SpecialFunctions/Integrals/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,7 @@ theorem integral_cos_mul_complex {z : ℂ} (hz : z ≠ 0) (a b : ℝ) :
have b : HasDerivAt (fun y => y * z : ℂ → ℂ) z ↑x := hasDerivAt_mul_const _
have c : HasDerivAt (Complex.sin ∘ fun y : ℂ => (y * z)) _ ↑x := HasDerivAt.comp (𝕜 := ℂ) x a b
have d := HasDerivAt.comp_ofReal (c.div_const z)
#adaptation_note /-- Before https://github.com/leanprover/lean4/pull/13166
(replacing grind's canonicalizer with a type-directed normalizer), `grind` closed this goal.
It is not yet clear whether this is due to defeq abuse in Mathlib or a problem in the new
canonicalizer; a minimization would help. The original proof was: `grind` -/
simpa [hz, mul_comm] using d
grind

theorem integral_cos_sq_sub_sin_sq :
∫ x in a..b, cos x ^ 2 - sin x ^ 2 = sin b * cos b - sin a * cos a := by
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/CategoryTheory/Sites/Precoverage.lean
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ alias mem_coverings_of_isIso := HasIsos.mem_coverings_of_isIso
alias sup_mem_coverings := IsStableUnderSup.sup_mem_coverings
alias hasPullbacks_of_mem := HasPullbacks.hasPullbacks_of_mem

set_option warning.simp.varHead false in
attribute [local simp] Presieve.ofArrows.obj_idx Presieve.ofArrows.hom_idx in
lemma mem_coverings_of_isPullback {J : Precoverage C} [IsStableUnderBaseChange J]
{ι : Type w} {S : C} {X : ι → C}
Expand All @@ -146,6 +147,7 @@ lemma mem_coverings_of_isPullback {J : Precoverage C} [IsStableUnderBaseChange J
refine le_antisymm (fun Z g ⟨i⟩ ↦ .mk _) fun Z g hg ↦ ?_
exact .mk' (Sum.inl ⟨⟨_, _⟩, hg⟩) (by cat_disch) (by cat_disch)

set_option warning.simp.varHead false in
attribute [local simp] Presieve.ofArrows.obj_idx Presieve.ofArrows.hom_idx in
lemma comp_mem_coverings {J : Precoverage C} [IsStableUnderComposition J] {ι : Type w}
{S : C} {X : ι → C} (f : ∀ i, X i ⟶ S) (hf : Presieve.ofArrows X f ∈ J S)
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/CategoryTheory/Sites/Sheaf.lean
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ abbrev Sheaf.homEquiv {X Y : Sheaf J A} : (X ⟶ Y) ≃ (X.obj ⟶ Y.obj) :=
def sheafToPresheafCompYonedaCompWhiskeringLeftSheafToPresheaf :
sheafToPresheaf J A ⋙ yoneda ⋙ (Functor.whiskeringLeft _ _ _).obj (sheafToPresheaf J A).op ≅
yoneda :=
Functor.isoWhiskerLeft _ (Functor.isoWhiskerRight uliftYonedaIsoYoneda.symm.{max u₁ v₂} _) ≪≫
Functor.isoWhiskerLeft _ (Functor.isoWhiskerRight uliftYonedaIsoYoneda.{max u₁ v₂}.symm _) ≪≫
(fullyFaithfulSheafToPresheaf J A).compUliftYonedaCompWhiskeringLeft ≪≫
uliftYonedaIsoYoneda

Expand All @@ -368,7 +368,7 @@ def sheafToPresheafCompCoyonedaCompWhiskeringLeftSheafToPresheaf :
(sheafToPresheaf J A).op ⋙ coyoneda ⋙
(Functor.whiskeringLeft _ _ _).obj (sheafToPresheaf J A) ≅
coyoneda :=
Functor.isoWhiskerLeft _ (Functor.isoWhiskerRight uliftCoyonedaIsoCoyoneda.symm.{max u₁ v₂} _) ≪≫
Functor.isoWhiskerLeft _ (Functor.isoWhiskerRight uliftCoyonedaIsoCoyoneda.{max u₁ v₂}.symm _) ≪≫
(fullyFaithfulSheafToPresheaf J A).compUliftCoyonedaCompWhiskeringLeft ≪≫
uliftCoyonedaIsoCoyoneda

Expand Down
6 changes: 3 additions & 3 deletions Mathlib/CategoryTheory/Sites/Sieves.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1256,13 +1256,13 @@ def uliftNatTransOfLe {S T : Sieve X} (h : S ≤ T) :
/-- A variant of `Sieve.functorInclusion` with universe lifting. -/
@[simps! app]
def uliftFunctorInclusion (S : Sieve X) :
S.uliftFunctor ⟶ uliftYoneda.obj.{w} X :=
S.uliftFunctor ⟶ uliftYoneda.{w}.obj X :=
Functor.whiskerRight S.functorInclusion CategoryTheory.uliftFunctor

/-- A variant of `Sieve.toFunctor` with universe lifting. -/
@[simps]
def toUliftFunctor (S : Sieve X) {Y : C} (f : Y ⟶ X) (hf : S f) :
uliftYoneda.obj.{w} Y ⟶ Sieve.uliftFunctor.{w} S where
uliftYoneda.{w}.obj Y ⟶ Sieve.uliftFunctor.{w} S where
app Z := TypeCat.ofHom fun g ↦ ⟨g.down ≫ f, S.downward_closed hf g.down⟩

theorem uliftNatTransOfLe_comm {S T : Sieve X} (h : S ≤ T) :
Expand All @@ -1279,7 +1279,7 @@ instance uliftFunctorInclusion_is_mono (S : Sieve X) :

/-- A variant of `Sieve.sieveOfSubfunctor` with universe lifting. -/
@[simps]
def sieveOfUliftSubfunctor {R : Cᵒᵖ ⥤ Type (max w v₁)} (f : R ⟶ uliftYoneda.obj.{w} X) :
def sieveOfUliftSubfunctor {R : Cᵒᵖ ⥤ Type max w v₁} (f : R ⟶ uliftYoneda.{w}.obj X) :
Sieve X where
arrows Y g := ∃ t, f.app (Opposite.op Y) t = { down := g }
downward_closed := by
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/CategoryTheory/Yoneda.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1290,15 +1290,15 @@ variable {C : Type u₁} [Category.{v₁} C]
/-- `FullyFaithful.homEquiv` as a natural isomorphism. -/
@[simps! hom_app inv_app]
def homNatIso {D : Type u₂} [Category.{v₂} D] {F : C ⥤ D} (hF : F.FullyFaithful) (X : C) :
F.op ⋙ uliftYoneda.obj.{v₁} (F.obj X) ≅ uliftYoneda.obj.{v₂} X :=
F.op ⋙ uliftYoneda.{v₁}.obj (F.obj X) ≅ uliftYoneda.{v₂}.obj X :=
NatIso.ofComponents
(fun Y => Equiv.toIso (Equiv.ulift.trans <| hF.homEquiv.symm.trans Equiv.ulift.symm))
(fun f => by ext; exact Equiv.ulift.injective (hF.map_injective (by simp)))

/-- `FullyFaithful.homEquiv` as a natural isomorphism. -/
@[deprecated homNatIso (since := "2025-10-28")]
def homNatIsoMaxRight {D : Type u₂} [Category.{max v₁ v₂} D] {F : C ⥤ D} (hF : F.FullyFaithful)
(X : C) : F.op ⋙ yoneda.obj (F.obj X) ≅ uliftYoneda.obj.{v₂} X :=
(X : C) : F.op ⋙ yoneda.obj (F.obj X) ≅ uliftYoneda.{v₂}.obj X :=
isoWhiskerLeft F.op (uliftYonedaIsoYoneda.symm.app _) ≪≫ hF.homNatIso _ ≪≫
NatIso.ofComponents (fun _ => Equiv.toIso (Equiv.ulift.trans Equiv.ulift.symm))

Expand All @@ -1318,15 +1318,15 @@ def compUliftYonedaCompWhiskeringLeft {D : Type u₂} [Category.{v₂} D] {F : C
@[deprecated compUliftYonedaCompWhiskeringLeft (since := "2025-10-28")]
def compYonedaCompWhiskeringLeftMaxRight {D : Type u₂} [Category.{max v₁ v₂} D] {F : C ⥤ D}
(hF : F.FullyFaithful) : F ⋙ yoneda ⋙ (whiskeringLeft _ _ _).obj F.op ≅ uliftYoneda.{v₂} := by
refine isoWhiskerLeft F (isoWhiskerRight uliftYonedaIsoYoneda.symm.{v₁} _) ≪≫
refine isoWhiskerLeft F (isoWhiskerRight uliftYonedaIsoYoneda.{v₁}.symm _) ≪≫
hF.compUliftYonedaCompWhiskeringLeft ≪≫
NatIso.ofComponents (fun _ => NatIso.ofComponents
(fun _ => Equiv.toIso (Equiv.ulift.trans Equiv.ulift.symm)))

/-- `FullyFaithful.homEquiv` as a natural isomorphism, using coyoneda. -/
@[simps! hom_app inv_app]
def homNatIso' {D : Type u₂} [Category.{v₂} D] {F : C ⥤ D} (hF : F.FullyFaithful) (X : C) :
F ⋙ uliftCoyoneda.obj.{v₁} (op (F.obj X)) ≅ uliftCoyoneda.obj.{v₂} (op X) :=
F ⋙ uliftCoyoneda.{v₁}.obj (op (F.obj X)) ≅ uliftCoyoneda.{v₂}.obj (op X) :=
NatIso.ofComponents
(fun Y => Equiv.toIso (Equiv.ulift.trans <| hF.homEquiv.symm.trans Equiv.ulift.symm))
(fun f => by ext; exact Equiv.ulift.injective (hF.map_injective (by simp)))
Expand Down
2 changes: 0 additions & 2 deletions Mathlib/Combinatorics/Matroid/Init.lean
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ This module defines the `Matroid` Aesop rule set which is used by the
they're declared is imported, so we must put this declaration into its own file.
-/

public section

declare_aesop_rule_sets [Matroid]
6 changes: 1 addition & 5 deletions Mathlib/Combinatorics/SimpleGraph/Acyclic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,7 @@ lemma exists_isCycle_of_two_le_isEdgeReachable {u v : V} (huv : u ≠ v) {n :
(h : G.IsEdgeReachable n u v) : ∃ w : G.Walk u u, w.IsCycle := by
classical
obtain ⟨w, hw, h⟩ := exists_adj_isEdgeReachable_two huv (h.anti hn)
#adaptation_note /-- Before https://github.com/leanprover/lean4/pull/13166
(replacing grind's canonicalizer with a type-directed normalizer), this was just
`have := @h {s(u, w)} (by simp)`. It is not yet clear whether this is due to defeq abuse in
Mathlib or a problem in the new canonicalizer; a minimization would help. -/
have := @h {s(u, w)} (by simp only [Set.encard_singleton, Nat.cast_ofNat]; decide)
have := @h {s(u, w)} (by simp)
obtain ⟨w, p, hp₁, hp₂⟩ := adj_and_reachable_delete_edges_iff_exists_cycle.mp ⟨hw, this⟩
exact ⟨p.rotate _ (p.fst_mem_support_of_mem_edges hp₂), hp₁.rotate _⟩

Expand Down
2 changes: 0 additions & 2 deletions Mathlib/Combinatorics/SimpleGraph/Init.lean
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ This module defines the `SimpleGraph` Aesop rule set which is used by the
they're declared is imported, so we must put this declaration into its own file.
-/

public section

declare_aesop_rule_sets [SimpleGraph]
3 changes: 1 addition & 2 deletions Mathlib/Data/Fin/VecNotation.lean
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,7 @@ theorem vecAlt1_vecAppend (v : Fin (n + 1) → α) :
simp only [Nat.mod_add_mod,
Nat.mod_eq_sub_mod h, show 1 % (n + 2) = 1 from Nat.mod_eq_of_lt (by lia)]
refine (Nat.mod_eq_of_lt ?_).symm
#adaptation_note /-- After leanprover/lean4#13166, the `lia` tactic was timing out here. -/
omega
lia

@[simp]
theorem vecHead_vecAlt0 (hm : m + 2 = n + 1 + (n + 1)) (v : Fin (m + 2) → α) :
Expand Down
2 changes: 0 additions & 2 deletions Mathlib/Data/Finset/Attr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ public import Aesop.Frontend
This file defines `finsetNonempty`, an aesop rule set to prove that a given finset is nonempty.
-/

public section

-- `finsetNonempty` rules try to prove that a given finset is nonempty,
-- for use in positivity extensions.
declare_aesop_rule_sets [finsetNonempty] (default := true)
4 changes: 0 additions & 4 deletions Mathlib/Data/Matrix/Reflection.lean
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,6 @@ example [NonUnitalNonAssocSemiring α] (a₁₁ a₁₂ a₂₁ a₂₂ b₁ b
def etaExpand {m n} (A : Matrix (Fin m) (Fin n) α) : Matrix (Fin m) (Fin n) α :=
Matrix.of (FinVec.etaExpand fun i => FinVec.etaExpand fun j => A i j)

#adaptation_note /-- Before https://github.com/leanprover/lean4/pull/13166
(replacing grind's canonicalizer with a type-directed normalizer), `grind` closed this goal.
It is not yet clear whether this is due to defeq abuse in Mathlib or a problem in the new
canonicalizer; a minimization would help. The original proof was: `grind` -/
/-- This can be used to prove
```lean
example (A : Matrix (Fin 2) (Fin 2) α) :
Expand Down
2 changes: 0 additions & 2 deletions Mathlib/Data/Sym/Sym2/Init.lean
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ visible once the file in which they're declared is imported, so we must put this
declaration into its own file.
-/

public section

declare_aesop_rule_sets [Sym2]
10 changes: 10 additions & 0 deletions Mathlib/FieldTheory/Finite/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ theorem pow_card_pow (n : ℕ) (a : K) : a ^ q ^ n = a := by

end

section

variable [Field K] [Fintype K]

open Lean in
instance instGrindPowIdentity : Grind.PowIdentity K (Fintype.card K) where
pow_eq := pow_card

end

variable (K) [Field K] [Fintype K]

/-- The cardinality `q` is a power of the characteristic of `K`. -/
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Geometry/Manifold/Algebra/LieGroup.lean
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ functions `f : M → N` is `C^n` whenever the denominator is non-zero.
section Div

variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {n : WithTop ℕ∞}
{H : Type*} [TopologicalSpace H] {E : Type*}
{H : Type*} [TopologicalSpace H] {E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {I : ModelWithCorners 𝕜 E H} {G : Type*}
[TopologicalSpace G] [ChartedSpace H G] [GroupWithZero G] [ContMDiffInv₀ I n G]
[ContMDiffMul I n G]
Expand Down
6 changes: 3 additions & 3 deletions Mathlib/GroupTheory/FreeGroup/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,14 @@ protected theorem sublist : Red L₁ L₂ → L₂ <+ L₁ :=
theorem length_le (h : Red L₁ L₂) : L₂.length ≤ L₁.length :=
h.sublist.length_le


@[to_additive]
@[to_additive (attr := deprecated "Should not be needed." (since := "2026-04-10"))]
theorem sizeof_of_step : ∀ {L₁ L₂ : List (α × Bool)},
Step L₁ L₂ → sizeOf L₂ < sizeOf L₁
| _, _, @Step.not _ L1 L2 x b => by
induction L1 with
| nil =>
dsimp
-- This was just `dsimp` prior to https://github.com/leanprover/lean4/pull/13320
dsimp [sizeOf, _sizeOf_1]
lia
| cons hd tl ih =>
dsimp
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Logic/Embedding/Set.lean
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ the natural injection from the sigma-type `(i : ι) × ↑(s i)` to `α`. -/
obtain rfl : i = j := h.eq (not_disjoint_iff.2 ⟨_, hx, hx'⟩)
rfl

set_option warning.simp.otherHead false in
@[norm_cast] lemma Function.Embedding.coe_sigmaSet {s : ι → Set α} (h) :
(Function.Embedding.sigmaSet h : ((i : ι) × s i) → α) = fun x ↦ x.2.1 := rfl

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/MeasureTheory/Measure/AddContent.lean
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ open scoped ENNReal Topology Function
namespace MeasureTheory

variable {α : Type*} {C : Set (Set α)} {s t : Set α} {I : Finset (Set α)}
{G : Type*} [AddCommMonoid G]
{G : Type*} [AddCommMonoid G]

variable (G) in
/-- An additive content is a set function with value 0 at the empty set which is finitely additive
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/MeasureTheory/VectorMeasure/AddContent.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ open scoped symmDiff
namespace MeasureTheory.VectorMeasure

variable {α : Type*} {hα : MeasurableSpace α} {E : Type*} [NormedAddCommGroup E]
[CompleteSpace E] {μ : Measure α}
[CompleteSpace E] {μ : Measure α}

/-- A finitely additive vector measure which is dominated by a finite positive measure is in
fact countably additive. -/
Expand Down
Loading
Loading