Package gfp-div-gcd-def: Definition of a GF(p) division algorithm based on gcd

Information

namegfp-div-gcd-def
version1.10
descriptionDefinition of a GF(p) division algorithm based on gcd
authorJoe Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2012-01-29
requiresbool
pair
relation
showData.Bool
Data.Pair
Number.GF(p)
Number.Natural

Files

Defined Constant

Theorem

u v x1 x2.
    gcdDiv u v x1 x2 =
    if u = 1 then x1
    else if v = 1 then x2
    else if even u then gcdDiv (u div 2) v (x1 / 2) x2
    else if even v then gcdDiv u (v div 2) x1 (x2 / 2)
    else if v u then gcdDiv (u - v) v (x1 - x2) x2
    else gcdDiv u (v - u) x1 (x2 - x1)

Input Type Operators

Input Constants

Assumptions

T

¬F T

¬T F

F p. p

t. t ¬t

(¬) = λp. p F

() = λp. p ((select) p)

t. (λx. t x) = t

() = λp. p = λx. T

t. F t F

t. T t t

t. t T T

() = λp q. p q p

t1 t2. (if F then t1 else t2) = t2

t1 t2. (if T then t1 else t2) = t1

p x. p x p ((select) p)

() = λp q. (λf. f p q) = λf. f T T

() = λp. q. (x. p x q) q

P. (p. P p) p1 p2. P (p1, p2)

() = λp q. r. (p r) (q r) r

PAIR'. fn. a0 a1. fn (a0, a1) = PAIR' a0 a1

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