Package monoid-mult-add-thm: Correctness of monoid multiplication by repeated addition

Information

namemonoid-mult-add-thm
version1.6
descriptionCorrectness of monoid multiplication by repeated addition
authorJoe Leslie-Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2014-06-12
requiresbool
list
monoid-mult-add-def
monoid-mult-def
monoid-mult-thm
monoid-witness
natural
natural-bits
showAlgebra.Monoid
Data.Bool
Data.List
Number.Natural

Files

Theorems

x n. multAdd 0 x (Bits.fromNatural n) = x * n

z x l. multAdd z x l = z + x * Bits.toNatural l

External Type Operators

External Constants

Assumptions

Bits.toNatural [] = 0

t. (x. t) t

() = λp. p = λx.

x. x * 0 = 0

x. 0 + x = x

x. x + 0 = x

n. Bits.toNatural (Bits.fromNatural n) = n

x. x * 1 = x

() = λp q. p q p

t. (t ) (t )

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

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

z x. multAdd z x [] = z

b. fromBool b = if b then 1 else 0

x. x * 2 = x + x

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

h t. Bits.toNatural (h :: t) = Bits.cons h (Bits.toNatural t)

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

h t. Bits.cons h t = fromBool h + 2 * t

x y z. x + y + z = x + (y + z)

x m n. x * (m * n) = x * m * n

x m n. x * (m + n) = x * m + x * n

p. p [] (h t. p t p (h :: t)) l. p l

z x h t.
    multAdd z x (h :: t) = multAdd (if h then z + x else z) (x + x) t