Package monoid-comm-mult: Commutative monoid multiplication
Information
| name | monoid-comm-mult |
| version | 1.3 |
| description | Commutative monoid multiplication |
| author | Joe Leslie-Hurd <joe@gilith.com> |
| license | MIT |
| requires | bool monoid-mult-add monoid-mult-def monoid-mult-thm |
| show | Algebra.Monoid Data.Bool Data.List Number.Natural |
Files
- Package tarball monoid-comm-mult-1.3.tgz
- Theory source file monoid-comm-mult.thy (included in the package tarball)
Theorems
⊦ ∀x. x * 0 = 0
⊦ ∀n. 0 * n = 0
⊦ ∀x. x * 1 = x
⊦ ∀z x. multAdd z x [] = z
⊦ ∀x. x * 2 = x + x
⊦ ∀x n. multAdd 0 x (Bits.fromNatural n) = x * n
⊦ ∀x n. x * suc n = x + x * n
⊦ ∀x n. x * suc n = x * n + x
⊦ ∀z x l. multAdd z x l = z + x * Bits.toNatural l
⊦ ∀x m n. x * (m * n) = x * m * n
⊦ ∀x m n. x * (m + n) = x * m + x * n
⊦ ∀z x h t.
multAdd z x (h :: t) = multAdd (if h then z + x else z) (x + x) t
External Type Operators
- →
- bool
- Algebra
- Monoid
- monoid
- Monoid
- Data
- List
- list
- List
- Number
- Natural
- natural
- Natural
External Constants
- =
- Algebra
- Monoid
- *
- +
- 0
- multAdd
- Monoid
- Data
- Bool
- ∀
- cond
- List
- ::
- []
- Bool
- Number
- Natural
- *
- +
- bit0
- bit1
- suc
- zero
- Bits
- Bits.fromNatural
- Bits.toNatural
- Natural
Assumptions
⊦ ∀x. x * 0 = 0
⊦ ∀n. 0 * n = 0
⊦ ∀x. x * 1 = x
⊦ ∀z x. multAdd z x [] = z
⊦ ∀x. x * 2 = x + x
⊦ ∀x n. multAdd 0 x (Bits.fromNatural n) = x * n
⊦ ∀x n. x * suc n = x + x * n
⊦ ∀x n. x * suc n = x * n + x
⊦ ∀z x l. multAdd z x l = z + x * Bits.toNatural l
⊦ ∀x m n. x * (m * n) = x * m * n
⊦ ∀x m n. x * (m + n) = x * m + x * n
⊦ ∀z x h t.
multAdd z x (h :: t) = multAdd (if h then z + x else z) (x + x) t