Package group-mult-sub-thm: Correctness of group multiplication by repeated subtraction

Information

namegroup-mult-sub-thm
version1.10
descriptionCorrectness of group multiplication by repeated subtraction
authorJoe Leslie-Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2012-12-02
requiresbool
group-def
group-mult-def
group-mult-sub-def
group-mult-thm
group-thm
group-witness
list
natural
natural-fibonacci
showAlgebra.Group
Data.Bool
Data.List
Number.Natural

Files

Theorems

x n. x * n = multSub 0 0 x 0 (Fibonacci.encode n)

x n d f p l.
    x + n = n + x x + d = d + x
    multSub n d (x * f) (~(x * p)) l =
    n - d + x * Fibonacci.decode.dest f p l
    multSub n d (~(x * f)) (x * p) l =
    d - n + x * Fibonacci.decode.dest f p l

External Type Operators

External Constants

Assumptions

¬

¬

t. (x. t) t

() = λp. p = λx.

t. t t

t. t t t

x. x * 0 = 0

x. 0 + x = x

x. x + 0 = x

n. Fibonacci.decode (Fibonacci.encode n) = n

x. x * 1 = x

x. x + ~x = 0

x. ~x + x = 0

() = λp q. p q p

t. (t ) (t )

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

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

f p. Fibonacci.decode.dest f p [] = 0

l. Fibonacci.decode l = Fibonacci.decode.dest 1 0 l

x y. x = y y = x

x y. x = y y = x

m n. m + n = n + m

x y. x - y = x + ~y

x y. ~x + (x + y) = y

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

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

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

x y z. x = y y = z x = z

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

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

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

b n d f p. multSub b n d f p [] = if b then n - d else d - n

x n y. x + y = y + x x * n + y = y + x * n

x n y. y + x = x + y y + x * n = x * n + y

f p h t.
    Fibonacci.decode.dest f p (h :: t) =
    let s f + p in
    let n Fibonacci.decode.dest s f t in
    if h then s + n else n

b n d f p h t.
    multSub b n d f p (h :: t) =
    let s p - f in multSub (¬b) d (if h then n - s else n) s f t