Package word-bits-def: Definition of word to bit-list conversions

Information

nameword-bits-def
version1.81
descriptionDefinition of word to bit-list conversions
authorJoe Leslie-Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2014-11-04
checksum6b0a20ed0aae7bf2e944c0db9c40d5905bbd90c4
requiresbool
list
natural
natural-bits
word-def
showData.Bool
Data.List
Data.Word
Data.Word.Bits
Number.Natural

Files

Defined Constants

Theorems

q. compare q [] [] q

l. toWord l = fromNatural (Bits.toNatural l)

l. normal l length l = width

w. not w = toWord (map (¬) (fromWord w))

w. fromWord w = map (bit w) (interval 0 width)

w n. bit w n odd (toNatural (shiftRight w n))

w1 w2. and w1 w2 = toWord (zipWith () (fromWord w1) (fromWord w2))

w1 w2. or w1 w2 = toWord (zipWith () (fromWord w1) (fromWord w2))

w n. shiftLeft w n = fromNatural (2 n * toNatural w)

w n. shiftRight w n = fromNatural (toNatural w div 2 n)

q h1 h2 t1 t2.
    compare q (h1 :: t1) (h2 :: t2)
    compare (¬h1 h2 ¬(h1 ¬h2) q) t1 t2

External Type Operators

External Constants

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)