Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 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
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
957e226
chore: adaptations for nightly-2026-04-10
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
2f4e09c
fix from nightly-testing
kim-em Apr 13, 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
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
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
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
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/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
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
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
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
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
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
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
1 change: 0 additions & 1 deletion Mathlib/Order/Bounded.lean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Authors: Violeta Hernández Palacios
-/
module

public import Mathlib.Tactic.Linter.DeprecatedModule
public import Mathlib.Order.RelClasses
public import Mathlib.Order.Interval.Set.Basic
public import Mathlib.Order.Bounds.Defs
Expand Down
1 change: 1 addition & 0 deletions Mathlib/RingTheory/Flat/Rank.lean
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ attribute [local instance] Module.free_of_flat_of_isLocalRing

variable {R S : Type*} [CommRing R] [CommRing S] [Algebra R S] [Module.Flat R S] [Module.Finite R S]

set_option backward.isDefEq.respectTransparency false in
lemma PrimeSpectrum.rankAtStalk_pos_iff_mem_range_comap (p : PrimeSpectrum R) :
0 < Module.rankAtStalk (R := R) S p ↔ p ∈ Set.range (PrimeSpectrum.comap (algebraMap R S)) := by
rw [Module.rankAtStalk_eq, Module.finrank_pos_iff, p.nontrivial_iff_mem_rangeComap]
Expand Down
24 changes: 12 additions & 12 deletions Mathlib/RingTheory/Ideal/Maps.lean
Original file line number Diff line number Diff line change
Expand Up @@ -421,18 +421,18 @@ If infinitely many of the `Rᵢ` are nontrivial, then there exists an ideal of `
is not of the form `Πᵢ Iᵢ`, namely the ideal of finitely supported elements of `Πᵢ Rᵢ`
(it is also not a principal ideal).) -/
@[simps!] def piOrderIso [Finite ι] : Ideal (Π i, R i) ≃o Π i, Ideal (R i) := .symm
{ toFun := pi
invFun I i := I.map (Pi.evalRingHom R i)
left_inv _ := funext map_evalRingHom_pi
right_inv I := by
ext r
simp_rw [mem_pi, mem_map_iff_of_surjective (Pi.evalRingHom R _) (Function.surjective_eval _)]
refine ⟨(fun ⟨r', hr'⟩ ↦ ?_) ∘ Classical.skolem.mp, fun hr i ↦ ⟨r, hr, rfl⟩⟩
have := Fintype.ofFinite ι
classical rw [show r = ∑ i, Pi.single i 1 * r' i from funext fun i ↦ by
rw [← (hr' _).2, Finset.sum_apply, Fintype.sum_eq_single i fun j ne ↦ by simp [ne]]; simp]
exact sum_mem fun i _ ↦ I.mul_mem_left _ (hr' i).1
map_rel_iff' := pi_le_pi_iff }
{ toFun := pi
invFun I i := I.map (Pi.evalRingHom R i)
left_inv _ := funext map_evalRingHom_pi
right_inv I := by
ext r
simp_rw [mem_pi, mem_map_iff_of_surjective (Pi.evalRingHom R _) (Function.surjective_eval _)]
refine ⟨(fun ⟨r', hr'⟩ ↦ ?_) ∘ Classical.skolem.mp, fun hr i ↦ ⟨r, hr, rfl⟩⟩
have := Fintype.ofFinite ι
classical rw [show r = ∑ i, Pi.single i 1 * r' i from funext fun i ↦ by
rw [← (hr' _).2, Finset.sum_apply, Fintype.sum_eq_single i fun j ne ↦ by simp [ne]]; simp]
exact sum_mem fun i _ ↦ I.mul_mem_left _ (hr' i).1
map_rel_iff' := pi_le_pi_iff }

instance [Finite ι] [∀ i, IsPrincipalIdealRing (R i)] : IsPrincipalIdealRing (Π i, R i) where
principal I := by
Expand Down
14 changes: 7 additions & 7 deletions Mathlib/RingTheory/MvPolynomial/Groebner.lean
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,13 @@ theorem div {ι : Type*} {b : ι → MvPolynomial σ R}
termination_by WellFounded.wrap
((isWellFounded_iff m.syn fun x x_1 ↦ x < x_1).mp m.wf) (m.toSyn (m.degree f))
decreasing_by
· exact deg_reduce
· apply degree_sub_LTerm_lt
intro hf0
apply hf'0
simp only [subLTerm, sub_eq_zero]
nth_rewrite 1 [eq_C_of_degree_eq_zero hf0, hf0]
simp
· exact deg_reduce
· apply degree_sub_LTerm_lt
intro hf0
apply hf'0
simp only [subLTerm, sub_eq_zero]
nth_rewrite 1 [eq_C_of_degree_eq_zero hf0, hf0]
simp

/-!
Module doc as workaround for a parser error that prevents using `set_option`
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/RingTheory/Valuation/ValuativeRel/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1214,10 +1214,10 @@ theorem orderMonoidIso_embed [v.Compatible] {Γ' : Type*} [LinearOrderedCommGrou
(w : Valuation R Γ') [w.Compatible] (x : ValueGroupWithZero R) (h : w.IsEquiv v) :
h.orderMonoidIso
(embed w x) = embed v x := by
simp only [embed, ← Valuation.restrict_def, coe_mk, ZeroHom.coe_mk]
induction x using ValueGroupWithZero.ind with
| mk r s =>
simp
simp only [embed, ← Valuation.restrict_def, coe_mk, ZeroHom.coe_mk]
induction x using ValueGroupWithZero.ind with
| mk r s =>
simp

/-- If a valuation `v` is compatible with the valuative relation, then `ValueGroupWithZero R`
is isomorphic to the image group (with zero) of `v` as an ordered group with zero. -/
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ end CompleteSpace
section Pi

variable {ι : Type*} {X : α → Type*} [∀ x, CommMonoid (X x)] [∀ x, TopologicalSpace (X x)]
{L : SummationFilter ι}
{L : SummationFilter ι}

@[to_additive]
theorem Pi.hasProd {f : ι → ∀ x, X x} {g : ∀ x, X x} :
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Topology/Algebra/InfiniteSum/GroupCompletion.lean
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public section
open UniformSpace.Completion

variable {α β : Type*} [AddCommGroup α] [UniformSpace α] [IsUniformAddGroup α]
{L : SummationFilter β}
{L : SummationFilter β}

/-- A function `f` has a sum in a uniform additive group `α` if and only if it has that sum in the
completion of `α`. -/
Expand Down
2 changes: 1 addition & 1 deletion MathlibTest/BasicFiles/Init.lean
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Mathlib.Init
proof_wanted please_prove_this : True

-- Guard against the shake tool modifying our imports
/-- info: [public import Init, import Mathlib.Init] -/
/-- info: [public import Init, public meta import Init, import Mathlib.Init] -/
#guard_msgs in
run_elab Lean.logInfo m!"{(← Lean.MonadEnv.getEnv).imports}"

Expand Down
2 changes: 1 addition & 1 deletion MathlibTest/BasicFiles/Tactic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ import Mathlib.Tactic
#find_syntax "test_find_syntax" approx

-- Guard against the shake tool modifying our imports
/-- info: [public import Init, import Mathlib.Tactic] -/
/-- info: [public import Init, public meta import Init, import Mathlib.Tactic] -/
#guard_msgs in
run_elab Lean.logInfo m!"{(← Lean.MonadEnv.getEnv).imports}"
Loading
Loading