Skip to content

Commit dc5d5b4

Browse files
urkudkim-em
andcommitted
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent 85a4f8e commit dc5d5b4

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

Mathlib/Combinatorics/Enumerative/Composition.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ theorem get_splitWrtCompositionAux (l : List α) (ns : List ℕ) {i : ℕ} (hi)
714714
· cases hi
715715
cases' i with i
716716
· rw [Nat.add_zero, List.take_zero, sum_nil]
717-
simpa using get_zero hi
717+
simpa using get_mk_zero hi
718718
· simp only [splitWrtCompositionAux._eq_2, get_cons_succ, IH, take,
719719
sum_cons, Nat.add_eq, add_zero, splitAt_eq_take_drop, drop_take, drop_drop]
720720
rw [Nat.succ_eq_add_one, add_comm (sum _) n, Nat.add_sub_add_left]

Mathlib/Data/List/Basic.lean

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,11 +1294,9 @@ theorem nthLe_of_eq {L L' : List α} (h : L = L') {i : ℕ} (hi : i < L.length)
12941294
theorem nthLe_singleton (a : α) {n : ℕ} (hn : n < 1) : nthLe [a] n hn = a := get_singleton ..
12951295
#align list.nth_le_singleton List.nthLe_singleton
12961296

1297-
@[deprecated] -- 2023-01-05 -- FIXME: replacement -- it's not `get_zero` and it's not `get?_zero`
1298-
theorem nthLe_zero [Inhabited α] {L : List α} (h : 0 < L.length) : List.nthLe L 0 h = L.head! := by
1299-
cases L
1300-
cases h
1301-
simp [nthLe]
1297+
@[deprecated get_mk_zero] -- 2023-01-05
1298+
theorem nthLe_zero {L : List α} (h : 0 < L.length) : List.nthLe L 0 h = L.head (length_pos.1 h) :=
1299+
get_mk_zero h
13021300
#align list.nth_le_zero List.nthLe_zero
13031301

13041302
#align list.nth_le_append List.get_append

Mathlib/Data/List/Rotate.lean

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -592,14 +592,14 @@ theorem get_cyclicPermutations (l : List α) (n : Fin (length (cyclicPermutation
592592
#align list.nth_le_cyclic_permutations List.get_cyclicPermutations
593593

594594
@[simp]
595-
theorem head?_cyclicPermutations (l : List α) : (cyclicPermutations l).head? = l := by
595+
theorem head_cyclicPermutations (l : List α) :
596+
(cyclicPermutations l).head (cyclicPermutations_ne_nil l) = l := by
596597
have h : 0 < length (cyclicPermutations l) := length_pos_of_ne_nil (cyclicPermutations_ne_nil _)
597-
simp_rw [← get_zero h, get_cyclicPermutations, rotate_zero]
598+
rw [← get_mk_zero h, get_cyclicPermutations, Fin.val_mk, rotate_zero]
598599

599600
@[simp]
600-
theorem head_cyclicPermutations (l : List α) :
601-
(cyclicPermutations l).head (cyclicPermutations_ne_nil l) = l := by
602-
rw [← Option.some_inj, ← head?_eq_head, head?_cyclicPermutations]
601+
theorem head?_cyclicPermutations (l : List α) : (cyclicPermutations l).head? = l := by
602+
rw [head?_eq_head, head_cyclicPermutations]
603603

604604
theorem cyclicPermutations_injective : Function.Injective (@cyclicPermutations α) := fun l l' h ↦ by
605605
simpa using congr_arg head? h

Mathlib/NumberTheory/Zsqrtd/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ theorem divides_sq_eq_zero {x y} (h : x * x = d * y * y) : x = 0 ∧ y = 0 :=
899899
Or.elim g.eq_zero_or_pos
900900
(fun H => ⟨Nat.eq_zero_of_gcd_eq_zero_left H, Nat.eq_zero_of_gcd_eq_zero_right H⟩) fun gpos =>
901901
False.elim <| by
902-
let ⟨m, n, co, (hx : x = m * g), (hy : y = n * g)⟩ := Nat.exists_coprime gpos
902+
let ⟨m, n, co, (hx : x = m * g), (hy : y = n * g)⟩ := Nat.exists_coprime _ _
903903
rw [hx, hy] at h
904904
have : m * m = d * (n * n) := by
905905
refine mul_left_cancel₀ (mul_pos gpos gpos).ne' ?_

lake-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[{"url": "https://github.com/leanprover/std4",
55
"type": "git",
66
"subDir": null,
7-
"rev": "e840c18f7334c751efbd4cfe531476e10c943cdb",
7+
"rev": "e1ed6c8bb71b2f97e298b1d90b7045403ee29884",
88
"name": "std",
99
"manifestFile": "lake-manifest.json",
1010
"inputRev": "main",

0 commit comments

Comments
 (0)