Package montgomery-def: Definition of Montgomery multiplication

Information

namemontgomery-def
version1.6
descriptionDefinition of Montgomery multiplication
authorJoe Leslie-Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2014-01-13
requiresbool
natural
showData.Bool
Number.Natural

Files

Defined Constants

Theorems

n r k a. Montgomery.doubleExp n r k a 0 = a

n r k a. Montgomery.reduce n r k a = (a + (a * k mod r) * n) div r

n r k a m.
    Montgomery.doubleExp n r k a (suc m) =
    let b Montgomery.reduce n r k (a * a) in
    let c if r b then b - n else b in
    Montgomery.doubleExp n r k c m

External Type Operators

External Constants

Assumptions

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

() = λp. p = λx.

() = λp q. p q p

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

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

r. (x. y. r x y) f. x. r x (f x)

(∃!) = λp. () p x y. p x p y x = y

e f. ∃!fn. fn 0 = e n. fn (suc n) = f (fn n) n