Skip to content

Commit 69101a8

Browse files
kim-emmathlib4-botmathlib-nightly-testing[bot]leanprover-community-mathlib4-botkmill
committed
chore: adaptations for nightly-2026-04-10 (#208)
Co-authored-by: mathlib4-bot <github-mathlib4-bot@leanprover.zulipchat.com> Co-authored-by: mathlib-nightly-testing[bot] <mathlib-nightly-testing[bot]@users.noreply.github.com> Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com>
1 parent fad6317 commit 69101a8

41 files changed

Lines changed: 113 additions & 151 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

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/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/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}]⟩

Mathlib/Analysis/Analytic/ChangeOrigin.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ open scoped NNReal ENNReal Topology
4343
open Filter Set
4444

4545
variable {𝕜 E F : Type*} [NontriviallyNormedField 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 E]
46-
[NormedAddCommGroup F] [NormedSpace 𝕜 F]
46+
[NormedAddCommGroup F] [NormedSpace 𝕜 F]
4747

4848
namespace FormalMultilinearSeries
4949

Mathlib/Analysis/Normed/Module/Ray.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public section
2222
open Real
2323

2424
variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace ℝ E] {F : Type*}
25-
[NormedAddCommGroup F] [NormedSpace ℝ F]
25+
[NormedAddCommGroup F] [NormedSpace ℝ F]
2626

2727
namespace SameRay
2828

Mathlib/Analysis/Normed/Operator/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ theorem closedBall_subset_range_iff_surjective [RingHomSurjective σ₁₂] {f :
7979
by simp_all⟩
8080

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

8484
theorem sphere_subset_range_iff_surjective [RingHomSurjective τ] {f : 𝓕'} {x : F'} {r : ℝ}
8585
(hr : 0 < r) : sphere x r ⊆ Set.range f ↔ (⇑f).Surjective := by

Mathlib/Analysis/SpecialFunctions/Integrals/Basic.lean

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,7 @@ theorem integral_cos_mul_complex {z : ℂ} (hz : z ≠ 0) (a b : ℝ) :
331331
have b : HasDerivAt (fun y => y * z : ℂ → ℂ) z ↑x := hasDerivAt_mul_const _
332332
have c : HasDerivAt (Complex.sin ∘ fun y : ℂ => (y * z)) _ ↑x := HasDerivAt.comp (𝕜 := ℂ) x a b
333333
have d := HasDerivAt.comp_ofReal (c.div_const z)
334-
#adaptation_note /-- Before https://github.com/leanprover/lean4/pull/13166
335-
(replacing grind's canonicalizer with a type-directed normalizer), `grind` closed this goal.
336-
It is not yet clear whether this is due to defeq abuse in Mathlib or a problem in the new
337-
canonicalizer; a minimization would help. The original proof was: `grind` -/
338-
simpa [hz, mul_comm] using d
334+
grind
339335

340336
theorem integral_cos_sq_sub_sin_sq :
341337
∫ x in a..b, cos x ^ 2 - sin x ^ 2 = sin b * cos b - sin a * cos a := by

Mathlib/CategoryTheory/Sites/Sheaf.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ abbrev Sheaf.homEquiv {X Y : Sheaf J A} : (X ⟶ Y) ≃ (X.obj ⟶ Y.obj) :=
353353
def sheafToPresheafCompYonedaCompWhiskeringLeftSheafToPresheaf :
354354
sheafToPresheaf J A ⋙ yoneda ⋙ (Functor.whiskeringLeft _ _ _).obj (sheafToPresheaf J A).op ≅
355355
yoneda :=
356-
Functor.isoWhiskerLeft _ (Functor.isoWhiskerRight uliftYonedaIsoYoneda.symm.{max u₁ v₂} _) ≪≫
356+
Functor.isoWhiskerLeft _ (Functor.isoWhiskerRight uliftYonedaIsoYoneda.{max u₁ v₂}.symm _) ≪≫
357357
(fullyFaithfulSheafToPresheaf J A).compUliftYonedaCompWhiskeringLeft ≪≫
358358
uliftYonedaIsoYoneda
359359

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

0 commit comments

Comments
 (0)