name | parser-stream-def |
version | 1.3 |
description | parser-stream-def |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2011-03-20 |
show | Data.Bool |
⊦ ∀l. Parser.Stream.fromList l = Parser.Stream.append l Parser.Stream.eof
⊦ ∀s s'.
Parser.Stream.isSuffix s s' ⇔
s = s' ∨ Parser.Stream.isProperSuffix s s'
⊦ Parser.Stream.length Parser.Stream.error = Number.Numeral.zero ∧
Parser.Stream.length Parser.Stream.eof = Number.Numeral.zero ∧
∀a s.
Parser.Stream.length (Parser.Stream.stream a s) =
Number.Natural.suc (Parser.Stream.length s)
⊦ ∀P.
P Parser.Stream.error ∧ P Parser.Stream.eof ∧
(∀a0 a1. P a1 ⇒ P (Parser.Stream.stream a0 a1)) ⇒ ∀x. P x
⊦ (∀s. Parser.Stream.append Data.List.[] s = s) ∧
∀h t s.
Parser.Stream.append (Data.List.:: h t) s =
Parser.Stream.stream h (Parser.Stream.append t s)
⊦ Parser.Stream.toList Parser.Stream.error = Data.Option.none ∧
Parser.Stream.toList Parser.Stream.eof = Data.Option.some Data.List.[] ∧
∀a s.
Parser.Stream.toList (Parser.Stream.stream a s) =
Data.Option.case Data.Option.none
(λl. Data.Option.some (Data.List.:: a l)) (Parser.Stream.toList s)
⊦ ∀f0 f1 f2.
∃fn.
fn Parser.Stream.error = f0 ∧ fn Parser.Stream.eof = f1 ∧
∀a0 a1. fn (Parser.Stream.stream a0 a1) = f2 a0 a1 (fn a1)
⊦ (∀s. Parser.Stream.isProperSuffix s Parser.Stream.error ⇔ F) ∧
(∀s. Parser.Stream.isProperSuffix s Parser.Stream.eof ⇔ F) ∧
∀s a s'.
Parser.Stream.isProperSuffix s (Parser.Stream.stream a s') ⇔
s = s' ∨ Parser.Stream.isProperSuffix s s'
⊦ (∀e b f. Parser.Stream.case e b f Parser.Stream.error = e) ∧
(∀e b f. Parser.Stream.case e b f Parser.Stream.eof = b) ∧
∀e b f a s. Parser.Stream.case e b f (Parser.Stream.stream a s) = f a s
⊦ T
⊦ ∀n. Number.Natural.≤ Number.Numeral.zero n
⊦ F ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ F
⊦ (∃) = λP. P ((select) P)
⊦ ∀a. ∃!x. x = a
⊦ ∀t. (∀x. t) ⇔ t
⊦ ∀t. (∃x. t) ⇔ t
⊦ ∀t. (λx. t x) = t
⊦ (∀) = λP. P = λx. T
⊦ ∀x. x = x ⇔ T
⊦ ∀n. ¬(Number.Natural.suc n = Number.Numeral.zero)
⊦ ∀n.
Number.Natural.even
(Number.Natural.*
(Number.Numeral.bit0 (Number.Numeral.bit1 Number.Numeral.zero)) n)
⊦ ∀n. Number.Numeral.bit0 n = Number.Natural.+ n n
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ T) ∨ (t ⇔ F)
⊦ ∀n. Number.Numeral.bit1 n = Number.Natural.suc (Number.Natural.+ n n)
⊦ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ ∀t1 t2. t1 ∨ t2 ⇔ t2 ∨ t1
⊦ ∀n.
Number.Natural.*
(Number.Numeral.bit0 (Number.Numeral.bit1 Number.Numeral.zero)) n =
Number.Natural.+ n n
⊦ ∀m n. ¬(Number.Natural.< m n ∧ Number.Natural.≤ n m)
⊦ ∀m n. ¬(Number.Natural.≤ m n ∧ Number.Natural.< n m)
⊦ ∀m n. Number.Natural.≤ (Number.Natural.suc m) n ⇔ Number.Natural.< m n
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ (∃) = λP. ∀q. (∀x. P x ⇒ q) ⇒ q
⊦ ∀m n. Number.Natural.suc m = Number.Natural.suc n ⇔ m = n
⊦ ∀m n.
Number.Natural.even (Number.Natural.* m n) ⇔
Number.Natural.even m ∨ Number.Natural.even n
⊦ ∀m n.
Number.Natural.even (Number.Natural.+ m n) ⇔ Number.Natural.even m ⇔
Number.Natural.even n
⊦ ∀f g. f = g ⇔ ∀x. f x = g x
⊦ ∀P a. (∃x. a = x ∧ P x) ⇔ P a
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ (Number.Natural.even Number.Numeral.zero ⇔ T) ∧
∀n. Number.Natural.even (Number.Natural.suc n) ⇔ ¬Number.Natural.even n
⊦ ∀m n. Number.Natural.≤ m n ⇔ Number.Natural.< m n ∨ m = n
⊦ ∀m n. Number.Natural.≤ m n ∧ Number.Natural.≤ n m ⇔ m = n
⊦ ∀P Q. (∃x. P ∧ Q x) ⇔ P ∧ ∃x. Q x
⊦ ∀t1 t2 t3. t1 ∧ t2 ∧ t3 ⇔ (t1 ∧ t2) ∧ t3
⊦ ∀m n p.
Number.Natural.* m (Number.Natural.* n p) =
Number.Natural.* (Number.Natural.* m n) p
⊦ ∀m n p. Number.Natural.+ m p = Number.Natural.+ n p ⇔ m = n
⊦ ∀P x. (∀y. P y ⇔ y = x) ⇒ (select) P = x
⊦ ∀P. (∀x. ∃y. P x y) ⇔ ∃y. ∀x. P x (y x)
⊦ ∀t1 t2. (if T then t1 else t2) = t1 ∧ (if F then t1 else t2) = t2
⊦ ∀m n.
Number.Natural.* m n = Number.Numeral.zero ⇔
m = Number.Numeral.zero ∨ n = Number.Numeral.zero
⊦ ∀P.
P Number.Numeral.zero ∧ (∀n. P n ⇒ P (Number.Natural.suc n)) ⇒ ∀n. P n
⊦ (∀t. ¬¬t ⇔ t) ∧ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ ∀m n.
Number.Natural.exp m n = Number.Numeral.zero ⇔
m = Number.Numeral.zero ∧ ¬(n = Number.Numeral.zero)
⊦ ∀P Q. (∀x. P x ∧ Q x) ⇔ (∀x. P x) ∧ ∀x. Q x
⊦ ∀P Q. (∀x. P x ⇒ Q x) ⇒ (∀x. P x) ⇒ ∀x. Q x
⊦ ∀P Q. (∀x. P x ⇒ Q x) ⇒ (∃x. P x) ⇒ ∃x. Q x
⊦ ∀P Q. (∀x. P x) ∧ (∀x. Q x) ⇔ ∀x. P x ∧ Q x
⊦ ∀e f.
∃fn.
fn Number.Numeral.zero = e ∧
∀n. fn (Number.Natural.suc n) = f (fn n) n
⊦ ∀m n p.
Number.Natural.* m n = Number.Natural.* m p ⇔
m = Number.Numeral.zero ∨ n = p
⊦ ∀m n p.
Number.Natural.≤ (Number.Natural.* m n) (Number.Natural.* m p) ⇔
m = Number.Numeral.zero ∨ Number.Natural.≤ n p
⊦ ∀m n p.
Number.Natural.< (Number.Natural.* m n) (Number.Natural.* m p) ⇔
¬(m = Number.Numeral.zero) ∧ Number.Natural.< n p
⊦ ∀A B C D. (A ⇒ B) ∧ (C ⇒ D) ⇒ A ∧ C ⇒ B ∧ D
⊦ ∀A B C D. (A ⇒ B) ∧ (C ⇒ D) ⇒ A ∨ C ⇒ B ∨ D
⊦ ∀P. (∀x. ∃!y. P x y) ⇔ ∃f. ∀x y. P x y ⇔ f x = y
⊦ (∀m.
Number.Natural.exp m Number.Numeral.zero =
Number.Numeral.bit1 Number.Numeral.zero) ∧
∀m n.
Number.Natural.exp m (Number.Natural.suc n) =
Number.Natural.* m (Number.Natural.exp m n)
⊦ ∀P c x y. P (if c then x else y) ⇔ (c ⇒ P x) ∧ (¬c ⇒ P y)
⊦ ∀NIL' CONS'.
∃fn.
fn Data.List.[] = NIL' ∧
∀a0 a1. fn (Data.List.:: a0 a1) = CONS' a0 a1 (fn a1)
⊦ ∀P. (∃!x. P x) ⇔ (∃x. P x) ∧ ∀x x'. P x ∧ P x' ⇒ x = x'
⊦ (∀m. Number.Natural.≤ m Number.Numeral.zero ⇔ m = Number.Numeral.zero) ∧
∀m n.
Number.Natural.≤ m (Number.Natural.suc n) ⇔
m = Number.Natural.suc n ∨ Number.Natural.≤ m n
⊦ ∀t. ((T ⇔ t) ⇔ t) ∧ ((t ⇔ T) ⇔ t) ∧ ((F ⇔ t) ⇔ ¬t) ∧ ((t ⇔ F) ⇔ ¬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)
⊦ (∀n. Number.Natural.+ Number.Numeral.zero n = n) ∧
(∀m. Number.Natural.+ m Number.Numeral.zero = m) ∧
(∀m n.
Number.Natural.+ (Number.Natural.suc m) n =
Number.Natural.suc (Number.Natural.+ m n)) ∧
∀m n.
Number.Natural.+ m (Number.Natural.suc n) =
Number.Natural.suc (Number.Natural.+ m n)