Package parser-stream-thm: Properties of parse streams
Information
name | parser-stream-thm |
version | 1.47 |
description | Properties of parse streams |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2012-02-10 |
requires | bool function pair natural relation option list parser-stream-def |
show | Data.Bool Data.List Data.Option Data.Pair Function Number.Natural Parser.Stream Relation |
Files
- Package tarball parser-stream-thm-1.47.tgz
- Theory file parser-stream-thm.thy (included in the package tarball)
Theorems
⊦ wellFounded isProperSuffix
⊦ ¬(error = eof)
⊦ ∀x. isSuffix x x
⊦ ∀x. ¬isProperSuffix x x
⊦ ∀l. length (fromList l) = length l
⊦ ∀l. toList (fromList l) = some l
⊦ ∀a0' a1'. ¬(eof = stream a0' a1')
⊦ ∀a0' a1'. ¬(error = stream a0' a1')
⊦ ∀x y. isProperSuffix x y ⇒ isSuffix x y
⊦ ∀s. case toList s of none → ⊤ | some l → length l = length s
⊦ ∀x y. isProperSuffix x y ⇒ length x < length y
⊦ ∀x y. isSuffix x y ⇒ length x ≤ length y
⊦ ∀l s. length (append l s) = length l + length s
⊦ ∀x y z. append (x @ y) z = append x (append y z)
⊦ ∀x y z. isProperSuffix x y ∧ isProperSuffix y z ⇒ isProperSuffix x z
⊦ ∀x y z. isSuffix x y ∧ isSuffix y z ⇒ isSuffix x z
⊦ ∀l s.
toList (append l s) =
case toList s of none → none | some ls → some (l @ ls)
⊦ ∀x. x = error ∨ x = eof ∨ ∃a0 a1. x = stream a0 a1
⊦ ∀p. (∀x. (∀y. isProperSuffix y x ⇒ p y) ⇒ p x) ⇒ ∀x. p x
⊦ ∀a0 a1 a0' a1'. stream a0 a1 = stream a0' a1' ⇔ a0 = a0' ∧ a1 = a1'
⊦ ∀h.
(∀f g s. (∀s'. isProperSuffix s' s ⇒ f s' = g s') ⇒ h f s = h g s) ⇒
∃f. ∀s. f s = h f s
Input Type Operators
- →
- bool
- Data
- List
- list
- Option
- option
- Pair
- ×
- List
- Number
- Natural
- natural
- Natural
- Parser
- Stream
- stream
- Stream
Input Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∃!
- ∨
- ¬
- ⊥
- ⊤
- List
- ::
- @
- []
- length
- Option
- case
- none
- some
- Pair
- ,
- Bool
- Function
- id
- Number
- Natural
- *
- +
- <
- ≤
- bit0
- bit1
- even
- suc
- zero
- Natural
- Parser
- Stream
- append
- eof
- error
- fromList
- isProperSuffix
- isSuffix
- length
- stream
- toList
- Stream
- Relation
- irreflexive
- measure
- subrelation
- wellFounded
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ length [] = 0
⊦ bit0 0 = 0
⊦ length eof = 0
⊦ length error = 0
⊦ toList error = none
⊦ ∀t. t ⇒ t
⊦ ∀n. 0 ≤ n
⊦ ∀n. n ≤ n
⊦ ∀m. wellFounded (measure m)
⊦ ⊥ ⇔ ∀p. p
⊦ toList eof = some []
⊦ ∀x. id x = x
⊦ ∀s. ¬isProperSuffix s eof
⊦ ∀s. ¬isProperSuffix s error
⊦ (¬) = λp. p ⇒ ⊥
⊦ ∀t. (∀x. t) ⇔ t
⊦ ∀t. (λx. t x) = t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. ¬¬t ⇔ t
⊦ ∀t. (⊤ ⇔ t) ⇔ t
⊦ ∀t. (t ⇔ ⊤) ⇔ t
⊦ ∀t. ⊥ ∧ t ⇔ ⊥
⊦ ∀t. ⊤ ∧ t ⇔ t
⊦ ∀t. t ∧ ⊥ ⇔ ⊥
⊦ ∀t. t ∧ ⊤ ⇔ t
⊦ ∀t. ⊥ ⇒ t ⇔ ⊤
⊦ ∀t. ⊤ ⇒ t ⇔ t
⊦ ∀t. t ⇒ ⊤ ⇔ ⊤
⊦ ∀t. ⊥ ∨ t ⇔ t
⊦ ∀t. ⊤ ∨ t ⇔ ⊤
⊦ ∀t. t ∨ ⊤ ⇔ ⊤
⊦ ∀n. ¬(suc n = 0)
⊦ ∀n. 0 + n = n
⊦ ∀m. m + 0 = m
⊦ ∀l. [] @ l = l
⊦ ∀s. append [] s = s
⊦ ∀r. wellFounded r ⇒ irreflexive r
⊦ ∀t. (⊥ ⇔ t) ⇔ ¬t
⊦ ∀t. (t ⇔ ⊥) ⇔ ¬t
⊦ ∀t. t ⇒ ⊥ ⇔ ¬t
⊦ ∀n. bit1 n = suc (bit0 n)
⊦ ∀l. fromList l = append l eof
⊦ ∀x. case none some x = x
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀n. even (suc n) ⇔ ¬even n
⊦ ∀m. m ≤ 0 ⇔ m = 0
⊦ ∀b f. case b f none = b
⊦ ∀n. bit0 (suc n) = suc (suc (bit0 n))
⊦ ∀f y. (let x ← y in f x) = f y
⊦ ∀x y. x = y ⇔ y = x
⊦ ∀t1 t2. t1 ∨ t2 ⇔ t2 ∨ t1
⊦ ∀m n. m < n ⇒ m ≤ n
⊦ ∀r x. irreflexive r ⇒ ¬r x x
⊦ ∀n. 2 * n = n + n
⊦ ∀h t. length (h :: t) = suc (length t)
⊦ ∀a s. length (stream a s) = suc (length s)
⊦ ∀m n. ¬(m < n ∧ n ≤ m)
⊦ ∀m n. ¬(m ≤ n ∧ n < m)
⊦ ∀m n. m < suc n ⇔ m ≤ n
⊦ ∀m n. suc m ≤ n ⇔ m < n
⊦ ∀x. x = none ∨ ∃a. x = some a
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀p. ¬(∀x. p x) ⇔ ∃x. ¬p x
⊦ ∀p. ¬(∃x. p x) ⇔ ∀x. ¬p x
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀t1 t2. ¬(t1 ⇒ t2) ⇔ t1 ∧ ¬t2
⊦ ∀m n. m + suc n = suc (m + n)
⊦ ∀m n. suc m + n = suc (m + n)
⊦ ∀m n. suc m = suc n ⇔ m = n
⊦ ∀r s. subrelation r s ∧ wellFounded s ⇒ wellFounded r
⊦ ∀b f a. case b f (some a) = f a
⊦ ∀t1 t2. ¬(t1 ∧ t2) ⇔ ¬t1 ∨ ¬t2
⊦ ∀m n. even (m * n) ⇔ even m ∨ even n
⊦ ∀m n. even (m + n) ⇔ even m ⇔ even n
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀m n. m ≤ n ⇔ m < n ∨ m = n
⊦ ∀m n. m ≤ n ∧ n ≤ m ⇔ m = n
⊦ ∀s s'. isSuffix s s' ⇔ s = s' ∨ isProperSuffix s s'
⊦ ∀m x y. measure m x y ⇔ m x < m y
⊦ ∀p q. (∀x. p ∨ q x) ⇔ p ∨ ∀x. q x
⊦ ∀p q. (∃x. p ∧ q x) ⇔ p ∧ ∃x. q x
⊦ ∀p q. p ∧ (∀x. q x) ⇔ ∀x. p ∧ q x
⊦ ∀p q. p ∧ (∃x. q x) ⇔ ∃x. p ∧ q x
⊦ ∀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
⊦ ∀h t s. append (h :: t) s = stream h (append t s)
⊦ ∀t1 t2 t3. (t1 ∧ t2) ∧ t3 ⇔ t1 ∧ t2 ∧ t3
⊦ ∀t1 t2 t3. (t1 ∨ t2) ∨ t3 ⇔ t1 ∨ t2 ∨ t3
⊦ ∀l h t. (h :: t) @ l = h :: t @ l
⊦ ∀p. (∀x. ∃y. p x y) ⇔ ∃y. ∀x. p x (y x)
⊦ ∀m n. m ≤ suc n ⇔ m = suc n ∨ m ≤ n
⊦ ∀m n. m * n = 0 ⇔ m = 0 ∨ n = 0
⊦ ∀a s.
toList (stream a s) =
case toList s of none → none | some l → some (a :: l)
⊦ ∀P. P 0 ∧ (∀n. P n ⇒ P (suc n)) ⇒ ∀n. P n
⊦ ∀r s. subrelation r s ⇔ ∀x y. r x y ⇒ s x y
⊦ ∀s a s'. isProperSuffix s (stream a s') ⇔ s = s' ∨ isProperSuffix s s'
⊦ (∃!) = λp. (∃) p ∧ ∀x y. p x ∧ p y ⇒ x = y
⊦ ∀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. P [] ∧ (∀a0 a1. P a1 ⇒ P (a0 :: a1)) ⇒ ∀x. P x
⊦ ∀m n p. m * n = m * p ⇔ m = 0 ∨ n = p
⊦ ∀m n p. m * n ≤ m * p ⇔ m = 0 ∨ n ≤ p
⊦ ∀m n p. m * n < m * p ⇔ ¬(m = 0) ∧ n < p
⊦ ∀x y a b. (x, y) = (a, b) ⇔ x = a ∧ y = b
⊦ ∀p1 p2 q1 q2. (p1 ⇒ p2) ∧ (q1 ⇒ q2) ⇒ p1 ∧ q1 ⇒ p2 ∧ q2
⊦ ∀p1 p2 q1 q2. (p2 ⇒ p1) ∧ (q1 ⇒ q2) ⇒ (p1 ⇒ q1) ⇒ p2 ⇒ q2
⊦ ∀P. P error ∧ P eof ∧ (∀a0 a1. P a1 ⇒ P (stream a0 a1)) ⇒ ∀x. P x
⊦ ∀r. wellFounded r ⇔ ∀p. (∀x. (∀y. r y x ⇒ p y) ⇒ p x) ⇒ ∀x. p x
⊦ ∀f0 f1 f2.
∃fn.
fn error = f0 ∧ fn eof = f1 ∧
∀a0 a1. fn (stream a0 a1) = f2 a0 a1 (fn a1)