Skip to content

Commit 1988a78

Browse files
kim-emkbuzzardleanprover-community-mathlib4-botgithub-actionsTwoFX
committed
chore: bump toolchain to v4.26.0-rc1 (#31763)
Co-authored-by: Kevin Buzzard <k.buzzard@imperial.ac.uk> Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Markus Himmel <markus@lean-fro.org> Co-authored-by: mathlib4-bot <github-mathlib4-bot@leanprover.zulipchat.com>
1 parent 5c955f0 commit 1988a78

File tree

311 files changed

+828
-671
lines changed

Some content is hidden

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

311 files changed

+828
-671
lines changed

Archive/Imo/Imo1988Q6.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,14 @@ theorem imo1988_q6 {a b : ℕ} (h : a * b + 1 ∣ a ^ 2 + b ^ 2) :
233233
rw [← sub_eq_zero, ← h_root]
234234
ring
235235
rw [hzx] at hpos
236-
replace hpos : z * x + 1 > 0 := pos_of_mul_pos_left hpos (Int.ofNat_zero_le k)
236+
replace hpos : z * x + 1 > 0 := pos_of_mul_pos_left hpos (Int.natCast_nonneg k)
237237
replace hpos : z * x ≥ 0 := Int.le_of_lt_add_one hpos
238238
apply nonneg_of_mul_nonneg_left hpos (mod_cast hx)
239239
· contrapose! hV₀ with x_lt_z
240240
apply ne_of_gt
241241
calc
242242
z * y > x * x := by apply mul_lt_mul' <;> omega
243-
_ ≥ x * x - k := sub_le_self _ (Int.ofNat_zero_le k)
243+
_ ≥ x * x - k := sub_le_self _ (Int.natCast_nonneg k)
244244
· -- There is no base case in this application of Vieta jumping.
245245
simp
246246

Archive/Imo/Imo1997Q3.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ lemma sign_eq_of_contra
8282
rw [mem_compl, mem_insert, mem_singleton, not_or] at mj
8383
exact swap_apply_of_ne_of_ne mj.1 mj.2
8484
rw [cg, add_sub_add_right_eq_sub,
85-
sum_pair (castSucc_lt_succ _).ne, sum_pair (castSucc_lt_succ _).ne,
85+
sum_pair castSucc_lt_succ.ne, sum_pair castSucc_lt_succ.ne,
8686
Perm.mul_apply, Perm.mul_apply, ← hi, swap_apply_left, swap_apply_right,
8787
add_comm, add_sub_add_comm, ← sub_mul, ← sub_mul,
8888
val_succ, coe_castSucc, Nat.cast_add, Nat.cast_one, add_sub_cancel_left, sub_add_cancel_left,

Archive/Imo/Imo2024Q5.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ lemma Path.findFstEq_fst_sub_one_mem (p : Path N) {r : Fin (N + 2)} (hr : r ≠
387387
rw [← cells.takeWhile_append_dropWhile (p := fun c ↦ ! decide (r ≤ c.1)),
388388
List.isChain_append] at valid_move_seq
389389
have ha := valid_move_seq.2.2
390-
simp only [List.head?_eq_head hd', List.getLast?_eq_getLast ht, Option.mem_def,
390+
simp only [List.head?_eq_some_head hd', List.getLast?_eq_some_getLast ht, Option.mem_def,
391391
Option.some.injEq, forall_eq'] at ha
392392
nth_rw 1 [← cells.takeWhile_append_dropWhile (p := fun c ↦ ! decide (r ≤ c.1))]
393393
refine List.mem_append_left _ ?_

Archive/MiuLanguage/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def lcharToMiustr : List Char → Miustr
132132
| _ => []
133133

134134
instance stringCoeMiustr : Coe String Miustr :=
135-
fun st => lcharToMiustr st.data
135+
fun st => lcharToMiustr st.toList
136136

137137
/-!
138138
### Derivability

Archive/Wiedijk100Theorems/BallotProblem.lean

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,17 @@ theorem counted_succ_succ (p q : ℕ) :
114114
obtain ⟨hl₀, hl₁, hl₂⟩ := hl
115115
obtain hlast | hlast := hl₂ (l.head hlnil) (List.head_mem hlnil)
116116
· refine Or.inl ⟨l.tail, ⟨?_, ?_, ?_⟩, ?_⟩
117-
· rw [List.count_tail, hl₀, List.head?_eq_head hlnil, hlast, beq_self_eq_true, if_pos rfl,
118-
Nat.add_sub_cancel]
119-
· rw [List.count_tail, hl₁, List.head?_eq_head hlnil, hlast, if_neg (by decide), Nat.sub_zero]
117+
· rw [List.count_tail, hl₀, List.head?_eq_some_head hlnil, hlast, beq_self_eq_true,
118+
if_pos rfl, Nat.add_sub_cancel]
119+
· rw [List.count_tail, hl₁, List.head?_eq_some_head hlnil, hlast, if_neg (by decide),
120+
Nat.sub_zero]
120121
· exact fun x hx => hl₂ x (List.mem_of_mem_tail hx)
121122
· rw [← hlast, List.cons_head_tail]
122123
· refine Or.inr ⟨l.tail, ⟨?_, ?_, ?_⟩, ?_⟩
123-
· rw [List.count_tail, hl₀, List.head?_eq_head hlnil, hlast, if_neg (by decide), Nat.sub_zero]
124-
· rw [List.count_tail, hl₁, List.head?_eq_head hlnil, hlast, beq_self_eq_true, if_pos rfl,
125-
Nat.add_sub_cancel]
124+
· rw [List.count_tail, hl₀, List.head?_eq_some_head hlnil, hlast, if_neg (by decide),
125+
Nat.sub_zero]
126+
· rw [List.count_tail, hl₁, List.head?_eq_some_head hlnil, hlast, beq_self_eq_true,
127+
if_pos rfl, Nat.add_sub_cancel]
126128
· exact fun x hx => hl₂ x (List.mem_of_mem_tail hx)
127129
· rw [← hlast, List.cons_head_tail]
128130
· rintro (⟨t, ⟨ht₀, ht₁, ht₂⟩, rfl⟩ | ⟨t, ⟨ht₀, ht₁, ht₂⟩, rfl⟩)

Cache/Requests.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def extractRepoFromUrl (url : String) : Option String := do
3131
let url := url.stripSuffix ".git"
3232
let pos ← url.revFind (· == '/')
3333
let pos ← url.revFindAux (fun c => c == '/' || c == ':') pos
34-
return (String.Pos.Raw.extract url) (String.Pos.Raw.next url pos) url.endPos
34+
return (String.Pos.Raw.extract url) (String.Pos.Raw.next url pos) url.rawEndPos
3535

3636
/-- Spot check if a URL is valid for a git remote -/
3737
def isRemoteURL (url : String) : Bool :=

Counterexamples/PolynomialIsDomain.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ instance : AddCommSemigroup NatMaxAdd where
3939

4040
instance : AddZeroClass NatMaxAdd where
4141
zero := mk 0
42-
zero_add _ := mk.symm.injective (bot_sup_eq _)
42+
zero_add _ := rfl
4343
add_zero _ := mk.symm.injective (sup_bot_eq _)
4444

4545
instance : CommMonoidWithZero NatMaxAdd := mk.symm.commMonoidWithZero

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3733,6 +3733,7 @@ import Mathlib.Data.Rat.Cardinal
37333733
import Mathlib.Data.Rat.Cast.CharZero
37343734
import Mathlib.Data.Rat.Cast.Defs
37353735
import Mathlib.Data.Rat.Cast.Lemmas
3736+
import Mathlib.Data.Rat.Cast.OfScientific
37363737
import Mathlib.Data.Rat.Cast.Order
37373738
import Mathlib.Data.Rat.Defs
37383739
import Mathlib.Data.Rat.Denumerable

Mathlib/Algebra/Algebra/NonUnitalSubalgebra.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ theorem coe_codRestrict (f : F) (S : NonUnitalSubalgebra R B) (hf : ∀ x, f x
494494

495495
theorem injective_codRestrict (f : F) (S : NonUnitalSubalgebra R B) (hf : ∀ x : A, f x ∈ S) :
496496
Function.Injective (NonUnitalAlgHom.codRestrict f S hf) ↔ Function.Injective f :=
497-
fun H _x _y hxy => H <| Subtype.eq hxy, fun H _x _y hxy => H (congr_arg Subtype.val hxy :)⟩
497+
fun H _x _y hxy => H <| Subtype.ext hxy, fun H _x _y hxy => H (congr_arg Subtype.val hxy :)⟩
498498

499499
/-- Restrict the codomain of an `NonUnitalAlgHom` `f` to `f.range`.
500500

Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ instance (priority := 500) algebra' [CommSemiring R'] [SMul R' R] [Algebra R' A]
315315
rw [Algebra.algebraMap_eq_smul_one, ← smul_one_smul R x (1 : A), ←
316316
Algebra.algebraMap_eq_smul_one]
317317
exact algebraMap_mem S _
318-
commutes' := fun _ _ => Subtype.eq <| Algebra.commutes _ _
319-
smul_def' := fun _ _ => Subtype.eq <| Algebra.smul_def _ _
318+
commutes' := fun _ _ => Subtype.ext <| Algebra.commutes _ _
319+
smul_def' := fun _ _ => Subtype.ext <| Algebra.smul_def _ _
320320

321321
instance algebra : Algebra R S := S.algebra'
322322

@@ -543,7 +543,7 @@ theorem range_comp_le_range (f : A →ₐ[R] B) (g : B →ₐ[R] C) : (g.comp f)
543543

544544
/-- Restrict the codomain of an algebra homomorphism. -/
545545
def codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f x ∈ S) : A →ₐ[R] S :=
546-
{ RingHom.codRestrict (f : A →+* B) S hf with commutes' := fun r => Subtype.eq <| f.commutes r }
546+
{ RingHom.codRestrict (f : A →+* B) S hf with commutes' := fun r => Subtype.ext <| f.commutes r }
547547

548548
@[simp]
549549
theorem val_comp_codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f x ∈ S) :
@@ -557,7 +557,7 @@ theorem coe_codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f
557557

558558
theorem injective_codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f x ∈ S) :
559559
Function.Injective (f.codRestrict S hf) ↔ Function.Injective f :=
560-
fun H _x _y hxy => H <| Subtype.eq hxy, fun H _x _y hxy => H (congr_arg Subtype.val hxy :)⟩
560+
fun H _x _y hxy => H <| Subtype.ext hxy, fun H _x _y hxy => H (congr_arg Subtype.val hxy :)⟩
561561

562562
/-- Restrict the codomain of an `AlgHom` `f` to `f.range`.
563563

0 commit comments

Comments
 (0)