Skip to content

Commit

Permalink
[Data/List/Basic] uncomment some cons_injective and cons_inj
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Aug 19, 2022
1 parent fc3fbd2 commit 90776a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Mathlib/Data/List/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ theorem tail_eq_of_cons_eq {h₁ h₂ : α} {t₁ t₂ : List α} :
(h₁::t₁) = (h₂::t₂) → t₁ = t₂ :=
fun Peq => List.noConfusion Peq (fun _ Pteq => Pteq)

-- @[simp] theorem cons_injective {a : α} : injective (cons a) :=
-- assume l₁ l₂, assume Pe, tail_eq_of_cons_eq Pe
@[simp, nolint simpVarHead] theorem cons_injective {a : α} : injective (cons a) :=
λ _ _ Pe => tail_eq_of_cons_eq Pe

-- theorem cons_inj (a : α) {l l' : List α} : a::l = a::l' ↔ l = l' :=
-- cons_injective.eq_iff
theorem cons_inj (a : α) {l l' : List α} : a::l = a::l' ↔ l = l' :=
cons_injective.eq_iff

theorem exists_cons_of_ne_nil {l : List α} (h : l ≠ nil) : ∃ b L, l = b :: L := by
cases l with
Expand Down

0 comments on commit 90776a8

Please sign in to comment.