Algebras and Coalgebras in dependent type theory
Anton Setzer Swansea University 12 April 2012
1/ 30
Algebras and Coalgebras in dependent type theory Anton Setzer - - PowerPoint PPT Presentation
Algebras and Coalgebras in dependent type theory Anton Setzer Swansea University 12 April 2012 1/ 30 From Algebras to Indexed Inductive Definitions Indexed Inductive-Recursive Definitions Induction-Induction Coalgebras 2/ 30 From the
1/ 30
2/ 30
3/ 30
✿✿✿✿✿✿✿✿✿ instead of f (a1, . . . , an).
✿✿✿✿✿✿✿✿✿✿✿✿✿ is the disjoint union of Ai.
✿✿ : Ai → A1 + · · · + An
✿✿✿ denotes the type of sets,
4/ 30
✿✿✿✿✿✿
✿✿✿✿✿✿✿✿✿✿✿✿✿✿
✿✿✿✿✿✿✿✿✿✿✿✿✿
5/ 30
From Algebras to Indexed Inductive Definitions
6/ 30
From Algebras to Indexed Inductive Definitions
✿✿✿✿✿✿ := {∗}
✿✿✿✿✿✿ := X n
✿✿✿✿✿ := Ff1(X) + · · · + Ffl(X)
✿ := [f1, . . . , fn] : F(A) → A
7/ 30
From Algebras to Indexed Inductive Definitions
✿ := {s1, . . . , sn} be the set of all sorts.
◮ If a :→ As, let
✿✿✿✿✿ := {∗} ◮ If f : As(1) × · · · × As(n) → As, let
✿✿✿✿✿ := Xs(1) × · · · × Xs(n) ◮ Let for s : S
✿✿✿✿✿ := Ffi1 (X) + · · · + Ffil (X)
◮ Define
✿ : (s : S) → F s(A) → As ,
◮ Then (A,
8/ 30
From Algebras to Indexed Inductive Definitions
✿✿✿✿✿ := Ff1(X) + · · · + Ffn(X)
✿✿✿✿✿ : F(X) → S
✿ : (a : F(A)) → Aindex s ,
✿✿✿✿✿✿✿✿✿✿✿✿
9/ 30
From Algebras to Indexed Inductive Definitions
◮ Used when forming algebras referring to other algebras.
✿✿✿✿✿✿✿✿✿✿✿✿✿
10/ 30
From Algebras to Indexed Inductive Definitions
11/ 30
From Algebras to Indexed Inductive Definitions
✿✿✿
✿✿✿✿✿✿✿✿✿✿✿✿✿✿
◮ Base Case:
◮ Non-inductive Argument:
12/ 30
From Algebras to Indexed Inductive Definitions
◮ Inductive Argument:
13/ 30
From Algebras to Indexed Inductive Definitions
14/ 30
Indexed Inductive-Recursive Definitions
15/ 30
Indexed Inductive-Recursive Definitions
◮ Only dependency on non-inductive arguments not on inductive
◮ Direct dependency not possible, since we don’t know what X is.
◮ X : S → Set inductively together with ◮ T : (s : S) → Xs → D[s] recursively for some type D[s]. ◮ Later arguments can depend on T applied to inductive arguments. 16/ 30
Indexed Inductive-Recursive Definitions
17/ 30
Indexed Inductive-Recursive Definitions
✿✿✿
✿✿✿✿✿✿✿✿✿✿✿✿✿✿
◮ Base Case:
18/ 30
Indexed Inductive-Recursive Definitions
◮ Non-inductive Argument:
19/ 30
Indexed Inductive-Recursive Definitions
◮ Inductive Argument:
20/ 30
Induction-Induction
21/ 30
Induction-Induction
◮ A : Set inductively, while defining ◮ T : A → D recursively.
◮ A : Set inductively, while defining ◮ B : A → Set inductively. 22/ 30
Induction-Induction
23/ 30
Induction-Induction
◮ ∀x ∈ XL.Y ≤ x. ◮ ∀y ∈ YR.y ≤ X.
24/ 30
Induction-Induction
◮ ∃x ∈ XL.Y ≤ x or ◮ ∃y ∈ YR.y ≤ X.
25/ 30
Coalgebras
26/ 30
Coalgebras
✿✿✿✿✿✿✿✿✿✿✿✿✿
27/ 30
Coalgebras
28/ 30
Coalgebras
◮ Algebras are determined by their introduction rules,
◮ Coalgebras are determined by their elimination rules,
29/ 30
Coalgebras
30/ 30