Package gfp-div-gcd-def: Definition of a GF(p) division algorithm based on gcd
Information
name | gfp-div-gcd-def |
version | 1.30 |
description | Definition of a GF(p) division algorithm based on gcd |
author | Joe Hurd <joe@gilith.com> |
license | MIT |
provenance | HOL Light theory extracted on 2012-06-10 |
requires | bool pair relation |
show | Data.Bool Data.Pair Number.GF(p) Number.Natural |
Files
- Package tarball gfp-div-gcd-def-1.30.tgz
- Theory file gfp-div-gcd-def.thy (included in the package tarball)
Defined Constant
- Number
- GF(p)
- divGcd
- GF(p)
Theorem
⊦ ∀u v x1 x2.
divGcd u v x1 x2 =
if u = 1 then x1
else if v = 1 then x2
else if even u then divGcd (u div 2) v (x1 / 2) x2
else if even v then divGcd u (v div 2) x1 (x2 / 2)
else if v ≤ u then divGcd (u - v) v (x1 - x2) x2
else divGcd u (v - u) x1 (x2 - x1)
Input Type Operators
- →
- bool
- Data
- Pair
- ×
- Pair
- Number
- GF(p)
- gfp
- Natural
- natural
- GF(p)
Input Constants
- =
- select
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- cond
- ⊥
- ⊤
- Pair
- ,
- Bool
- Number
- GF(p)
- -
- /
- fromNatural
- Natural
- -
- ≤
- bit0
- bit1
- div
- even
- zero
- GF(p)
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ ⊥ ⇔ ∀p. p
⊦ ∀t. t ∨ ¬t
⊦ (¬) = λp. p ⇒ ⊥
⊦ (∃) = λp. p ((select) p)
⊦ ∀t. (λx. t x) = t
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. ⊥ ∧ t ⇔ ⊥
⊦ ∀t. ⊤ ∧ t ⇔ t
⊦ ∀t. t ⇒ ⊤ ⇔ ⊤
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t1 t2. (if ⊥ then t1 else t2) = t2
⊦ ∀t1 t2. (if ⊤ then t1 else t2) = t1
⊦ ∀p x. p x ⇒ p ((select) p)
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀p. (∀xy. p xy) ⇔ ∀x y. p (x, y)
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀f. ∃fn. ∀x y. fn (x, y) = f x y
⊦ ∀p. (∀x. ∃y. p x y) ⇔ ∃y. ∀x. p x (y x)
⊦ ∀p g h. ∃f. ∀x. f x = if p x then f (g x) else h x