lemma
proved
term proof
singleton_eq_get_zero'
show as:
view Lean formalization →
formal statement (Lean)
263private lemma singleton_eq_get_zero' {α : Type*} (l : List α) (h : l.length = 1) :
264 ∃ x, l = [x] ∧ x = l.get ⟨0, by omega⟩ := by
proof body
Term-mode proof.
265 match l with
266 | [] => simp at h
267 | [x] => exact ⟨x, rfl, rfl⟩
268 | _ :: _ :: _ => simp at h
269