name | parser-stream-thm |
version | 1.5 |
description | parser-stream-thm |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2011-03-20 |
show | Data.Bool |
⊦ Relation.wellFounded Parser.Stream.isProperSuffix
⊦ ∀x. Parser.Stream.isSuffix x x
⊦ ∀x. ¬Parser.Stream.isProperSuffix x x
⊦ ∀l. Parser.Stream.length (Parser.Stream.fromList l) = Data.List.length l
⊦ ∀l. Parser.Stream.toList (Parser.Stream.fromList l) = Data.Option.some l
⊦ ∀x y. Parser.Stream.isProperSuffix x y ⇒ Parser.Stream.isSuffix x y
⊦ ∀s.
Data.Option.case T (λl. Data.List.length l = Parser.Stream.length s)
(Parser.Stream.toList s)
⊦ ∀x y.
Parser.Stream.isProperSuffix x y ⇒
Number.Natural.< (Parser.Stream.length x) (Parser.Stream.length y)
⊦ ∀x y.
Parser.Stream.isSuffix x y ⇒
Number.Natural.≤ (Parser.Stream.length x) (Parser.Stream.length y)
⊦ ∀l s.
Parser.Stream.length (Parser.Stream.append l s) =
Number.Natural.+ (Data.List.length l) (Parser.Stream.length s)
⊦ ∀x y z.
Parser.Stream.append (Data.List.@ x y) z =
Parser.Stream.append x (Parser.Stream.append y z)
⊦ ∀x y z.
Parser.Stream.isProperSuffix x y ∧ Parser.Stream.isProperSuffix y z ⇒
Parser.Stream.isProperSuffix x z
⊦ ∀x y z.
Parser.Stream.isSuffix x y ∧ Parser.Stream.isSuffix y z ⇒
Parser.Stream.isSuffix x z
⊦ ∀l s.
Parser.Stream.toList (Parser.Stream.append l s) =
Data.Option.case Data.Option.none
(λls. Data.Option.some (Data.List.@ l ls)) (Parser.Stream.toList s)
⊦ ∀x.
x = Parser.Stream.error ∨ x = Parser.Stream.eof ∨
∃a0 a1. x = Parser.Stream.stream a0 a1
⊦ ∀p. (∀x. (∀y. Parser.Stream.isProperSuffix y x ⇒ p y) ⇒ p x) ⇒ ∀x. p x
⊦ ∀a0 a1 a0' a1'.
Parser.Stream.stream a0 a1 = Parser.Stream.stream a0' a1' ⇔
a0 = a0' ∧ a1 = a1'
⊦ ¬(Parser.Stream.error = Parser.Stream.eof) ∧
(∀a0' a1'. ¬(Parser.Stream.error = Parser.Stream.stream a0' a1')) ∧
∀a0' a1'. ¬(Parser.Stream.eof = Parser.Stream.stream a0' a1')
⊦ ∀h.
(∀f g s.
(∀s'. Parser.Stream.isProperSuffix s' s ⇒ f s' = g s') ⇒
h f s = h g s) ⇒ ∃f. ∀s. f s = h f s
⊦ T
⊦ ∀n. Number.Natural.≤ Number.Numeral.zero n
⊦ ∀n. Number.Natural.≤ n n
⊦ ∀m. Relation.wellFounded (Relation.measure m)
⊦ F ⇔ ∀p. p
⊦ (¬) = λp. p ⇒ F
⊦ ∀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)
⊦ ∀m. Number.Natural.+ m Number.Numeral.zero = m
⊦ ∀n. Number.Numeral.bit0 n = Number.Natural.+ n n
⊦ ∀l. Parser.Stream.fromList l = Parser.Stream.append l Parser.Stream.eof
⊦ ∀x. Data.Option.case Data.Option.none Data.Option.some x = x
⊦ (⇒) = λ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
⊦ ∀m n. Number.Natural.< m n ⇒ Number.Natural.≤ m n
⊦ ∀<< x. Relation.wellFounded << ⇒ ¬<< x x
⊦ ∀n.
Number.Natural.*
(Number.Numeral.bit0 (Number.Numeral.bit1 Number.Numeral.zero)) n =
Number.Natural.+ n n
⊦ ∀m. Relation.measure m = λx y. Number.Natural.< (m x) (m y)
⊦ ∀m n. ¬(Number.Natural.< m n ∧ Number.Natural.≤ n m)
⊦ ∀m n. ¬(Number.Natural.≤ m n ∧ Number.Natural.< n m)
⊦ ∀m n. Number.Natural.< m (Number.Natural.suc n) ⇔ Number.Natural.≤ m n
⊦ ∀m n. Number.Natural.≤ (Number.Natural.suc m) n ⇔ Number.Natural.< m n
⊦ ∀x. x = Data.Option.none ∨ ∃a. x = Data.Option.some a
⊦ (∧) = λ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
⊦ (∨) = λ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
⊦ ∀s s'.
Parser.Stream.isSuffix s s' ⇔
s = s' ∨ Parser.Stream.isProperSuffix s s'
⊦ ∀t1 t2 t3. t1 ∨ t2 ∨ t3 ⇔ (t1 ∨ t2) ∨ t3
⊦ ∀m n.
Number.Natural.* m n = Number.Numeral.zero ⇔
m = Number.Numeral.zero ∨ n = Number.Numeral.zero
⊦ Data.List.length Data.List.[] = Number.Numeral.zero ∧
∀h t.
Data.List.length (Data.List.:: h t) =
Number.Natural.suc (Data.List.length t)
⊦ (∀t. ¬¬t ⇔ t) ∧ (¬T ⇔ F) ∧ (¬F ⇔ T)
⊦ ∀P. P Data.List.[] ∧ (∀a0 a1. P a1 ⇒ P (Data.List.:: a0 a1)) ⇒ ∀x. P x
⊦ ∀<< <<<.
(∀x y. << x y ⇒ <<< x y) ∧ Relation.wellFounded <<< ⇒
Relation.wellFounded <<
⊦ ∀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
⊦ ∀x y a b. Data.Pair., x y = Data.Pair., a b ⇔ x = a ∧ y = b
⊦ 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
⊦ ∀<<.
Relation.wellFounded << ⇔ ∀P. (∀x. (∀y. << y x ⇒ P y) ⇒ P x) ⇒ ∀x. P x
⊦ (∀b f. Data.Option.case b f Data.Option.none = b) ∧
∀b f a. Data.Option.case b f (Data.Option.some a) = f a
⊦ (∀l. Data.List.@ Data.List.[] l = l) ∧
∀h t l.
Data.List.@ (Data.List.:: h t) l = Data.List.:: h (Data.List.@ t l)
⊦ (∀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)
⊦ (∀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)
⊦ 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)
⊦ ∀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)
⊦ (∀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'
⊦ ∀<<.
Relation.wellFounded << ⇒
∀H.
(∀f g x. (∀z. << z x ⇒ f z = g z) ⇒ H f x = H g x) ⇒
∃f. ∀x. f x = H f x
⊦ (∀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)
⊦ ∀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)