Package word-bits-def: Definition of word to bit-list conversions
Information
name | word-bits-def |
version | 1.85 |
description | Definition of word to bit-list conversions |
author | Joe Leslie-Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2015-04-05 |
checksum | 9b0192c383a8f5336382264e24cb981d1da993ae |
requires | base natural-bits word-def |
show | Data.Bool Data.List Data.Word Data.Word.Bits Number.Natural |
Files
- Package tarball word-bits-def-1.85.tgz
- Theory source file word-bits-def.thy (included in the package tarball)
Defined Constants
- Data
- Word
- and
- bit
- not
- or
- shiftLeft
- shiftRight
- Bits
- compare
- fromWord
- normal
- toWord
- Word
Theorems
⊦ ∀q. compare q [] [] ⇔ q
⊦ ∀l. toWord l = fromNatural (Bits.fromList l)
⊦ ∀w. fromWord w = Bits.toVector (toNatural w) width
⊦ ∀l. normal l ⇔ length l = width
⊦ ∀w. not w = toWord (map (¬) (fromWord w))
⊦ ∀w n. bit w n ⇔ Bits.bit (toNatural w) n
⊦ ∀w n. shiftLeft w n = fromNatural (Bits.shiftLeft (toNatural w) n)
⊦ ∀w n. shiftRight w n = fromNatural (Bits.shiftRight (toNatural w) n)
⊦ ∀w1 w2. and w1 w2 = fromNatural (Bits.and (toNatural w1) (toNatural w2))
⊦ ∀w1 w2. or w1 w2 = fromNatural (Bits.or (toNatural w1) (toNatural w2))
⊦ ∀q h1 h2 t1 t2.
compare q (h1 :: t1) (h2 :: t2) ⇔
compare (¬h1 ∧ h2 ∨ ¬(h1 ∧ ¬h2) ∧ q) t1 t2
External Type Operators
- →
- bool
- Data
- List
- list
- Word
- word
- List
- Number
- Natural
- natural
- Natural
External Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- ⊤
- List
- ::
- []
- head
- length
- map
- tail
- Word
- fromNatural
- toNatural
- width
- Bool
- Number
- Natural
- Bits
- Bits.and
- Bits.bit
- Bits.fromList
- Bits.or
- Bits.shiftLeft
- Bits.shiftRight
- Bits.toVector
- Bits
- Natural
Assumptions
⊦ ⊤
⊦ (∃) = λp. p ((select) p)
⊦ ∀t. (∀x. t) ⇔ t
⊦ (∀) = λp. p = λx. ⊤
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀h t. head (h :: t) = h
⊦ ∀h t. tail (h :: t) = t
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀b f. ∃fn. fn [] = b ∧ ∀h t. fn (h :: t) = f h t (fn t)