name | list-member-thm |
version | 1.0 |
description | list-member-thm |
author | Joe Hurd <joe@gilith.com> |
license | HOLLight |
provenance | HOL Light theory extracted on 2011-03-15 |
show | Data.Bool |
⊦ ∀l n.
Number.Natural.< n (Data.List.length l) ⇒
Data.List.member (Data.List.nth n l) l
⊦ ∀P l. (∀x. Data.List.member x l ⇒ P x) ⇔ Data.List.all P l
⊦ ∀P l. (∃x. P x ∧ Data.List.member x l) ⇔ Data.List.exists P l
⊦ ∀P l x.
Data.List.member x (Data.List.filter P l) ⇔ P x ∧ Data.List.member x l
⊦ ∀x l1 l2.
Data.List.member x (Data.List.@ l1 l2) ⇔
Data.List.member x l1 ∨ Data.List.member x l2
⊦ ∀l x.
Data.List.member x l ⇔
∃i. Number.Natural.< i (Data.List.length l) ∧ x = Data.List.nth i l
⊦ ∀f y l.
Data.List.member y (Data.List.map f l) ⇔
∃x. Data.List.member x l ∧ y = f x
⊦ ∀P Q l.
(∀x. Data.List.member x l ∧ P x ⇒ Q x) ∧ Data.List.all P l ⇒
Data.List.all Q l
⊦ ∀P Q l.
(∀x. Data.List.member x l ∧ P x ⇒ Q x) ∧ Data.List.exists P l ⇒
Data.List.exists Q l
⊦ T
⊦ ∀x. Function.id x = x
⊦ ∀n. Number.Natural.< Number.Numeral.zero (Number.Natural.suc n)
⊦ ∀t. (∀x. t) ⇔ t
⊦ ∀t. (∃x. t) ⇔ t
⊦ ∀t. (λx. t x) = t
⊦ (∀) = λP. P = λx. T
⊦ ∀x. x = x ⇔ T
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ T) ∨ (t ⇔ F)
⊦ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ ∀m. m = Number.Numeral.zero ∨ ∃n. m = Number.Natural.suc n
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ ∀P. ¬(∀x. P x) ⇔ ∃x. ¬P x
⊦ ∀P. ¬(∃x. P x) ⇔ ∀x. ¬P x
⊦ (∃) = λP. ∀q. (∀x. P x ⇒ q) ⇒ q
⊦ ∀m n.
Number.Natural.< (Number.Natural.suc m) (Number.Natural.suc n) ⇔
Number.Natural.< m n
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀P Q. P ∧ (∃x. Q x) ⇔ ∃x. P ∧ Q x
⊦ ∀P Q. P ∨ (∃x. Q x) ⇔ ∃x. P ∨ Q x
⊦ ∀P Q. (∃x. P x) ∧ Q ⇔ ∃x. P x ∧ Q
⊦ ∀P Q. (∃x. P x) ∨ Q ⇔ ∃x. P x ∨ Q
⊦ ∀t1 t2 t3. t1 ∨ t2 ∨ t3 ⇔ (t1 ∨ t2) ∨ t3
⊦ ∀P. (∀x. ∃y. P x y) ⇔ ∃y. ∀x. P x (y x)
⊦ Data.List.length Data.List.[] = Number.Numeral.zero ∧
∀h t.
Data.List.length (Data.List.:: h t) =
Number.Natural.suc (Data.List.length t)
⊦ ∀P.
P Number.Numeral.zero ∧ (∀n. P n ⇒ P (Number.Natural.suc n)) ⇒ ∀n. P n
⊦ (∀t. ¬¬t ⇔ t) ∧ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ ∀P Q. (∃x. P x) ∨ (∃x. Q x) ⇔ ∃x. P x ∨ Q x
⊦ ∀P. P Data.List.[] ∧ (∀a0 a1. P a1 ⇒ P (Data.List.:: a0 a1)) ⇒ ∀x. P x
⊦ ∀P c x y. P (if c then x else y) ⇔ (c ⇒ P x) ∧ (¬c ⇒ P y)
⊦ (∀m. Number.Natural.< m Number.Numeral.zero ⇔ F) ∧
∀m n.
Number.Natural.< m (Number.Natural.suc n) ⇔
m = n ∨ Number.Natural.< m n
⊦ (∀l. Data.List.@ Data.List.[] l = l) ∧
∀h t l.
Data.List.@ (Data.List.:: h t) l = Data.List.:: h (Data.List.@ t l)
⊦ (∀P. Data.List.all P Data.List.[] ⇔ T) ∧
∀h P t. Data.List.all P (Data.List.:: h t) ⇔ P h ∧ Data.List.all P t
⊦ (∀P. Data.List.exists P Data.List.[] ⇔ F) ∧
∀h P t.
Data.List.exists P (Data.List.:: h t) ⇔ P h ∨ Data.List.exists P t
⊦ (∀f. Data.List.map f Data.List.[] = Data.List.[]) ∧
∀f h t.
Data.List.map f (Data.List.:: h t) =
Data.List.:: (f h) (Data.List.map f t)
⊦ (∀x. Data.List.member x Data.List.[] ⇔ F) ∧
∀h x t.
Data.List.member x (Data.List.:: h t) ⇔ x = h ∨ Data.List.member x t
⊦ (∀h t. Data.List.nth Number.Numeral.zero (Data.List.:: h t) = h) ∧
∀h t n.
Data.List.nth (Number.Natural.suc n) (Data.List.:: h t) =
Data.List.nth n t
⊦ ∀t. ((T ⇔ t) ⇔ t) ∧ ((t ⇔ T) ⇔ t) ∧ ((F ⇔ t) ⇔ ¬t) ∧ ((t ⇔ F) ⇔ ¬t)
⊦ (∀P. Data.List.filter P Data.List.[] = Data.List.[]) ∧
∀h P t.
Data.List.filter P (Data.List.:: h t) =
(if P h then Data.List.:: h (Data.List.filter P t)
else Data.List.filter P t)
⊦ ∀t. (T ∧ t ⇔ t) ∧ (t ∧ T ⇔ t) ∧ (F ∧ t ⇔ F) ∧ (t ∧ F ⇔ F) ∧ (t ∧ t ⇔ t)
⊦ ∀t. (T ∨ t ⇔ T) ∧ (t ∨ T ⇔ T) ∧ (F ∨ t ⇔ t) ∧ (t ∨ F ⇔ t) ∧ (t ∨ t ⇔ t)
⊦ ∀t. (T ⇒ t ⇔ t) ∧ (t ⇒ T ⇔ T) ∧ (F ⇒ t ⇔ T) ∧ (t ⇒ t ⇔ T) ∧ (t ⇒ F ⇔ ¬t)
⊦ ∀p q r.
(p ∨ q ⇔ q ∨ p) ∧ ((p ∨ q) ∨ r ⇔ p ∨ q ∨ r) ∧ (p ∨ q ∨ r ⇔ q ∨ p ∨ r) ∧
(p ∨ p ⇔ p) ∧ (p ∨ p ∨ q ⇔ p ∨ q)