Package parser-all-def: Definition of the whole stream parser
Information
name | parser-all-def |
version | 1.39 |
description | Definition of the whole stream parser |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2012-02-10 |
requires | bool pair option parser-stream parser-comb |
show | Data.Bool Data.Option Data.Pair Parser Parser.Stream |
Files
- Package tarball parser-all-def-1.39.tgz
- Theory file parser-all-def.thy (included in the package tarball)
Defined Constant
- Parser
- parseStream
Theorems
⊦ ∀p. parseStream p eof = eof
⊦ ∀p. parseStream p error = error
⊦ ∀p a s.
parseStream p (stream a s) =
case destParser p a s of
none → error
| some (b, s') → stream b (parseStream p s')
Input Type Operators
- →
- bool
- Data
- Option
- option
- Pair
- ×
- Option
- Parser
- parser
- Stream
- stream
Input Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ⊤
- Option
- case
- none
- some
- Pair
- ,
- Bool
- Parser
- destParser
- Stream
- case
- eof
- error
- isProperSuffix
- isSuffix
- stream
Assumptions
⊦ ⊤
⊦ (∃) = λp. p ((select) p)
⊦ ∀t. (λx. t x) = t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. ⊤ ∧ t ⇔ t
⊦ ∀t. t ⇒ ⊤ ⇔ ⊤
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀b f. case b f none = b
⊦ ∀p x. p x ⇒ p ((select) p)
⊦ ∀xy. ∃x y. xy = (x, y)
⊦ ∀x. x = none ∨ ∃a. x = some a
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀e b f. case e b f eof = b
⊦ ∀e b f. case e b f error = e
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀b f a. case b f (some a) = f a
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀s s'. isSuffix s s' ⇔ s = s' ∨ isProperSuffix s s'
⊦ ∀PAIR'. ∃fn. ∀a0 a1. fn (a0, a1) = PAIR' a0 a1
⊦ ∀p. (∀x. ∃y. p x y) ⇔ ∃y. ∀x. p x (y x)
⊦ ∀s a s'. isProperSuffix s (stream a s') ⇔ s = s' ∨ isProperSuffix s s'
⊦ ∀x. x = error ∨ x = eof ∨ ∃a0 a1. x = stream a0 a1
⊦ ∀e b f a s. case e b f (stream a s) = f a s
⊦ ∀p q. (∀x. p x ∧ q x) ⇔ (∀x. p x) ∧ ∀x. q x
⊦ ∀p a s b s'. destParser p a s = some (b, s') ⇒ isSuffix s' s
⊦ ∀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