Package word-def: Definition of word operations
Information
name | word-def |
version | 1.10 |
description | Definition of word operations |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2011-11-12 |
requires | bool natural natural-divides |
show | Data.Bool Data.Word Number.Natural |
Files
- Package tarball word-def-1.10.tgz
- Theory file word-def.thy (included in the package tarball)
Defined Type Operator
- Data
- Word
- word
- Word
Defined Constants
- Data
- Word
- *
- +
- -
- <
- ≤
- ~
- fromNatural
- modulus
- toNatural
- Word
Theorems
⊦ ¬(modulus = 0)
⊦ fromNatural modulus = 0
⊦ modulus mod modulus = 0
⊦ 0 mod modulus = 0
⊦ ∀x. toNatural x < modulus
⊦ ~0 = 0
⊦ ∀x. ~~x = x
⊦ ∀x. fromNatural (toNatural x) = x
⊦ ∀n. n mod modulus < modulus
⊦ modulus = exp 2 width
⊦ ∀x. x + 0 = x
⊦ ∀x. 0 + x = x
⊦ ∀x. toNatural x div modulus = 0
⊦ ∀x. x * 0 = 0
⊦ ∀x. x + ~x = 0
⊦ ∀x. 0 * x = 0
⊦ ∀x. ~x + x = 0
⊦ ∀x. toNatural x mod modulus = toNatural x
⊦ ∀x. x * 1 = x
⊦ ∀x. 1 * x = x
⊦ ∀x. toNatural (fromNatural x) = x mod modulus
⊦ ∀x. ~x = fromNatural (modulus - toNatural x)
⊦ ∀x y. x * y = y * x
⊦ ∀x y. x + y = y + x
⊦ ∀n. divides modulus n ⇔ n mod modulus = 0
⊦ ∀n. n < modulus ⇒ n mod modulus = n
⊦ ∀x. fromNatural x = 0 ⇔ divides modulus x
⊦ ∀n. n mod modulus mod modulus = n mod modulus
⊦ ∀x y. x < y ⇔ ¬(y ≤ x)
⊦ ∀x y. x - y = x + ~y
⊦ ∀x. ~x = 0 ⇔ x = 0
⊦ ∀x y. x < y ⇔ toNatural x < toNatural y
⊦ ∀x y. x ≤ y ⇔ toNatural x ≤ toNatural y
⊦ ∀x y. x * ~y = ~(x * y)
⊦ ∀x y. ~x * y = ~(x * y)
⊦ ∀x y. ~x = ~y ⇒ x = y
⊦ ∀x y. toNatural x = toNatural y ⇒ x = y
⊦ ∀x y. x + y = x ⇔ y = 0
⊦ ∀x y. y + x = x ⇔ y = 0
⊦ ∀x y. ~x + ~y = ~(x + y)
⊦ ∀x1 y1. fromNatural (x1 * y1) = fromNatural x1 * fromNatural y1
⊦ ∀x1 y1. fromNatural (x1 + y1) = fromNatural x1 + fromNatural y1
⊦ ∀x y. toNatural (x * y) = toNatural x * toNatural y mod modulus
⊦ ∀x y. toNatural (x + y) = (toNatural x + toNatural y) mod modulus
⊦ ∀x y z. x * y * z = x * (y * z)
⊦ ∀x y z. x + y + z = x + (y + z)
⊦ ∀x y z. x + y = x + z ⇔ y = z
⊦ ∀x y z. y + x = z + x ⇔ y = z
⊦ ∀x y. fromNatural x = fromNatural y ⇔ x mod modulus = y mod modulus
⊦ ∀x y z. x * (y + z) = x * y + x * z
⊦ ∀x y z. (y + z) * x = y * x + z * x
⊦ ∀m n. m mod modulus * (n mod modulus) mod modulus = m * n mod modulus
⊦ ∀m n. (m mod modulus + n mod modulus) mod modulus = (m + n) mod modulus
⊦ ∀x y. x < modulus ∧ y < modulus ∧ fromNatural x = fromNatural y ⇒ x = y
Input Type Operators
- →
- bool
- Number
- Natural
- natural
- Natural
Input Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- F
- T
- Word
- width
- Bool
- Number
- Natural
- *
- +
- -
- <
- ≤
- bit0
- bit1
- div
- divides
- even
- exp
- mod
- suc
- zero
- Natural
Assumptions
⊦ T
⊦ ¬F ⇔ T
⊦ ¬T ⇔ F
⊦ bit0 0 = 0
⊦ ∀t. t ⇒ t
⊦ ∀n. 0 ≤ n
⊦ F ⇔ ∀p. p
⊦ ∀t. t ∨ ¬t
⊦ (¬) = λp. p ⇒ F
⊦ (∃) = λP. P ((select) 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. F ∧ t ⇔ F
⊦ ∀t. T ∧ t ⇔ t
⊦ ∀t. t ∧ T ⇔ t
⊦ ∀t. F ⇒ t ⇔ T
⊦ ∀t. T ⇒ t ⇔ t
⊦ ∀t. t ⇒ T ⇔ T
⊦ ∀t. F ∨ t ⇔ t
⊦ ∀t. T ∨ t ⇔ T
⊦ ∀t. t ∨ F ⇔ t
⊦ ∀t. t ∨ T ⇔ T
⊦ ∀n. ¬(suc n = 0)
⊦ ∀n. 0 * n = 0
⊦ ∀n. 0 + n = n
⊦ ∀t. (F ⇔ t) ⇔ ¬t
⊦ ∀t. (t ⇔ F) ⇔ ¬t
⊦ ∀t. t ⇒ F ⇔ ¬t
⊦ ∀n. bit1 n = suc (bit0 n)
⊦ ∀m. 1 * m = m
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ T) ∨ (t ⇔ F)
⊦ ∀n. even (suc n) ⇔ ¬even n
⊦ ∀m. m ≤ 0 ⇔ m = 0
⊦ ∀n. 0 < n ⇔ ¬(n = 0)
⊦ ∀n. bit0 (suc n) = suc (suc (bit0 n))
⊦ ∀x y. x = y ⇔ y = x
⊦ ∀t1 t2. t1 ∨ t2 ⇔ t2 ∨ t1
⊦ ∀m n. m * n = n * m
⊦ ∀m n. m + n = n + m
⊦ ∀m n. m < n ⇒ m ≤ n
⊦ ∀n. 2 * n = n + n
⊦ ∀m n. ¬(m < n ∧ n ≤ m)
⊦ ∀m n. ¬(m ≤ n ∧ n < m)
⊦ ∀m n. ¬(m ≤ n) ⇔ n < m
⊦ ∀m n. suc m ≤ n ⇔ m < n
⊦ (∧) = λp q. (λf. f p q) = λf. f T T
⊦ ∀n. ¬(n = 0) ⇒ n mod n = 0
⊦ ∀P. ¬(∀x. P x) ⇔ ∃x. ¬P x
⊦ (∃) = λP. ∀q. (∀x. P x ⇒ q) ⇒ q
⊦ ∀m n. m < n ⇒ m div n = 0
⊦ ∀m n. m < n ⇒ m mod n = m
⊦ ∀m n. m + suc n = suc (m + n)
⊦ ∀m n. suc m + n = suc (m + n)
⊦ ∀m n. suc m = suc n ⇔ m = n
⊦ ∀m n. even (m * n) ⇔ even m ∨ even n
⊦ ∀m n. even (m + n) ⇔ even m ⇔ even n
⊦ ∀m n. ¬(n = 0) ⇒ m mod n < n
⊦ ∀f g. (∀x. f x = g x) ⇔ f = g
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀m n. m ≤ n ⇔ m < n ∨ m = n
⊦ ∀m n. n ≤ m ⇒ m - n + n = m
⊦ ∀m n. m ≤ n ∧ n ≤ m ⇔ m = n
⊦ ∀t1 t2 t3. (t1 ∨ t2) ∨ t3 ⇔ t1 ∨ t2 ∨ t3
⊦ ∀m n p. m * (n * p) = m * n * p
⊦ ∀m n p. m + (n + p) = m + n + p
⊦ ∀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
⊦ ∀P. P 0 ∧ (∀n. P n ⇒ P (suc n)) ⇒ ∀n. P n
⊦ ∀a b. ¬(a = 0) ⇒ (divides a b ⇔ b mod a = 0)
⊦ ∀m n. ¬(n = 0) ⇒ m mod n mod n = m mod n
⊦ ∀m n. exp m n = 0 ⇔ m = 0 ∧ ¬(n = 0)
⊦ ∀m n p. m * (n + p) = m * n + m * p
⊦ ∀m n p. (m + n) * p = m * p + n * p
⊦ ∀m n. ¬(n = 0) ⇒ m div n * n + m mod n = m
⊦ ∀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
⊦ ∀m n p. ¬(n = 0) ⇒ m mod n * (p mod n) mod n = m * p mod n
⊦ ∀a b n. ¬(n = 0) ⇒ (a mod n + b mod n) mod n = (a + b) mod n