Skip to content

Commit 0450a81

Browse files
kim-emmathlib-nightly-testing[bot]thorimurleanprover-community-mathlib4-botwkrozowski
committed
chore: adaptations for nightly-2026-04-16 (#209)
Co-authored-by: mathlib-nightly-testing[bot] <mathlib-nightly-testing[bot]@users.noreply.github.com> Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com> Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Wojciech Rozowski <wojciech@lean-fro.org>
1 parent fad6317 commit 0450a81

67 files changed

Lines changed: 170 additions & 203 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build_template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ jobs:
222222
223223
- name: validate lake-manifest.json inputRevs
224224
# Only enforce this on the main mathlib4 repository, not on nightly-testing
225-
if: github.repository == 'leanprover-community/mathlib4'
225+
if: github.repository == 'leanprover-community/mathlib4' && github.ref_name != 'nightly-testing'
226226
shell: bash
227227
run: |
228228
cd pr-branch

Archive/Examples/IfNormalization/Result.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ We add some local simp lemmas so we can unfold the definitions of the normalizat
2424
attribute [local simp] normalized hasNestedIf hasConstantIf hasRedundantIf disjoint vars
2525
List.disjoint
2626

27+
set_option warning.simp.varHead false in
2728
attribute [local simp] apply_ite ite_eq_iff'
2829

2930
variable {b : Bool} {f : ℕ → Bool} {i : ℕ} {t e : IfExpr}

Archive/Imo/Imo2024Q6.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ lemma Aquaesulian.injective : Function.Injective f := by
5555
· exact (h.eq_of_apply_eq_inl he.symm hc).symm
5656
· exact h.eq_of_apply_eq_inl he hc
5757

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

72+
set_option warning.simp.varHead false in
7173
@[simp]
7274
lemma Aquaesulian.apply_neg_apply (x : G) : f (-(f x)) = -x := by
7375
rw [← add_eq_zero_iff_eq_neg]

Mathlib/Algebra/BigOperators/Group/List/Basic.lean

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,8 @@ lemma prod_map_erase [DecidableEq α] (f : α → M) {a} :
244244

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

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

253250
@[to_additive]
254251
lemma prod_mul_prod_eq_prod_zipWith_mul_prod_drop :

Mathlib/Algebra/Category/ModuleCat/Presheaf/Monoidal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ noncomputable instance monoidalCategory :
141141

142142
open BraidedCategory
143143

144-
instance symmetricCategory :
144+
noncomputable instance symmetricCategory :
145145
SymmetricCategory (PresheafOfModules.{u} (R ⋙ forget₂ _ _)) where
146146
braiding M₁ M₂ :=
147147
isoMk (fun X ↦ braiding (C := ModuleCat (R.obj X)) (M₁.obj X) (M₂.obj X))

Mathlib/Algebra/CharP/Two.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ theorem natCast_cases (n : ℕ) : (n : R) = 0 ∨ (n : R) = 1 :=
6464
theorem natCast_eq_mod (n : ℕ) : (n : R) = (n % 2 : ℕ) := by
6565
simp [natCast_eq_ite, Nat.even_iff]
6666

67+
set_option warning.simp.varHead false in
6768
@[scoped simp]
6869
theorem ofNat_eq_mod (n : ℕ) [n.AtLeastTwo] : (ofNat(n) : R) = (ofNat(n) % 2 : ℕ) :=
6970
natCast_eq_mod n

Mathlib/Algebra/Group/Ext.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,7 @@ theorem CancelMonoid.toRightCancelMonoid_injective {M : Type u} :
109109
theorem CancelCommMonoid.toCommMonoid_injective {M : Type u} :
110110
Function.Injective (@CancelCommMonoid.toCommMonoid M) := by
111111
rintro @⟨@⟨@⟨⟩⟩⟩ @⟨@⟨@⟨⟩⟩⟩ h
112-
#adaptation_note /-- Before leanprover/lean4#13166, the last line was `grind`.
113-
The new type-directed canonicalizer tries to synthesize `Monoid M` / `CommMonoid M` to normalize
114-
sub-expressions, but fails because after `rintro` the instances exist only as destructured fields
115-
in the local context, not as registered typeclass instances. -/
116-
cases h; rfl
112+
grind
117113

118114
@[to_additive (attr := ext)]
119115
theorem CancelCommMonoid.ext {M : Type*} ⦃m₁ m₂ : CancelCommMonoid M⦄

Mathlib/Algebra/Module/Submodule/LinearMap.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ theorem subtype_comp_codRestrict (p : Submodule R₂ M₂) (h : ∀ b, f b ∈ p
177177
section
178178

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

182182
/-- A linear map `f : M → M₂` whose values lie in the image of an injective linear map
183183
`p : M₂' → M₂` admits a unique lift to a linear map `M → M₂'`. -/

Mathlib/Algebra/Order/Floor/Div.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ noncomputable instance instFloorDiv : FloorDiv α (ι →₀ β) where
248248
zero_floorDiv a := by ext; exact zero_floorDiv _
249249

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

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

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

Mathlib/AlgebraicTopology/SimplicialSet/Horn.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ lemma horn_obj_eq_univ {n : ℕ} (i : Fin (n + 1)) (m : ℕ) (h : m + 1 < n := b
9494
Finset.card_singleton, add_le_add_iff_right] at this
9595
have : n ≤ m + 1 := by simpa using this.trans Finset.card_image_le
9696
lia
97-
have : ∃ j, ¬j = i ∧ ∀ (i : Fin (m + 1)), ¬(stdSimplex.objEquiv.symm.{u} f) i = j :=
97+
have : ∃ j, ¬j = i ∧ ∀ (i : Fin (m + 1)), ¬(stdSimplex.objEquiv.{u}.symm f) i = j :=
9898
⟨j, hij, fun k hk ↦ hj ⟨k, hk⟩⟩
9999
simpa [horn_eq_iSup] using this
100100

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

141141
lemma objEquiv_symm_notMem_horn_of_isIso {n : ℕ} (i : Fin (n + 1))
142142
{d : SimplexCategory} (f : d ⟶ ⦋n⦌) [IsIso f] :
143-
stdSimplex.objEquiv.symm.{u} f ∉ Λ[n, i].obj (op d) := by
143+
stdSimplex.objEquiv.{u}.symm f ∉ Λ[n, i].obj (op d) := by
144144
rw [mem_horn_iff, ne_eq, not_not]
145145
ext i
146146
simpa using Or.inr ⟨inv f i, by simp [stdSimplex.coe_asOrderHom_objEquiv_symm.{u}]⟩

0 commit comments

Comments
 (0)