A tale of theories and data-structures
Jacques Carette, Musa Al-hassy, Wolfram Kahl
McMaster University, Hamilton
June 4, 2018
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 1 / 15
A tale of theories and data-structures Jacques Carette, Musa - - PowerPoint PPT Presentation
A tale of theories and data-structures Jacques Carette, Musa Al-hassy, Wolfram Kahl McMaster University, Hamilton June 4, 2018 Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 1 / 15 Lists and Monoids
McMaster University, Hamilton
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 1 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 2 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 2 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 2 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 2 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 3 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 4 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 4 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 5 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 5 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 6 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered! Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support! Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support!
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support!
◮ “Finite support” is hard to say constructively . . . Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support!
◮ “Finite support” is hard to say constructively . . . ◮ Summing over all elements of A is even harder . . . Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support!
◮ “Finite support” is hard to say constructively . . . ◮ Summing over all elements of A is even harder . . . ◮ Can build a decidable equiv. relation on A from A → N! Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support!
◮ “Finite support” is hard to say constructively . . . ◮ Summing over all elements of A is even harder . . . ◮ Can build a decidable equiv. relation on A from A → N!
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support!
◮ “Finite support” is hard to say constructively . . . ◮ Summing over all elements of A is even harder . . . ◮ Can build a decidable equiv. relation on A from A → N!
◮ almost works! Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support!
◮ “Finite support” is hard to say constructively . . . ◮ Summing over all elements of A is even harder . . . ◮ Can build a decidable equiv. relation on A from A → N!
◮ almost works! ◮ Commutative Monoid uses ≡ Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
◮ Ordered!
◮ No finite support!
◮ “Finite support” is hard to say constructively . . . ◮ Summing over all elements of A is even harder . . . ◮ Can build a decidable equiv. relation on A from A → N!
◮ almost works! ◮ Commutative Monoid uses ≡
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 7 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
◮ Too many parts over ≡ Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
◮ Too many parts over ≡
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
◮ Too many parts over ≡
◮ Extremely complex, forget the actual dead end. Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
◮ Too many parts over ≡
◮ Extremely complex, forget the actual dead end.
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
◮ Too many parts over ≡
◮ Extremely complex, forget the actual dead end.
◮ Proof that fold well-behaved very hard. Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
◮ Too many parts over ≡
◮ Extremely complex, forget the actual dead end.
◮ Proof that fold well-behaved very hard.
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
◮ Too many parts over ≡
◮ Extremely complex, forget the actual dead end.
◮ Proof that fold well-behaved very hard.
◮ Still assumes ≡. Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
◮ Too many parts over ≡
◮ Extremely complex, forget the actual dead end.
◮ Proof that fold well-behaved very hard.
◮ Still assumes ≡.
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 8 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. ◮ An equivalence between Fin |S| and Fin |T| Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. ◮ An equivalence between Fin |S| and Fin |T| ◮ A proof that permuting the elements of T gives a pointwise
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. ◮ An equivalence between Fin |S| and Fin |T| ◮ A proof that permuting the elements of T gives a pointwise
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. ◮ An equivalence between Fin |S| and Fin |T| ◮ A proof that permuting the elements of T gives a pointwise
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. ◮ An equivalence between Fin |S| and Fin |T| ◮ A proof that permuting the elements of T gives a pointwise
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. ◮ An equivalence between Fin |S| and Fin |T| ◮ A proof that permuting the elements of T gives a pointwise
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. ◮ An equivalence between Fin |S| and Fin |T| ◮ A proof that permuting the elements of T gives a pointwise
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
◮ A permutation between |S| and |T|, i.e. ◮ An equivalence between Fin |S| and Fin |T| ◮ A proof that permuting the elements of T gives a pointwise
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 9 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 10 / 15
◮ Associativity: ∀x, y, z. x ∗ (y ∗ z) ≡ (x ∗ y) ∗ z; ◮ Left-unit: ∀x. e ∗ x ≡ x; ◮ Right-unit: ∀x. x ∗ e ≡ x ◮ Involutive: ∀x. inv(invx) ≡ x
◮ Commutativity: ∀x, y. x ∗ y ≡ y ∗ x
◮ Idempotence: ∀x. x ∗ x ≡ x Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 11 / 15
◮ Associativity: ∀x, y, z. x ∗ (y ∗ z) ≡ (x ∗ y) ∗ z; ◮ Left-unit: ∀x. e ∗ x ≡ x; ◮ Right-unit: ∀x. x ∗ e ≡ x ◮ Involutive: ∀x. inv(invx) ≡ x
◮ Commutativity: ∀x, y. x ∗ y ≡ y ∗ x
◮ Idempotence: ∀x. x ∗ x ≡ x
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 11 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 12 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 13 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 14 / 15
Carette, Al-hassy, Kahl (McMaster) A tale of theories and data-structures June 4, 2018 15 / 15