feat(library/data/list/basic): add a lemma length_pos_of_mem
This commit is contained in:
parent
9d523bae6b
commit
721d3781ca
1 changed files with 4 additions and 0 deletions
|
@ -272,6 +272,10 @@ theorem not_mem_append {x : T} {s t : list T} : x ∉ s → x ∉ t → x ∉ s+
|
|||
(λ xins, by contradiction)
|
||||
(λ xint, by contradiction)
|
||||
|
||||
lemma length_pos_of_mem {a : T} : ∀ {l : list T}, a ∈ l → 0 < length l
|
||||
| [] := assume Pinnil, by contradiction
|
||||
| (b::l) := assume Pin, !zero_lt_succ
|
||||
|
||||
local attribute mem [reducible]
|
||||
local attribute append [reducible]
|
||||
theorem mem_split {x : T} {l : list T} : x ∈ l → ∃s t : list T, l = s ++ (x::t) :=
|
||||
|
|
Loading…
Reference in a new issue