Package gfp-def: Definition of GF(p) finite fields
Information
name | gfp-def |
version | 1.66 |
description | Definition of GF(p) finite fields |
author | Joe Leslie-Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2014-11-01 |
checksum | 0f097e66a2f93616aefe72f38a77842caceec525 |
requires | bool gfp-witness natural natural-bits natural-divides natural-prime |
show | Data.Bool Data.Pair Number.GF(p) Number.Natural Probability.Random |
Files
- Package tarball gfp-def-1.66.tgz
- Theory source file gfp-def.thy (included in the package tarball)
Defined Type Operator
- Number
- GF(p)
- gfp
- GF(p)
Defined Constants
- Number
- GF(p)
- *
- +
- -
- <
- ≤
- ↑
- ~
- fromNatural
- fromRandom
- toNatural
- GF(p)
Theorems
⊦ ¬(oddprime = 0)
⊦ ∀x. x ≤ x
⊦ fromNatural oddprime = 0
⊦ oddprime mod oddprime = 0
⊦ 0 mod oddprime = 0
⊦ ∀x. ¬(x < x)
⊦ ∀x. toNatural x < oddprime
⊦ ~0 = 0
⊦ ∀x. ~~x = x
⊦ ∀x. fromNatural (toNatural x) = x
⊦ ∀n. n mod oddprime < oddprime
⊦ ∀n. n mod oddprime ≤ n
⊦ ∀x. x + 0 = x
⊦ ∀x. x ↑ 1 = x
⊦ ∀x. 0 + x = x
⊦ ∀x. toNatural x div oddprime = 0
⊦ ∀x. x ↑ 0 = 1
⊦ ∀x. x * 0 = 0
⊦ ∀x. x + ~x = 0
⊦ ∀x. 0 * x = 0
⊦ ∀x. ~x + x = 0
⊦ ∀x. toNatural x mod oddprime = toNatural x
⊦ ∀x. x * 1 = x
⊦ ∀x. 1 * x = x
⊦ ∀n. toNatural (fromNatural n) = n mod oddprime
⊦ ∀x. ~x = fromNatural (oddprime - toNatural x)
⊦ ∀x y. x * y = y * x
⊦ ∀x y. x + y = y + x
⊦ ∀n. divides oddprime n ⇔ n mod oddprime = 0
⊦ ∀n. n < oddprime ⇒ toNatural (fromNatural n) = n
⊦ ∀n. n < oddprime ⇒ n mod oddprime = n
⊦ ∀x. fromNatural x = 0 ⇔ divides oddprime x
⊦ ∀n. n mod oddprime mod oddprime = n mod oddprime
⊦ ∀x y. x - y = x + ~y
⊦ ∀x y. ¬(x < y) ⇔ y ≤ x
⊦ ∀x y. ¬(x ≤ y) ⇔ y < x
⊦ ∀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
⊦ ∀m n. fromNatural (m ↑ n) = fromNatural m ↑ n
⊦ ∀x y. x + y = x ⇔ y = 0
⊦ ∀x y. y + x = x ⇔ y = 0
⊦ ∀x y. ~x + ~y = ~(x + y)
⊦ ∀x n. x ↑ suc n = x * x ↑ n
⊦ ∀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 oddprime
⊦ ∀x y. toNatural (x + y) = (toNatural x + toNatural y) mod oddprime
⊦ ∀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
⊦ ∀x1 x2 x3. x1 < x2 ∧ x2 < x3 ⇒ x1 < x3
⊦ ∀x1 x2 x3. x1 < x2 ∧ x2 ≤ x3 ⇒ x1 < x3
⊦ ∀x1 x2 x3. x1 ≤ x2 ∧ x2 < x3 ⇒ x1 < x3
⊦ ∀x1 x2 x3. x1 ≤ x2 ∧ x2 ≤ x3 ⇒ x1 ≤ x3
⊦ ∀n. 0 ↑ n = if n = 0 then 1 else 0
⊦ ∀x y. fromNatural x = fromNatural y ⇔ x mod oddprime = y mod oddprime
⊦ ∀x y z. x * (y + z) = x * y + x * z
⊦ ∀x y z. (y + z) * x = y * x + z * x
⊦ ∀x m n. x ↑ m * x ↑ n = x ↑ (m + n)
⊦ ∀m n.
(m mod oddprime) * (n mod oddprime) mod oddprime = m * n mod oddprime
⊦ ∀m n.
(m mod oddprime + n mod oddprime) mod oddprime = (m + n) mod oddprime
⊦ ∀x y. x < oddprime ∧ y < oddprime ∧ fromNatural x = fromNatural y ⇒ x = y
⊦ ∀r.
fromRandom r =
let (n, r') ← Uniform.fromRandom oddprime r in (fromNatural n, r')
External Type Operators
- →
- bool
- Data
- Pair
- ×
- Pair
- Number
- Natural
- natural
- Natural
- Probability
- Random
- random
- Random
External Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∃!
- ∨
- ¬
- cond
- ⊥
- ⊤
- Pair
- ,
- Bool
- Number
- GF(p)
- oddprime
- Natural
- *
- +
- -
- <
- ≤
- ↑
- bit0
- bit1
- div
- divides
- mod
- prime
- suc
- zero
- Uniform
- Uniform.fromRandom
- GF(p)
Assumptions
⊦ ⊤
⊦ prime oddprime
⊦ ¬prime 0
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ bit0 0 = 0
⊦ ∀t. t ⇒ t
⊦ ∀n. n ≤ n
⊦ ⊥ ⇔ ∀p. p
⊦ ∀t. t ∨ ¬t
⊦ (¬) = λp. p ⇒ ⊥
⊦ (∃) = λ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 ⇔ t
⊦ ∀t. ⊥ ⇒ t ⇔ ⊤
⊦ ∀t. ⊤ ⇒ t ⇔ t
⊦ ∀t. t ⇒ ⊤ ⇔ ⊤
⊦ ∀t. ⊥ ∨ t ⇔ t
⊦ ∀t. ⊤ ∨ t ⇔ ⊤
⊦ ∀t. t ∨ ⊥ ⇔ t
⊦ ∀t. t ∨ ⊤ ⇔ ⊤
⊦ ∀n. 0 * n = 0
⊦ ∀n. 0 + n = n
⊦ ∀t. (⊥ ⇔ t) ⇔ ¬t
⊦ ∀t. t ⇒ ⊥ ⇔ ¬t
⊦ ∀n. bit1 n = suc (bit0 n)
⊦ ∀m. m ↑ 0 = 1
⊦ ∀m. 1 * m = m
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀n. 0 < n ⇔ ¬(n = 0)
⊦ ∀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
⊦ ∀m n. ¬(m < n) ⇔ n ≤ m
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ ∀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. suc m + n = suc (m + n)
⊦ ∀n. 0 ↑ n = if n = 0 then 1 else 0
⊦ ∀m n. m ↑ suc n = m * m ↑ n
⊦ ∀m n. ¬(n = 0) ⇒ m mod n < n
⊦ ∀m n. ¬(n = 0) ⇒ m mod n ≤ m
⊦ ∀f g. (∀x. f x = g x) ⇔ f = g
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀m n. n ≤ m ⇒ m - n + n = m
⊦ ∀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
⊦ ∀m n p. m < n ∧ n < p ⇒ m < p
⊦ ∀m n p. m < n ∧ n ≤ p ⇒ m < p
⊦ ∀m n p. m ≤ n ∧ n < p ⇒ m < p
⊦ ∀m n p. m ≤ n ∧ n ≤ p ⇒ m ≤ p
⊦ ∀r. (∀x. ∃y. r x y) ⇔ ∃f. ∀x. r x (f x)
⊦ ∀p. p 0 ∧ (∀n. p n ⇒ p (suc n)) ⇒ ∀n. p n
⊦ ∀a b. ¬(a = 0) ⇒ (divides a b ⇔ b mod a = 0)
⊦ ∀n m. ¬(n = 0) ⇒ m mod n mod n = m mod n
⊦ ∀m n p. m * (n + p) = m * n + m * p
⊦ ∀m n p. (m + n) * p = m * p + n * p
⊦ (∃!) = λp. (∃) p ∧ ∀x y. p x ∧ p y ⇒ x = y
⊦ ∀b f x y. f (if b then x else y) = if b then f x else f y
⊦ ∀e f. ∃!fn. fn 0 = e ∧ ∀n. fn (suc n) = f (fn n) n
⊦ ∀m n. ¬(n = 0) ⇒ (m div n) * n + m mod n = m
⊦ ∀n m p. ¬(n = 0) ⇒ (m mod n) * (p mod n) mod n = m * p mod n
⊦ ∀n a b. ¬(n = 0) ⇒ (a mod n + b mod n) mod n = (a + b) mod n