Package map-reduce-bit3x3: The map reduce 3x3 bit matrix example
Information
| name | map-reduce-bit3x3 |
| version | 1.4 |
| description | The map reduce 3x3 bit matrix example |
| author | Joe Leslie-Hurd <joe@gilith.com> |
| license | MIT |
| requires | base |
| show | Data.Bool Data.List Data.Pair |
Files
- Package tarball map-reduce-bit3x3-1.4.tgz
- Theory file map-reduce-bit3x3.thy (included in the package tarball)
Defined Constants
- Bit
- Bit.*
- Bit.+
- Bit3
- Bit3.dot
- Bit3x3
- Bit3x3.*
- Bit3x3.identity
- Bit3x3.product
Theorems
⊦ Bit3x3.product = foldl Bit3x3.* Bit3x3.identity
⊦ ∀a b. Bit.* a b ⇔ a ∧ b
⊦ ∀a b. Bit.+ a b ⇔ ¬(a ⇔ b)
⊦ ∀l1 l2.
Bit3x3.product (l1 @ l2) =
Bit3x3.* (Bit3x3.product l1) (Bit3x3.product l2)
⊦ Bit3x3.identity = ((⊤, ⊥, ⊥), (⊥, ⊤, ⊥), ⊥, ⊥, ⊤)
⊦ ∀a1 a2 a3 b1 b2 b3.
Bit3.dot (a1, a2, a3) (b1, b2, b3) ⇔
Bit.+ (Bit.* a1 b1) (Bit.+ (Bit.* a2 b2) (Bit.* a3 b3))
⊦ ∀a.
∃a11 a12 a13 a21 a22 a23 a31 a32 a33.
a = ((a11, a12, a13), (a21, a22, a23), a31, a32, a33)
⊦ ∀a11 a12 a13 a21 a22 a23 a31 a32 a33 b11 b12 b13 b21 b22 b23 b31 b32 b33.
Bit3x3.* ((a11, a12, a13), (a21, a22, a23), a31, a32, a33)
((b11, b12, b13), (b21, b22, b23), b31, b32, b33) =
((Bit3.dot (a11, a12, a13) (b11, b21, b31),
Bit3.dot (a11, a12, a13) (b12, b22, b32),
Bit3.dot (a11, a12, a13) (b13, b23, b33)),
(Bit3.dot (a21, a22, a23) (b11, b21, b31),
Bit3.dot (a21, a22, a23) (b12, b22, b32),
Bit3.dot (a21, a22, a23) (b13, b23, b33)),
Bit3.dot (a31, a32, a33) (b11, b21, b31),
Bit3.dot (a31, a32, a33) (b12, b22, b32),
Bit3.dot (a31, a32, a33) (b13, b23, b33))
Input Type Operators
- →
- bool
- Data
- List
- list
- Pair
- ×
- List
Input Constants
- =
- Data
- Bool
- ∀
- ∧
- ⇒
- ∃
- ∨
- ¬
- ⊥
- ⊤
- List
- @
- foldl
- Pair
- ,
- fst
- snd
- Bool
Assumptions
⊦ ⊤
⊦ ¬⊥ ⇔ ⊤
⊦ ¬⊤ ⇔ ⊥
⊦ ∀t. t ⇒ t
⊦ ∀a. ∃x. x = a
⊦ (∀) = λp. p = λx. ⊤
⊦ ∀t. ¬¬t ⇔ t
⊦ ∀t. (⊤ ⇔ t) ⇔ t
⊦ ∀t. ⊥ ∧ t ⇔ ⊥
⊦ ∀t. ⊤ ∧ t ⇔ t
⊦ ∀t. t ∧ ⊥ ⇔ ⊥
⊦ ∀t. t ∧ ⊤ ⇔ t
⊦ ∀t. ⊥ ⇒ t ⇔ ⊤
⊦ ∀t. ⊤ ⇒ t ⇔ t
⊦ ∀t. t ⇒ ⊤ ⇔ ⊤
⊦ ∀t. ⊥ ∨ t ⇔ t
⊦ ∀t. ⊤ ∨ t ⇔ ⊤
⊦ ∀t. (⊥ ⇔ t) ⇔ ¬t
⊦ ∀t. (t ⇔ ⊥) ⇔ ¬t
⊦ ∀t. t ⇒ ⊥ ⇔ ¬t
⊦ (⇒) = λp q. p ∧ q ⇔ p
⊦ ∀t. (t ⇔ ⊤) ∨ (t ⇔ ⊥)
⊦ ∀x y. fst (x, y) = x
⊦ ∀x y. snd (x, y) = y
⊦ ∀p. ∃x y. p = (x, y)
⊦ ∀x y. x = y ⇔ y = x
⊦ ∀t1 t2. t1 ∧ t2 ⇔ t2 ∧ t1
⊦ (∧) = λp q. (λf. f p q) = λf. f ⊤ ⊤
⊦ (∃) = λp. ∀q. (∀x. p x ⇒ q) ⇒ q
⊦ ∀p a. (∃x. a = x ∧ p x) ⇔ p a
⊦ (∨) = λp q. ∀r. (p ⇒ r) ⇒ (q ⇒ r) ⇒ r
⊦ ∀p q. (∃x. p x) ⇒ q ⇔ ∀x. p x ⇒ q
⊦ ∀t1 t2 t3. (t1 ∧ t2) ∧ t3 ⇔ t1 ∧ t2 ∧ t3
⊦ ∀x y a b. (x, y) = (a, b) ⇔ x = a ∧ y = b
⊦ ∀g f b l1 l2.
(∀s. g s b = s) ∧ (∀s1 s2 x. g s1 (f s2 x) = f (g s1 s2) x) ⇒
foldl f b (l1 @ l2) = g (foldl f b l1) (foldl f b l2)