Skip to content

Commit 0fa80a7

Browse files
committed
chore(Data/List/Basic): fix errors
1 parent b4a334c commit 0fa80a7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Mathlib/Data/List/Basic.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,14 @@ theorem get_surjective_iff {l : List α} : l.get.Surjective ↔ (∀ x, x ∈ l)
451451

452452
@[simp]
453453
theorem getElem_fin_surjective_iff {l : List α} :
454-
(fun (n : Fin l.length) ↦ l[n]).Surjective ↔ (∀ x, x ∈ l) :=
454+
(fun (n : Fin l.length) ↦ l[n.val]).Surjective ↔ (∀ x, x ∈ l) :=
455455
get_surjective_iff
456456

457457
@[simp]
458458
theorem getElem?_surjective_iff {l : List α} : (fun (n : ℕ) ↦ l[n]?).Surjective ↔ (∀ x, x ∈ l) := by
459459
refine ⟨fun h x ↦ mem_iff_getElem?.mpr <| h x, fun h x ↦ ?_⟩
460460
cases x with
461-
| none => exact ⟨l.length, getElem?_eq_none le_rfl
461+
| none => exact ⟨l.length, getElem?_eq_none <| Nat.le_refl _
462462
| some x => exact mem_iff_getElem?.mp <| h x
463463

464464
theorem get_tail (l : List α) (i) (h : i < l.tail.length)

0 commit comments

Comments
 (0)