SlideShare une entreprise Scribd logo
1  sur  158
Télécharger pour lire hors ligne
Lecture one:
The Method of Coalgebra
– in some detail –
Jan Rutten
CWI Amsterdam & Radboud University Nijmegen
IPM, Tehran - 13 January 2016
Acknowledgements
My esteemed co-authors
- Marcello Bonsangue (Leiden, CWI)
- Helle Hansen (Delft)
- Alexandra Silva (City College London)
- Milad Niqui
- Clemens Kupke (Glasgow)
- Prakash Panangaden (McGill, Montreal)
- Filippo Bonchi (ENS, Lyon)
- Joost Winter (Warsaw), Jurriaan Rot (ENS, Lyon)
- and many others.
Samson Abramsky (Oxford)
Damien Pous (ENS, Lyon)
Acknowledgements
My esteemed co-authors
- Marcello Bonsangue (Leiden, CWI)
- Helle Hansen (Delft)
- Alexandra Silva (City College London)
- Milad Niqui
- Clemens Kupke (Glasgow)
- Prakash Panangaden (McGill, Montreal)
- Filippo Bonchi (ENS, Lyon)
- Joost Winter (Warsaw), Jurriaan Rot (ENS, Lyon)
- and many others.
Samson Abramsky (Oxford)
Damien Pous (ENS, Lyon)
Overview of todays lectures
Lecture one: The method of coalgebra
Lecture two: A coinductive calculus of streams
Lecture three: Automata and the algebra-coalgebra duality
Lecture four: Coalgebraic up-to techniques
Overview of Lecture one
1. Category theory (where coalgebra comes from)
2. Duality (where coalgebra comes from)
3. How coalgebra works (the method in slogans)
4. Duality: induction and coinduction
5. What coalgebra studies (its subject)
6. Discussion
1. Category theory
(where coalgebra comes from)
Why categories?
From Samson Abramsky’s tutorial:
Categories, why and how?
(Dagstuhl, January 2015)
Why categories?
For logicians: gives a syntax-independent view of the
fundamental structures of logic, opens up new kinds of models
and interpretations.
For philosophers: a fresh approach to structuralist foundations
of mathematics and science; an alternative to the traditional
focus on set theory.
For computer scientists: gives a precise handle on
abstraction, representation-independence, genericity and more.
Gives the fundamental mathematical structures underpinning
programming concepts.
Why categories?
For mathematicians: organizes your previous mathematical
experience in a new and powerful way, reveals new connections
and structure, allows you to “think bigger thoughts”.
For physicists: new ways of formulating physical theories in a
structural form. Recent applications to Quantum Information
and Computation.
For economists and game theorists: new tools, bringing
complex phenomena into the scope of formalisation.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Category Theory in 10 Slogans
1. Always ask: what are the types?
2. Think in terms of arrows rather than elements.
3. Ask what mathematical structures do, not what they are.
4. Categories as mathematical contexts.
5. Categories as mathematical structures.
6. Make definitions and constructions as general as possible.
7. Functoriality!
8. Naturality!
9. Universality!
10. Adjoints are everywhere.
Categories: basic definitions
A category C consists of
- Objects A, B, C, . . .
- Morphisms/arrows: for each pair of objects A, B, a set of
morphisms C(A, B) with domain A and codomain B
- Composition of morphisms: g ◦ f:
A
g ◦ f
TT
f GG B
g GG C
- Axioms:
h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
Categories: basic definitions
A category C consists of
- Objects A, B, C, . . .
- Morphisms/arrows: for each pair of objects A, B, a set of
morphisms C(A, B) with domain A and codomain B
- Composition of morphisms: g ◦ f:
A
g ◦ f
TT
f GG B
g GG C
- Axioms:
h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
Categories: basic definitions
A category C consists of
- Objects A, B, C, . . .
- Morphisms/arrows: for each pair of objects A, B, a set of
morphisms C(A, B) with domain A and codomain B
- Composition of morphisms: g ◦ f:
A
g ◦ f
TT
f GG B
g GG C
- Axioms:
h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
Categories: basic definitions
A category C consists of
- Objects A, B, C, . . .
- Morphisms/arrows: for each pair of objects A, B, a set of
morphisms C(A, B) with domain A and codomain B
- Composition of morphisms: g ◦ f:
A
g ◦ f
TT
f GG B
g GG C
- Axioms:
h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
Categories: basic definitions
A category C consists of
- Objects A, B, C, . . .
- Morphisms/arrows: for each pair of objects A, B, a set of
morphisms C(A, B) with domain A and codomain B
- Composition of morphisms: g ◦ f:
A
g ◦ f
TT
f GG B
g GG C
- Axioms:
h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Categories: examples
• Any kind of mathematical structure, together with structure
preserving functions, forms a category. E.g.
- sets and functions
- groups and group homomorphisms
- monoids and monoid homomorphisms
- vector spaces over a field k, and linear maps
- topological spaces and continuous functions
- partially ordered sets and monotone functions
• Monoids are one-object categories
• algebras, and algebra homomorphisms
• coalgebras, and coalgebra homomorphisms
Arrows rather than elements
A function f : X → Y (between sets) is:
- injective if
∀x, y ∈ X, f(x) = f(y) ⇒ x = y
- surjective if
∀y ∈ Y, ∃x ∈ X, f(x) = y
- monic if
∀g, h, f ◦ g = f ◦ h ⇒ g = h
- epic if
∀g, h, g ◦ f = h ◦ f ⇒ g = h
Proposition
• m is injective iff m is monic.
• e is surjective iff e is epic.
Arrows rather than elements
A function f : X → Y (between sets) is:
- injective if
∀x, y ∈ X, f(x) = f(y) ⇒ x = y
- surjective if
∀y ∈ Y, ∃x ∈ X, f(x) = y
- monic if
∀g, h, f ◦ g = f ◦ h ⇒ g = h
- epic if
∀g, h, g ◦ f = h ◦ f ⇒ g = h
Proposition
• m is injective iff m is monic.
• e is surjective iff e is epic.
Arrows rather than elements
A function f : X → Y (between sets) is:
- injective if
∀x, y ∈ X, f(x) = f(y) ⇒ x = y
- surjective if
∀y ∈ Y, ∃x ∈ X, f(x) = y
- monic if
∀g, h, f ◦ g = f ◦ h ⇒ g = h
- epic if
∀g, h, g ◦ f = h ◦ f ⇒ g = h
Proposition
• m is injective iff m is monic.
• e is surjective iff e is epic.
Arrows rather than elements
A function f : X → Y (between sets) is:
- injective if
∀x, y ∈ X, f(x) = f(y) ⇒ x = y
- surjective if
∀y ∈ Y, ∃x ∈ X, f(x) = y
- monic if
∀g, h, f ◦ g = f ◦ h ⇒ g = h
- epic if
∀g, h, g ◦ f = h ◦ f ⇒ g = h
Proposition
• m is injective iff m is monic.
• e is surjective iff e is epic.
Arrows rather than elements
A function f : X → Y (between sets) is:
- injective if
∀x, y ∈ X, f(x) = f(y) ⇒ x = y
- surjective if
∀y ∈ Y, ∃x ∈ X, f(x) = y
- monic if
∀g, h, f ◦ g = f ◦ h ⇒ g = h
- epic if
∀g, h, g ◦ f = h ◦ f ⇒ g = h
Proposition
• m is injective iff m is monic.
• e is surjective iff e is epic.
Arrows rather than elements
A function f : X → Y (between sets) is:
- injective if
∀x, y ∈ X, f(x) = f(y) ⇒ x = y
- surjective if
∀y ∈ Y, ∃x ∈ X, f(x) = y
- monic if
∀g, h, f ◦ g = f ◦ h ⇒ g = h
- epic if
∀g, h, g ◦ f = h ◦ f ⇒ g = h
Proposition
• m is injective iff m is monic.
• e is surjective iff e is epic.
Arrows rather than elements
A function f : X → Y (between sets) is:
- injective if
∀x, y ∈ X, f(x) = f(y) ⇒ x = y
- surjective if
∀y ∈ Y, ∃x ∈ X, f(x) = y
- monic if
∀g, h, f ◦ g = f ◦ h ⇒ g = h
- epic if
∀g, h, g ◦ f = h ◦ f ⇒ g = h
Proposition
• m is injective iff m is monic.
• e is surjective iff e is epic.
Arrows rather than elements
A function f : X → Y (between sets) is:
- injective if
∀x, y ∈ X, f(x) = f(y) ⇒ x = y
- surjective if
∀y ∈ Y, ∃x ∈ X, f(x) = y
- monic if
∀g, h, f ◦ g = f ◦ h ⇒ g = h
- epic if
∀g, h, g ◦ f = h ◦ f ⇒ g = h
Proposition
• m is injective iff m is monic.
• e is surjective iff e is epic.
Arrows rather than elements
Defining the Cartesian product . . .
- with elements:
A × B = { a, b | a ∈ A, b ∈ B }
where
a, b = {{a, b}, b}
- with arrows (expressing a universal property):
∀C
f
ÐÐ
g
11
f, g

A A × Bπ1
oo
π2
GG B
Arrows rather than elements
Defining the Cartesian product . . .
- with elements:
A × B = { a, b | a ∈ A, b ∈ B }
where
a, b = {{a, b}, b}
- with arrows (expressing a universal property):
∀C
f
ÐÐ
g
11
f, g

A A × Bπ1
oo
π2
GG B
Arrows rather than elements
Defining the Cartesian product . . .
- with elements:
A × B = { a, b | a ∈ A, b ∈ B }
where
a, b = {{a, b}, b}
- with arrows (expressing a universal property):
∀C
f
ÐÐ
g
11
f, g

A A × Bπ1
oo
π2
GG B
2. Duality (where coalgebra comes from)
An additional slogan for categories: duality is omnipresent
- epi - mono
- product - sum
- initial object - final object
- algebra - coalgebra
2. Duality (where coalgebra comes from)
An additional slogan for categories: duality is omnipresent
- epi - mono
- product - sum
- initial object - final object
- algebra - coalgebra
Duality: monos and epis
- f is monic:
∀g, h, f ◦ g = f ◦ h ⇒ g = h
•
g
99
h
UU •
f GG •
- f is epic:
∀g, h, g ◦ f = h ◦ f ⇒ g = h
• •
h
gg
g
ww
•
foo
Proposition: f is monic in C iff f is epic in Cop.
Duality: monos and epis
- f is monic:
∀g, h, f ◦ g = f ◦ h ⇒ g = h
•
g
99
h
UU •
f GG •
- f is epic:
∀g, h, g ◦ f = h ◦ f ⇒ g = h
• •
h
gg
g
ww
•
foo
Proposition: f is monic in C iff f is epic in Cop.
Duality: monos and epis
- f is monic:
∀g, h, f ◦ g = f ◦ h ⇒ g = h
•
g
99
h
UU •
f GG •
- f is epic:
∀g, h, g ◦ f = h ◦ f ⇒ g = h
• •
h
gg
g
ww
•
foo
Proposition: f is monic in C iff f is epic in Cop.
Duality: monos and epis
- f is monic:
∀g, h, f ◦ g = f ◦ h ⇒ g = h
•
g
99
h
UU •
f GG •
- f is epic:
∀g, h, g ◦ f = h ◦ f ⇒ g = h
• •
h
gg
g
ww
•
foo
Proposition: f is monic in C iff f is epic in Cop.
Duality: products and coproducts
The product of A and B:
∀C
f
ÐÐ
g
11
f, g

A A × Bπ1
oo
π2
GG B
The coproduct of A and B:
∀C
A κ1
GG
f
PP
A + B
[f, g]
yy
Bκ2
oo
gll
Proposition: O is product in C iff O is coproduct in Cop.
Duality: products and coproducts
The product of A and B:
∀C
f
ÐÐ
g
11
f, g

A A × Bπ1
oo
π2
GG B
The coproduct of A and B:
∀C
A κ1
GG
f
PP
A + B
[f, g]
yy
Bκ2
oo
gll
Proposition: O is product in C iff O is coproduct in Cop.
Duality: products and coproducts
The product of A and B:
∀C
f
ÐÐ
g
11
f, g

A A × Bπ1
oo
π2
GG B
The coproduct of A and B:
∀C
A κ1
GG
f
PP
A + B
[f, g]
yy
Bκ2
oo
gll
Proposition: O is product in C iff O is coproduct in Cop.
Duality: products and coproducts
The product of A and B:
∀C
f
ÐÐ
g
11
f, g

A A × Bπ1
oo
π2
GG B
The coproduct of A and B:
∀C
A κ1
GG
f
PP
A + B
[f, g]
yy
Bκ2
oo
gll
Proposition: O is product in C iff O is coproduct in Cop.
Duality: initial and final objects
An object A in a category C is . . .
- initial if for any object B there exists a unique arrow
A
! GG B
- final if for any object B there exists a unique arrow
B
! GG A
Proposition: A is initial in C iff A is final in Cop.
Proposition: Initial and final objects are unique up-to
isomorphism.
Duality: initial and final objects
An object A in a category C is . . .
- initial if for any object B there exists a unique arrow
A
! GG B
- final if for any object B there exists a unique arrow
B
! GG A
Proposition: A is initial in C iff A is final in Cop.
Proposition: Initial and final objects are unique up-to
isomorphism.
Duality: initial and final objects
An object A in a category C is . . .
- initial if for any object B there exists a unique arrow
A
! GG B
- final if for any object B there exists a unique arrow
B
! GG A
Proposition: A is initial in C iff A is final in Cop.
Proposition: Initial and final objects are unique up-to
isomorphism.
Duality: initial and final objects
An object A in a category C is . . .
- initial if for any object B there exists a unique arrow
A
! GG B
- final if for any object B there exists a unique arrow
B
! GG A
Proposition: A is initial in C iff A is final in Cop.
Proposition: Initial and final objects are unique up-to
isomorphism.
Duality: initial and final objects
An object A in a category C is . . .
- initial if for any object B there exists a unique arrow
A
! GG B
- final if for any object B there exists a unique arrow
B
! GG A
Proposition: A is initial in C iff A is final in Cop.
Proposition: Initial and final objects are unique up-to
isomorphism.
Duality: initial and final objects
An object A in a category C is . . .
- initial if for any object B there exists a unique arrow
A
! GG B
- final if for any object B there exists a unique arrow
B
! GG A
Proposition: A is initial in C iff A is final in Cop.
Proposition: Initial and final objects are unique up-to
isomorphism.
Where coalgebra comes from
By duality. From algebra!
Classically, algebras are sets with operations.
Ex. (N, 0, succ), with 0 ∈ N and succ : N → N.
Equivalently,
1 + N
[zero, succ]

N
where 1 = {∗} and zero(∗) = 0.
Where coalgebra comes from
By duality. From algebra!
Classically, algebras are sets with operations.
Ex. (N, 0, succ), with 0 ∈ N and succ : N → N.
Equivalently,
1 + N
[zero, succ]

N
where 1 = {∗} and zero(∗) = 0.
Where coalgebra comes from
By duality. From algebra!
Classically, algebras are sets with operations.
Ex. (N, 0, succ), with 0 ∈ N and succ : N → N.
Equivalently,
1 + N
[zero, succ]

N
where 1 = {∗} and zero(∗) = 0.
Algebra
Classically, algebras are sets with operations.
Ex.
Prog × Prog
α

Prog
with α(P1, P2) = P1; P2.
Algebra, categorically
F(X)
α

X
where F is the type of the algebra.
Coalgebra, dually
X
α

F(X)
where F is the type of the coalgebra.
Example: streams
Streams are our favourite example of a coalgebra:
Nω
head, tail

N × Nω
where
head(σ) = σ(0)
tail(σ) = (σ(1), σ(2), σ(3), . . .)
for any stream σ = (σ(0), σ(1), σ(2), . . .) ∈ Nω.
3. How coalgebra works (its method in slogans)
• be precise about types
• ask what a system does rather than what it is
• functoriality
• interaction through homomorphisms
• aim for universality
Note that all these slogans are part of the categorical approach.
3. How coalgebra works (its method in slogans)
• be precise about types
• ask what a system does rather than what it is
• functoriality
• interaction through homomorphisms
• aim for universality
Note that all these slogans are part of the categorical approach.
Starting point: the system’s type
A coalgebra of type F is a pair (X, α) with
α : X → F(X)
For instance, non-deterministic transition systems:
X
α

X
α

X
α

X
α

Pf (A×X) Pf (X)A P(X)A 2 × P(X)A
Formally, the type F of a coalgebra/system is a functor.
The importance of knowing the system’s type
The type F of a coalgebra/system
α : X → F(X)
determines
- a canonical notion of system equivalence: bisimulation
- a canonical notion of minimization
- a canonical interpretation: final coalgebra semantics
- (a canonical logic)
Doing versus being
Doing  Being
Behaviour  Construction
Systems as black boxes (with internal states)
Behavioural specification
Doing versus being
Doing  Being
Behaviour  Construction
Systems as black boxes (with internal states)
Behavioural specification
Doing versus being
Doing  Being
Behaviour  Construction
Systems as black boxes (with internal states)
Behavioural specification
Doing versus being
Doing  Being
Behaviour  Construction
Systems as black boxes (with internal states)
Behavioural specification
Doing versus being
Doing  Being
Behaviour  Construction
Systems as black boxes (with internal states)
Behavioural specification
Example: the shuffle product of streams
Being:
(σ ⊗ τ) (n) =
n
k=0
n
k
· σ(k) · τ(n − k)
Doing:
σ ⊗ τ
σ(0) · τ(0)
GG (σ ⊗ τ) + (σ ⊗ τ )
Example: the shuffle product of streams
Being:
(σ ⊗ τ) (n) =
n
k=0
n
k
· σ(k) · τ(n − k)
Doing:
σ ⊗ τ
σ(0) · τ(0)
GG (σ ⊗ τ) + (σ ⊗ τ )
Example: the shuffle product of streams
Being:
(σ ⊗ τ) (n) =
n
k=0
n
k
· σ(k) · τ(n − k)
Doing:
σ ⊗ τ
σ(0) · τ(0)
GG (σ ⊗ τ) + (σ ⊗ τ )
Example: the Hamming numbers
Being:
The increasing stream h of all natural numbers that are divisible
by only 2, 3, or 5:
h = (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, . . . )
h(n) = ?
Doing:
h
1 GG (2 · h) (3 · h) (5 · h)
Example: the Hamming numbers
Being:
The increasing stream h of all natural numbers that are divisible
by only 2, 3, or 5:
h = (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, . . . )
h(n) = ?
Doing:
h
1 GG (2 · h) (3 · h) (5 · h)
Example: the Hamming numbers
Being:
The increasing stream h of all natural numbers that are divisible
by only 2, 3, or 5:
h = (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, . . . )
h(n) = ?
Doing:
h
1 GG (2 · h) (3 · h) (5 · h)
Example: the Hamming numbers
Being:
The increasing stream h of all natural numbers that are divisible
by only 2, 3, or 5:
h = (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, . . . )
h(n) = ?
Doing:
h
1 GG (2 · h) (3 · h) (5 · h)
Homomorphisms
X
α

h GG Y
β

F(X)
F(h)
GG F(Y)
. . . are for systems/coalgebras what functions are for sets.
. . . are behaviour preserving functions.
Functoriality
X
α

h GG Y
β

F(X)
F(h)
GG F(Y)
Note that for the definition of homomorphism,
the type F needs to be a functor:
F acts on sets: F(X), F(Y) and on functions: F(h)
Example of a homomorphism
X

h GG Y

O × X
id × h
GG O × Y
x0
a
GG x1
b
GG x2
a
GG x3
b
ww h GG y0
a
VV y1
b
xx
Minimization through (canonical) homomorphism.
Universality
Always aim at universal/canonical formulations.
For instance: final coalgebras
In final coalgebras: Being = Doing
⇒ coinduction (to be discussed shortly)
⇒ semantics
Universality
Always aim at universal/canonical formulations.
For instance: final coalgebras
In final coalgebras: Being = Doing
⇒ coinduction (to be discussed shortly)
⇒ semantics
Universality
Always aim at universal/canonical formulations.
For instance: final coalgebras
In final coalgebras: Being = Doing
⇒ coinduction (to be discussed shortly)
⇒ semantics
Universality
Always aim at universal/canonical formulations.
For instance: final coalgebras
In final coalgebras: Being = Doing
⇒ coinduction (to be discussed shortly)
⇒ semantics
Universality
Always aim at universal/canonical formulations.
For instance: final coalgebras
In final coalgebras: Being = Doing
⇒ coinduction (to be discussed shortly)
⇒ semantics
Universality
Always aim at universal/canonical formulations.
For instance: final coalgebras
In final coalgebras: Being = Doing
⇒ coinduction (to be discussed shortly)
⇒ semantics
Semantics by finality: streams
The final homomorphism into the set of streams:
X

∃! h GG Oω

O × X
id × h
GG O × Oω
maps any system X to its minimization: e.g.,
x0
a
GG x1
b
GG x2
a
GG x3
b
ww h GG (ab)ω
a
RR
(ba)ω
btt
x0, x2
 h GG (ab)ω x1, x3
 h GG (ba)ω
4. Duality: induction and coinduction
- initial algebra - final coalgebra
- congruence - bisimulation
- induction - coinduction
- least fixed point - greatest fixed point
Initial algebra
The natural numbers are an example of an initial algebra:
1 + N
[zero, succ]

GG 1 + S
β∀

N
∃ !
GG S
Note: any two homomorphisms from N to S are equal.
Note: id : N → N is a homomorphism.
Note: [zero, succ] : 1 + N ∼= N.
Initial algebra
The natural numbers are an example of an initial algebra:
1 + N
[zero, succ]

GG 1 + S
β∀

N
∃ !
GG S
Note: any two homomorphisms from N to S are equal.
Note: id : N → N is a homomorphism.
Note: [zero, succ] : 1 + N ∼= N.
Initial algebra
The natural numbers are an example of an initial algebra:
1 + N
[zero, succ]

GG 1 + S
β∀

N
∃ !
GG S
Note: any two homomorphisms from N to S are equal.
Note: id : N → N is a homomorphism.
Note: [zero, succ] : 1 + N ∼= N.
Initial algebra
The natural numbers are an example of an initial algebra:
1 + N
[zero, succ]

GG 1 + S
β∀

N
∃ !
GG S
Note: any two homomorphisms from N to S are equal.
Note: id : N → N is a homomorphism.
Note: [zero, succ] : 1 + N ∼= N.
Final coalgebra
Streams are an example of a final coalgebra:
S
β∀

∃ ! GG Nω
head, tail

N × S GG N × Nω
(Note: instead of N, we could have taken any set.)
Note: any two homomorphisms from S to Nω are equal.
Note: id : Nω → Nω is a homomorphism.
Note: head, tail : Nω ∼= N × Nω.
Final coalgebra
Streams are an example of a final coalgebra:
S
β∀

∃ ! GG Nω
head, tail

N × S GG N × Nω
(Note: instead of N, we could have taken any set.)
Note: any two homomorphisms from S to Nω are equal.
Note: id : Nω → Nω is a homomorphism.
Note: head, tail : Nω ∼= N × Nω.
Final coalgebra
Streams are an example of a final coalgebra:
S
β∀

∃ ! GG Nω
head, tail

N × S GG N × Nω
(Note: instead of N, we could have taken any set.)
Note: any two homomorphisms from S to Nω are equal.
Note: id : Nω → Nω is a homomorphism.
Note: head, tail : Nω ∼= N × Nω.
Final coalgebra
Streams are an example of a final coalgebra:
S
β∀

∃ ! GG Nω
head, tail

N × S GG N × Nω
(Note: instead of N, we could have taken any set.)
Note: any two homomorphisms from S to Nω are equal.
Note: id : Nω → Nω is a homomorphism.
Note: head, tail : Nω ∼= N × Nω.
Algebra and induction
Induction = definition and proof principle for algebras.
Ex. mathematical induction: for all P ⊆ N,
( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n)
(Other examples: transfinite, well-founded, tree, structural, etc.)
We show that induction is a property of initial algebras.
Algebra and induction
Induction = definition and proof principle for algebras.
Ex. mathematical induction: for all P ⊆ N,
( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n)
(Other examples: transfinite, well-founded, tree, structural, etc.)
We show that induction is a property of initial algebras.
Algebra and induction
Induction = definition and proof principle for algebras.
Ex. mathematical induction: for all P ⊆ N,
( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n)
(Other examples: transfinite, well-founded, tree, structural, etc.)
We show that induction is a property of initial algebras.
Algebra and induction
Induction = definition and proof principle for algebras.
Ex. mathematical induction: for all P ⊆ N,
( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n)
(Other examples: transfinite, well-founded, tree, structural, etc.)
We show that induction is a property of initial algebras.
Algebras and congruences (ex. natural numbers)
We call R ⊆ N × N a congruence if
(i) (0, 0) ∈ R and
(ii) (n, m) ∈ R ⇒ (succ(n), succ(m)) ∈ R
(Note: R is not required to be an equivalence relation.)
Equivalently, R ⊆ N × N is a congruence if
1 + N
[zero, succ]

1 + R
γ∃

oo GG 1 + N
[zero, succ]

N Rπ1
oo
π2
GG N
for some function γ : 1 + R → R.
Algebras and congruences (ex. natural numbers)
We call R ⊆ N × N a congruence if
(i) (0, 0) ∈ R and
(ii) (n, m) ∈ R ⇒ (succ(n), succ(m)) ∈ R
(Note: R is not required to be an equivalence relation.)
Equivalently, R ⊆ N × N is a congruence if
1 + N
[zero, succ]

1 + R
γ∃

oo GG 1 + N
[zero, succ]

N Rπ1
oo
π2
GG N
for some function γ : 1 + R → R.
Initial algebras and congruences
Theorem: induction proof principle
Every congruence R ⊆ N × N contains the diagonal:
∆ ⊆ R
where ∆ = {(n, n) | n ∈ N}.
Proof: Because (N, [zero, succ]) is an initial algebra,
1 + N
[zero, succ]

CC
1 + R
γ∃

oo GG 1 + N
[zero, succ]

ss
N
!
AA
Rπ1
oo
π2
GG N
!
uu
we have π1◦! = id = π2◦!, which implies !(n) = (n, n), all n ∈ N.
Initial algebras and congruences
Theorem: induction proof principle
Every congruence R ⊆ N × N contains the diagonal:
∆ ⊆ R
where ∆ = {(n, n) | n ∈ N}.
Proof: Because (N, [zero, succ]) is an initial algebra,
1 + N
[zero, succ]

CC
1 + R
γ∃

oo GG 1 + N
[zero, succ]

ss
N
!
AA
Rπ1
oo
π2
GG N
!
uu
we have π1◦! = id = π2◦!, which implies !(n) = (n, n), all n ∈ N.
Initial algebras and induction
Theorem: The following are equivalent:
1. For every congruence relation R ⊆ N × N,
∆ ⊆ R
2. For every predicate P ⊆ N,
( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n)
Proof: Exercise.
In other words: two equivalent formulations of induction!
Initial algebras and induction
Theorem: The following are equivalent:
1. For every congruence relation R ⊆ N × N,
∆ ⊆ R
2. For every predicate P ⊆ N,
( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n)
Proof: Exercise.
In other words: two equivalent formulations of induction!
Initial algebras and induction
Theorem: The following are equivalent:
1. For every congruence relation R ⊆ N × N,
∆ ⊆ R
2. For every predicate P ⊆ N,
( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n)
Proof: Exercise.
In other words: two equivalent formulations of induction!
Coalgebra and coinduction
Coinduction = definition and proof principle for coalgebras.
Coinduction is dual to induction, in a very precise way.
Categorically, coinduction is a property of final coalgebras.
Algorithmically, coinduction generalises Robin Milner’s
bisimulation proof method.
Coalgebra and coinduction
Coinduction = definition and proof principle for coalgebras.
Coinduction is dual to induction, in a very precise way.
Categorically, coinduction is a property of final coalgebras.
Algorithmically, coinduction generalises Robin Milner’s
bisimulation proof method.
Coalgebra and coinduction
Coinduction = definition and proof principle for coalgebras.
Coinduction is dual to induction, in a very precise way.
Categorically, coinduction is a property of final coalgebras.
Algorithmically, coinduction generalises Robin Milner’s
bisimulation proof method.
Coalgebra and coinduction
Coinduction = definition and proof principle for coalgebras.
Coinduction is dual to induction, in a very precise way.
Categorically, coinduction is a property of final coalgebras.
Algorithmically, coinduction generalises Robin Milner’s
bisimulation proof method.
Coalgebras and bisimulations (ex. streams)
We call R ⊆ Nω × Nω a bisimulation if, for all (σ, τ) ∈ R,
(i) head(σ) = head(τ) and
(ii) (tail(σ), tail(τ)) ∈ R
Equivalently, R ⊆ Nω × Nω is a bisimulation if
Nω
head, tail

R
γ∃

π1oo π2 GG Nω
head, tail

N × Nω N × Roo GG N × Nω
for some function γ : R → N × R.
Coalgebras and bisimulations (ex. streams)
We call R ⊆ Nω × Nω a bisimulation if, for all (σ, τ) ∈ R,
(i) head(σ) = head(τ) and
(ii) (tail(σ), tail(τ)) ∈ R
Equivalently, R ⊆ Nω × Nω is a bisimulation if
Nω
head, tail

R
γ∃

π1oo π2 GG Nω
head, tail

N × Nω N × Roo GG N × Nω
for some function γ : R → N × R.
Final coalgebras and bisimulations
Theorem: coinduction proof principle
Every bisimulation R ⊆ Nω × Nω is contained in the diagonal:
R ⊆ ∆
where ∆ = {(σ, σ) | σ ∈ Nω}.
Proof: Because (Nω, head, tail ) is a final coalgebra,
Nω
head, tail

R
γ∃

π1oo π2 GG Nω
head, tail

N × Nω N × Roo GG N × Nω
we have π1 = π2, which implies σ = τ, for all (σ, τ) ∈ Nω.
Final coalgebras and bisimulations
Theorem: coinduction proof principle
Every bisimulation R ⊆ Nω × Nω is contained in the diagonal:
R ⊆ ∆
where ∆ = {(σ, σ) | σ ∈ Nω}.
Proof: Because (Nω, head, tail ) is a final coalgebra,
Nω
head, tail

R
γ∃

π1oo π2 GG Nω
head, tail

N × Nω N × Roo GG N × Nω
we have π1 = π2, which implies σ = τ, for all (σ, τ) ∈ Nω.
Final coalgebras and coinduction
The following are equivalent:
1. For every bisimulation relation R ⊆ Nω × Nω,
R ⊆ ∆
2. ??
In other words: no obvious equivalent formulation of
coinduction!
Final coalgebras and coinduction
The following are equivalent:
1. For every bisimulation relation R ⊆ Nω × Nω,
R ⊆ ∆
2. ??
In other words: no obvious equivalent formulation of
coinduction!
Final coalgebras and coinduction
The following are equivalent:
1. For every bisimulation relation R ⊆ Nω × Nω,
R ⊆ ∆
2. ??
In other words: no obvious equivalent formulation of
coinduction!
Congruences and bisimulations: dual?
R ⊆ N × N is a congruence if
1 + N
[zero, succ]

1 + R
γ∃

oo GG 1 + N
[zero, succ]

N Rπ1
oo
π2
GG N
R ⊆ Nω × Nω is a bisimulation if
Nω
head, tail

R
γ∃

π1oo π2 GG Nω
head, tail

N × Nω N × Roo GG N × Nω
Congruences and bisimulations: dual?
R ⊆ S × T is an F-congruence if
F(S)
α

F(R)
γ∃

oo GG F(T)
β

S Rπ1
oo
π2
GG T
R ⊆ S × T is an F-bisimulation if
S
α

R
γ∃

π1oo π2 GG T
β

F(S) F(R)oo GG F(T)
Induction and coinduction: dual?
For every congruence relation R ⊆ N × N,
∆ ⊆ R
For every bisimulation relation R ⊆ Nω × Nω,
R ⊆ ∆
Induction and coinduction: dual?
For every congruence relation R on an initial algebra:
∆ ⊆ R
For every bisimulation relation R on a final coalgebra:
R ⊆ ∆
An aside: fixed points
Let (P, ≤) be a preorder and f : P → P a monotone map.
Classically, least fixed point induction is:
∀p ∈ P : f(p) ≤ p ⇒ µf ≤ p
Classically, greatest fixed point coinduction is:
∀p ∈ P : p ≤ f(p) ⇒ p ≤ νf
An aside: fixed points
Let (P, ≤) be a preorder and f : P → P a monotone map.
Classically, least fixed point induction is:
∀p ∈ P : f(p) ≤ p ⇒ µf ≤ p
Classically, greatest fixed point coinduction is:
∀p ∈ P : p ≤ f(p) ⇒ p ≤ νf
An aside: fixed points
Let (P, ≤) be a preorder and f : P → P a monotone map.
Classically, least fixed point induction is:
∀p ∈ P : f(p) ≤ p ⇒ µf ≤ p
Classically, greatest fixed point coinduction is:
∀p ∈ P : p ≤ f(p) ⇒ p ≤ νf
An aside: fixed points
Any preorder (P, ≤) is a category, with arrows:
p → q ≡ p ≤ q
Any monotone map is a functor:
p → q → f(p) → f(q)
Lfp induction and gfp coinduction become:
f(µf)

GG f(p)

µf GG p
p

GG νf

f(p) GG f(νf)
An aside: fixed points
Any preorder (P, ≤) is a category, with arrows:
p → q ≡ p ≤ q
Any monotone map is a functor:
p → q → f(p) → f(q)
Lfp induction and gfp coinduction become:
f(µf)

GG f(p)

µf GG p
p

GG νf

f(p) GG f(νf)
An aside: fixed points
Any preorder (P, ≤) is a category, with arrows:
p → q ≡ p ≤ q
Any monotone map is a functor:
p → q → f(p) → f(q)
Lfp induction and gfp coinduction become:
f(µf)

GG f(p)

µf GG p
p

GG νf

f(p) GG f(νf)
Fixed point (co)induction = initiality and finality
f(µf)

GG f(p)

µf GG p
p

GG νf

f(p) GG f(νf)
F(A)

GG F(S)

A
∃ !
GG S
S

∃ ! GG Z

F(S) GG F(Z)
Fixed point (co)induction = initiality and finality
f(µf)

GG f(p)

µf GG p
p

GG νf

f(p) GG f(νf)
F(A)

GG F(S)

A
∃ !
GG S
S

∃ ! GG Z

F(S) GG F(Z)
5. What coalgebra studies
• the behaviour of – often infinite, circular – systems
(their equivalence, minimization, synthesis)
• rather: the universal principles underlying this behaviour
• these days applied in many different scientific disciplines
5. What coalgebra studies
• the behaviour of – often infinite, circular – systems
(their equivalence, minimization, synthesis)
• rather: the universal principles underlying this behaviour
• these days applied in many different scientific disciplines
5. What coalgebra studies
• the behaviour of – often infinite, circular – systems
(their equivalence, minimization, synthesis)
• rather: the universal principles underlying this behaviour
• these days applied in many different scientific disciplines
5. What coalgebra studies
• the behaviour of – often infinite, circular – systems
(their equivalence, minimization, synthesis)
• rather: the universal principles underlying this behaviour
• these days applied in many different scientific disciplines
Example: dynamical systems
A dynamical system is:
set of states X and a transition function t : X → X
Notation for transitions:
x → y ≡ t(x) = y
Examples:
x GG y GG z

poo r GG s

q
dd
Example: systems with output
A system with output:
o, t : X → O × X
Notation: x
a GG y ≡ o(x) = a and t(x) = y.
x0
a
GG x1
b
GG x2
a
GG x3
b
ww
y0
a
VV y1
b
xx
Example: infinite data types
For instance, streams of natural numbers:
Nω
= {σ | σ : N → N }
The behaviour of streams:
(σ(0), σ(1), σ(2), . . .)
σ(0)
GG (σ(1), σ(2), σ(3), . . .)
where we call
σ(0): the initial value (= head)
σ = (σ(1), σ(2), σ(3), . . .): the derivative (= tail)
Example: streams
(1, 1, 1, . . .)
1 GG (1, 1, 1, . . .)
1 GG (1, 1, 1, . . .)
1 GG · · ·
(1, 1, 1, . . .)
1
Example: streams
(1, 1, 1, . . .)
1 GG (1, 1, 1, . . .)
1 GG (1, 1, 1, . . .)
1 GG · · ·
(1, 1, 1, . . .)
1
Example: streams
(1, 2, 3, . . .)
1 GG (2, 3, 4, . . .)
2 GG (3, 4, 5, . . .)
3 GG · · ·
(1, 2, 3, . . .)
1 GG (2, 3, 4, . . .) = (1, 2, 3, . . .) + (1, 1, 1, . . .)
(1, 2, 3, . . .)
1 GG
1

(1, 1, 1, . . .)
1
Example: streams
(1, 2, 3, . . .)
1 GG (2, 3, 4, . . .)
2 GG (3, 4, 5, . . .)
3 GG · · ·
(1, 2, 3, . . .)
1 GG (2, 3, 4, . . .) = (1, 2, 3, . . .) + (1, 1, 1, . . .)
(1, 2, 3, . . .)
1 GG
1

(1, 1, 1, . . .)
1
Example: streams
(1, 2, 3, . . .)
1 GG (2, 3, 4, . . .)
2 GG (3, 4, 5, . . .)
3 GG · · ·
(1, 2, 3, . . .)
1 GG (2, 3, 4, . . .) = (1, 2, 3, . . .) + (1, 1, 1, . . .)
(1, 2, 3, . . .)
1 GG
1

(1, 1, 1, . . .)
1
Example: non-well-founded sets
Historically important: Peter Aczel’s book.
x = {x} y = {y}
xDD y rr
x = {y} y = {z} z = {x, y}
x GG y GG z
yy
––
Example: non-well-founded sets
Historically important: Peter Aczel’s book.
x = {x} y = {y}
xDD y rr
x = {y} y = {z} z = {x, y}
x GG y GG z
yy
––
Example: non-well-founded sets
Historically important: Peter Aczel’s book.
x = {x} y = {y}
xDD y rr
x = {y} y = {z} z = {x, y}
x GG y GG z
yy
––
Example: automata
A deterministic automaton
GG x
b

a
GG z
b
zz
a
}}
y
b
yy
a
tt
• initial state: x • final states: y and z
• L(x) = {a, b}∗ a
Example: automata
A deterministic automaton
GG x
b

a
GG z
b
zz
a
}}
y
b
yy
a
tt
• initial state: x • final states: y and z
• L(x) = {a, b}∗ a
Example: automata
A deterministic automaton
GG x
b

a
GG z
b
zz
a
}}
y
b
yy
a
tt
• initial state: x • final states: y and z
• L(x) = {a, b}∗ a
All these examples: circular behaviour
GG x
b

a
GG z
b
zz
a
}}
y
b
yy
a
tt
y0
a
VV y1
b
xx
(1, 2, 3, . . .)
1 GG
1

(1, 1, 1, . . .)
1
Where coalgebra is used
• logic, set theory
• automata
• control theory
• data types
• dynamical systems
• games
• economy
• ecology
6. Discussion
• New way of thinking – give it time
• Extensive example: streams (Lecture two)
• Algebra and coalgebra (Lecture three and four)
- bisimulation up-to
- cf. CALCO
• Algorithms, tools (Lecture four)
- Cf. Hacking nondeterminism with induction and coinduction
Bonchi and Pous, Comm. ACM Vol. 58(2), 2015

Contenu connexe

En vedette

En vedette (13)

De qué tamaño es mi problema
De qué tamaño es mi problemaDe qué tamaño es mi problema
De qué tamaño es mi problema
 
Abro paréntesis, abro paréntesis, cierro parentesis, .
Abro paréntesis, abro paréntesis, cierro parentesis, .Abro paréntesis, abro paréntesis, cierro parentesis, .
Abro paréntesis, abro paréntesis, cierro parentesis, .
 
Máquinas que comen máquinas
Máquinas que comen máquinasMáquinas que comen máquinas
Máquinas que comen máquinas
 
Las máquinas que están en varios lugares
Las máquinas que están en varios lugaresLas máquinas que están en varios lugares
Las máquinas que están en varios lugares
 
Pocket Guide to Delivering Effective Presentations
Pocket Guide to Delivering Effective PresentationsPocket Guide to Delivering Effective Presentations
Pocket Guide to Delivering Effective Presentations
 
Revisión de problemas
Revisión de problemasRevisión de problemas
Revisión de problemas
 
Afnd, afnd e y er
Afnd, afnd e y erAfnd, afnd e y er
Afnd, afnd e y er
 
Las máquinas que computan
Las máquinas que computanLas máquinas que computan
Las máquinas que computan
 
Imran CV[1]
Imran CV[1]Imran CV[1]
Imran CV[1]
 
Afnd, afnd e y er
Afnd, afnd e y erAfnd, afnd e y er
Afnd, afnd e y er
 
1st international conference-2016-met institute of management, nashik
1st international conference-2016-met institute of management, nashik1st international conference-2016-met institute of management, nashik
1st international conference-2016-met institute of management, nashik
 
Jerarquias de Chomsky 2016-II
Jerarquias de Chomsky 2016-IIJerarquias de Chomsky 2016-II
Jerarquias de Chomsky 2016-II
 
Depende del contexto
Depende del contextoDepende del contexto
Depende del contexto
 

Similaire à Jan Rutten - Concrete coalgebra: an introduction by examples - Lecture 1

A gentle intruduction to category theory
A gentle intruduction to category theoryA gentle intruduction to category theory
A gentle intruduction to category theory
Jeff Jampa
 

Similaire à Jan Rutten - Concrete coalgebra: an introduction by examples - Lecture 1 (20)

Interdisciplinary.ppt
Interdisciplinary.pptInterdisciplinary.ppt
Interdisciplinary.ppt
 
Engage_with_Origami_Math
Engage_with_Origami_MathEngage_with_Origami_Math
Engage_with_Origami_Math
 
AI IMPORTANT QUESTION
AI IMPORTANT QUESTIONAI IMPORTANT QUESTION
AI IMPORTANT QUESTION
 
Julia: Multimethods for abstraction and performance
Julia: Multimethods for abstraction and performanceJulia: Multimethods for abstraction and performance
Julia: Multimethods for abstraction and performance
 
A Book of Abstract Algebra.pdf
A Book of Abstract Algebra.pdfA Book of Abstract Algebra.pdf
A Book of Abstract Algebra.pdf
 
A gentle intruduction to category theory
A gentle intruduction to category theoryA gentle intruduction to category theory
A gentle intruduction to category theory
 
NGSS Overview
NGSS OverviewNGSS Overview
NGSS Overview
 
Discrete Mathematics Lecture Notes
Discrete Mathematics Lecture NotesDiscrete Mathematics Lecture Notes
Discrete Mathematics Lecture Notes
 
A career in Mathematics
A career in MathematicsA career in Mathematics
A career in Mathematics
 
Math 9 (module 5)
Math 9 (module 5)Math 9 (module 5)
Math 9 (module 5)
 
Polygons
PolygonsPolygons
Polygons
 
How to write a journal and conference paper
How to write a journal and conference paperHow to write a journal and conference paper
How to write a journal and conference paper
 
Taksonomi bloom
Taksonomi bloomTaksonomi bloom
Taksonomi bloom
 
Quadrilaterals
QuadrilateralsQuadrilaterals
Quadrilaterals
 
Next Generation Science Standards (NGSS) Infographic Poster
Next Generation Science Standards (NGSS) Infographic PosterNext Generation Science Standards (NGSS) Infographic Poster
Next Generation Science Standards (NGSS) Infographic Poster
 
8 methematics
8   methematics8   methematics
8 methematics
 
Introducing grounded theory
Introducing grounded theoryIntroducing grounded theory
Introducing grounded theory
 
Course Design Best Practices
Course Design Best PracticesCourse Design Best Practices
Course Design Best Practices
 
Research 101: Academic Writing Style .
Research 101: Academic Writing Style   .Research 101: Academic Writing Style   .
Research 101: Academic Writing Style .
 
302887567-Grade-9-Math-Module5-Quadrilaterals.pdf
302887567-Grade-9-Math-Module5-Quadrilaterals.pdf302887567-Grade-9-Math-Module5-Quadrilaterals.pdf
302887567-Grade-9-Math-Module5-Quadrilaterals.pdf
 

Dernier

Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
Sérgio Sacani
 
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
ssuser79fe74
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
PirithiRaju
 

Dernier (20)

Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
CELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdfCELL -Structural and Functional unit of life.pdf
CELL -Structural and Functional unit of life.pdf
 
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
Chemical Tests; flame test, positive and negative ions test Edexcel Internati...
 
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
Vip profile Call Girls In Lonavala 9748763073 For Genuine Sex Service At Just...
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
Zoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdfZoology 4th semester series (krishna).pdf
Zoology 4th semester series (krishna).pdf
 
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICESAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
American Type Culture Collection (ATCC).pptx
American Type Culture Collection (ATCC).pptxAmerican Type Culture Collection (ATCC).pptx
American Type Culture Collection (ATCC).pptx
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
High Profile 🔝 8250077686 📞 Call Girls Service in GTB Nagar🍑
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
High Class Escorts in Hyderabad ₹7.5k Pick Up & Drop With Cash Payment 969456...
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 22 (Delhi) Call Girl Service
 
Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 60009654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
9654467111 Call Girls In Raj Nagar Delhi Short 1500 Night 6000
 
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdfPests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
Pests of cotton_Borer_Pests_Binomics_Dr.UPR.pdf
 

Jan Rutten - Concrete coalgebra: an introduction by examples - Lecture 1

  • 1. Lecture one: The Method of Coalgebra – in some detail – Jan Rutten CWI Amsterdam & Radboud University Nijmegen IPM, Tehran - 13 January 2016
  • 2. Acknowledgements My esteemed co-authors - Marcello Bonsangue (Leiden, CWI) - Helle Hansen (Delft) - Alexandra Silva (City College London) - Milad Niqui - Clemens Kupke (Glasgow) - Prakash Panangaden (McGill, Montreal) - Filippo Bonchi (ENS, Lyon) - Joost Winter (Warsaw), Jurriaan Rot (ENS, Lyon) - and many others. Samson Abramsky (Oxford) Damien Pous (ENS, Lyon)
  • 3. Acknowledgements My esteemed co-authors - Marcello Bonsangue (Leiden, CWI) - Helle Hansen (Delft) - Alexandra Silva (City College London) - Milad Niqui - Clemens Kupke (Glasgow) - Prakash Panangaden (McGill, Montreal) - Filippo Bonchi (ENS, Lyon) - Joost Winter (Warsaw), Jurriaan Rot (ENS, Lyon) - and many others. Samson Abramsky (Oxford) Damien Pous (ENS, Lyon)
  • 4. Overview of todays lectures Lecture one: The method of coalgebra Lecture two: A coinductive calculus of streams Lecture three: Automata and the algebra-coalgebra duality Lecture four: Coalgebraic up-to techniques
  • 5. Overview of Lecture one 1. Category theory (where coalgebra comes from) 2. Duality (where coalgebra comes from) 3. How coalgebra works (the method in slogans) 4. Duality: induction and coinduction 5. What coalgebra studies (its subject) 6. Discussion
  • 6. 1. Category theory (where coalgebra comes from)
  • 7. Why categories? From Samson Abramsky’s tutorial: Categories, why and how? (Dagstuhl, January 2015)
  • 8. Why categories? For logicians: gives a syntax-independent view of the fundamental structures of logic, opens up new kinds of models and interpretations. For philosophers: a fresh approach to structuralist foundations of mathematics and science; an alternative to the traditional focus on set theory. For computer scientists: gives a precise handle on abstraction, representation-independence, genericity and more. Gives the fundamental mathematical structures underpinning programming concepts.
  • 9. Why categories? For mathematicians: organizes your previous mathematical experience in a new and powerful way, reveals new connections and structure, allows you to “think bigger thoughts”. For physicists: new ways of formulating physical theories in a structural form. Recent applications to Quantum Information and Computation. For economists and game theorists: new tools, bringing complex phenomena into the scope of formalisation.
  • 10. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 11. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 12. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 13. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 14. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 15. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 16. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 17. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 18. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 19. Category Theory in 10 Slogans 1. Always ask: what are the types? 2. Think in terms of arrows rather than elements. 3. Ask what mathematical structures do, not what they are. 4. Categories as mathematical contexts. 5. Categories as mathematical structures. 6. Make definitions and constructions as general as possible. 7. Functoriality! 8. Naturality! 9. Universality! 10. Adjoints are everywhere.
  • 20. Categories: basic definitions A category C consists of - Objects A, B, C, . . . - Morphisms/arrows: for each pair of objects A, B, a set of morphisms C(A, B) with domain A and codomain B - Composition of morphisms: g ◦ f: A g ◦ f TT f GG B g GG C - Axioms: h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
  • 21. Categories: basic definitions A category C consists of - Objects A, B, C, . . . - Morphisms/arrows: for each pair of objects A, B, a set of morphisms C(A, B) with domain A and codomain B - Composition of morphisms: g ◦ f: A g ◦ f TT f GG B g GG C - Axioms: h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
  • 22. Categories: basic definitions A category C consists of - Objects A, B, C, . . . - Morphisms/arrows: for each pair of objects A, B, a set of morphisms C(A, B) with domain A and codomain B - Composition of morphisms: g ◦ f: A g ◦ f TT f GG B g GG C - Axioms: h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
  • 23. Categories: basic definitions A category C consists of - Objects A, B, C, . . . - Morphisms/arrows: for each pair of objects A, B, a set of morphisms C(A, B) with domain A and codomain B - Composition of morphisms: g ◦ f: A g ◦ f TT f GG B g GG C - Axioms: h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
  • 24. Categories: basic definitions A category C consists of - Objects A, B, C, . . . - Morphisms/arrows: for each pair of objects A, B, a set of morphisms C(A, B) with domain A and codomain B - Composition of morphisms: g ◦ f: A g ◦ f TT f GG B g GG C - Axioms: h ◦ (g ◦ f) = (h ◦ g) ◦ f f ◦ id = f = id ◦ f
  • 25. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 26. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 27. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 28. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 29. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 30. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 31. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 32. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 33. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 34. Categories: examples • Any kind of mathematical structure, together with structure preserving functions, forms a category. E.g. - sets and functions - groups and group homomorphisms - monoids and monoid homomorphisms - vector spaces over a field k, and linear maps - topological spaces and continuous functions - partially ordered sets and monotone functions • Monoids are one-object categories • algebras, and algebra homomorphisms • coalgebras, and coalgebra homomorphisms
  • 35. Arrows rather than elements A function f : X → Y (between sets) is: - injective if ∀x, y ∈ X, f(x) = f(y) ⇒ x = y - surjective if ∀y ∈ Y, ∃x ∈ X, f(x) = y - monic if ∀g, h, f ◦ g = f ◦ h ⇒ g = h - epic if ∀g, h, g ◦ f = h ◦ f ⇒ g = h Proposition • m is injective iff m is monic. • e is surjective iff e is epic.
  • 36. Arrows rather than elements A function f : X → Y (between sets) is: - injective if ∀x, y ∈ X, f(x) = f(y) ⇒ x = y - surjective if ∀y ∈ Y, ∃x ∈ X, f(x) = y - monic if ∀g, h, f ◦ g = f ◦ h ⇒ g = h - epic if ∀g, h, g ◦ f = h ◦ f ⇒ g = h Proposition • m is injective iff m is monic. • e is surjective iff e is epic.
  • 37. Arrows rather than elements A function f : X → Y (between sets) is: - injective if ∀x, y ∈ X, f(x) = f(y) ⇒ x = y - surjective if ∀y ∈ Y, ∃x ∈ X, f(x) = y - monic if ∀g, h, f ◦ g = f ◦ h ⇒ g = h - epic if ∀g, h, g ◦ f = h ◦ f ⇒ g = h Proposition • m is injective iff m is monic. • e is surjective iff e is epic.
  • 38. Arrows rather than elements A function f : X → Y (between sets) is: - injective if ∀x, y ∈ X, f(x) = f(y) ⇒ x = y - surjective if ∀y ∈ Y, ∃x ∈ X, f(x) = y - monic if ∀g, h, f ◦ g = f ◦ h ⇒ g = h - epic if ∀g, h, g ◦ f = h ◦ f ⇒ g = h Proposition • m is injective iff m is monic. • e is surjective iff e is epic.
  • 39. Arrows rather than elements A function f : X → Y (between sets) is: - injective if ∀x, y ∈ X, f(x) = f(y) ⇒ x = y - surjective if ∀y ∈ Y, ∃x ∈ X, f(x) = y - monic if ∀g, h, f ◦ g = f ◦ h ⇒ g = h - epic if ∀g, h, g ◦ f = h ◦ f ⇒ g = h Proposition • m is injective iff m is monic. • e is surjective iff e is epic.
  • 40. Arrows rather than elements A function f : X → Y (between sets) is: - injective if ∀x, y ∈ X, f(x) = f(y) ⇒ x = y - surjective if ∀y ∈ Y, ∃x ∈ X, f(x) = y - monic if ∀g, h, f ◦ g = f ◦ h ⇒ g = h - epic if ∀g, h, g ◦ f = h ◦ f ⇒ g = h Proposition • m is injective iff m is monic. • e is surjective iff e is epic.
  • 41. Arrows rather than elements A function f : X → Y (between sets) is: - injective if ∀x, y ∈ X, f(x) = f(y) ⇒ x = y - surjective if ∀y ∈ Y, ∃x ∈ X, f(x) = y - monic if ∀g, h, f ◦ g = f ◦ h ⇒ g = h - epic if ∀g, h, g ◦ f = h ◦ f ⇒ g = h Proposition • m is injective iff m is monic. • e is surjective iff e is epic.
  • 42. Arrows rather than elements A function f : X → Y (between sets) is: - injective if ∀x, y ∈ X, f(x) = f(y) ⇒ x = y - surjective if ∀y ∈ Y, ∃x ∈ X, f(x) = y - monic if ∀g, h, f ◦ g = f ◦ h ⇒ g = h - epic if ∀g, h, g ◦ f = h ◦ f ⇒ g = h Proposition • m is injective iff m is monic. • e is surjective iff e is epic.
  • 43. Arrows rather than elements Defining the Cartesian product . . . - with elements: A × B = { a, b | a ∈ A, b ∈ B } where a, b = {{a, b}, b} - with arrows (expressing a universal property): ∀C f ÐÐ g 11 f, g A A × Bπ1 oo π2 GG B
  • 44. Arrows rather than elements Defining the Cartesian product . . . - with elements: A × B = { a, b | a ∈ A, b ∈ B } where a, b = {{a, b}, b} - with arrows (expressing a universal property): ∀C f ÐÐ g 11 f, g A A × Bπ1 oo π2 GG B
  • 45. Arrows rather than elements Defining the Cartesian product . . . - with elements: A × B = { a, b | a ∈ A, b ∈ B } where a, b = {{a, b}, b} - with arrows (expressing a universal property): ∀C f ÐÐ g 11 f, g A A × Bπ1 oo π2 GG B
  • 46. 2. Duality (where coalgebra comes from) An additional slogan for categories: duality is omnipresent - epi - mono - product - sum - initial object - final object - algebra - coalgebra
  • 47. 2. Duality (where coalgebra comes from) An additional slogan for categories: duality is omnipresent - epi - mono - product - sum - initial object - final object - algebra - coalgebra
  • 48. Duality: monos and epis - f is monic: ∀g, h, f ◦ g = f ◦ h ⇒ g = h • g 99 h UU • f GG • - f is epic: ∀g, h, g ◦ f = h ◦ f ⇒ g = h • • h gg g ww • foo Proposition: f is monic in C iff f is epic in Cop.
  • 49. Duality: monos and epis - f is monic: ∀g, h, f ◦ g = f ◦ h ⇒ g = h • g 99 h UU • f GG • - f is epic: ∀g, h, g ◦ f = h ◦ f ⇒ g = h • • h gg g ww • foo Proposition: f is monic in C iff f is epic in Cop.
  • 50. Duality: monos and epis - f is monic: ∀g, h, f ◦ g = f ◦ h ⇒ g = h • g 99 h UU • f GG • - f is epic: ∀g, h, g ◦ f = h ◦ f ⇒ g = h • • h gg g ww • foo Proposition: f is monic in C iff f is epic in Cop.
  • 51. Duality: monos and epis - f is monic: ∀g, h, f ◦ g = f ◦ h ⇒ g = h • g 99 h UU • f GG • - f is epic: ∀g, h, g ◦ f = h ◦ f ⇒ g = h • • h gg g ww • foo Proposition: f is monic in C iff f is epic in Cop.
  • 52. Duality: products and coproducts The product of A and B: ∀C f ÐÐ g 11 f, g A A × Bπ1 oo π2 GG B The coproduct of A and B: ∀C A κ1 GG f PP A + B [f, g] yy Bκ2 oo gll Proposition: O is product in C iff O is coproduct in Cop.
  • 53. Duality: products and coproducts The product of A and B: ∀C f ÐÐ g 11 f, g A A × Bπ1 oo π2 GG B The coproduct of A and B: ∀C A κ1 GG f PP A + B [f, g] yy Bκ2 oo gll Proposition: O is product in C iff O is coproduct in Cop.
  • 54. Duality: products and coproducts The product of A and B: ∀C f ÐÐ g 11 f, g A A × Bπ1 oo π2 GG B The coproduct of A and B: ∀C A κ1 GG f PP A + B [f, g] yy Bκ2 oo gll Proposition: O is product in C iff O is coproduct in Cop.
  • 55. Duality: products and coproducts The product of A and B: ∀C f ÐÐ g 11 f, g A A × Bπ1 oo π2 GG B The coproduct of A and B: ∀C A κ1 GG f PP A + B [f, g] yy Bκ2 oo gll Proposition: O is product in C iff O is coproduct in Cop.
  • 56. Duality: initial and final objects An object A in a category C is . . . - initial if for any object B there exists a unique arrow A ! GG B - final if for any object B there exists a unique arrow B ! GG A Proposition: A is initial in C iff A is final in Cop. Proposition: Initial and final objects are unique up-to isomorphism.
  • 57. Duality: initial and final objects An object A in a category C is . . . - initial if for any object B there exists a unique arrow A ! GG B - final if for any object B there exists a unique arrow B ! GG A Proposition: A is initial in C iff A is final in Cop. Proposition: Initial and final objects are unique up-to isomorphism.
  • 58. Duality: initial and final objects An object A in a category C is . . . - initial if for any object B there exists a unique arrow A ! GG B - final if for any object B there exists a unique arrow B ! GG A Proposition: A is initial in C iff A is final in Cop. Proposition: Initial and final objects are unique up-to isomorphism.
  • 59. Duality: initial and final objects An object A in a category C is . . . - initial if for any object B there exists a unique arrow A ! GG B - final if for any object B there exists a unique arrow B ! GG A Proposition: A is initial in C iff A is final in Cop. Proposition: Initial and final objects are unique up-to isomorphism.
  • 60. Duality: initial and final objects An object A in a category C is . . . - initial if for any object B there exists a unique arrow A ! GG B - final if for any object B there exists a unique arrow B ! GG A Proposition: A is initial in C iff A is final in Cop. Proposition: Initial and final objects are unique up-to isomorphism.
  • 61. Duality: initial and final objects An object A in a category C is . . . - initial if for any object B there exists a unique arrow A ! GG B - final if for any object B there exists a unique arrow B ! GG A Proposition: A is initial in C iff A is final in Cop. Proposition: Initial and final objects are unique up-to isomorphism.
  • 62. Where coalgebra comes from By duality. From algebra! Classically, algebras are sets with operations. Ex. (N, 0, succ), with 0 ∈ N and succ : N → N. Equivalently, 1 + N [zero, succ] N where 1 = {∗} and zero(∗) = 0.
  • 63. Where coalgebra comes from By duality. From algebra! Classically, algebras are sets with operations. Ex. (N, 0, succ), with 0 ∈ N and succ : N → N. Equivalently, 1 + N [zero, succ] N where 1 = {∗} and zero(∗) = 0.
  • 64. Where coalgebra comes from By duality. From algebra! Classically, algebras are sets with operations. Ex. (N, 0, succ), with 0 ∈ N and succ : N → N. Equivalently, 1 + N [zero, succ] N where 1 = {∗} and zero(∗) = 0.
  • 65. Algebra Classically, algebras are sets with operations. Ex. Prog × Prog α Prog with α(P1, P2) = P1; P2.
  • 66. Algebra, categorically F(X) α X where F is the type of the algebra.
  • 67. Coalgebra, dually X α F(X) where F is the type of the coalgebra.
  • 68. Example: streams Streams are our favourite example of a coalgebra: Nω head, tail N × Nω where head(σ) = σ(0) tail(σ) = (σ(1), σ(2), σ(3), . . .) for any stream σ = (σ(0), σ(1), σ(2), . . .) ∈ Nω.
  • 69. 3. How coalgebra works (its method in slogans) • be precise about types • ask what a system does rather than what it is • functoriality • interaction through homomorphisms • aim for universality Note that all these slogans are part of the categorical approach.
  • 70. 3. How coalgebra works (its method in slogans) • be precise about types • ask what a system does rather than what it is • functoriality • interaction through homomorphisms • aim for universality Note that all these slogans are part of the categorical approach.
  • 71. Starting point: the system’s type A coalgebra of type F is a pair (X, α) with α : X → F(X) For instance, non-deterministic transition systems: X α X α X α X α Pf (A×X) Pf (X)A P(X)A 2 × P(X)A Formally, the type F of a coalgebra/system is a functor.
  • 72. The importance of knowing the system’s type The type F of a coalgebra/system α : X → F(X) determines - a canonical notion of system equivalence: bisimulation - a canonical notion of minimization - a canonical interpretation: final coalgebra semantics - (a canonical logic)
  • 73. Doing versus being Doing Being Behaviour Construction Systems as black boxes (with internal states) Behavioural specification
  • 74. Doing versus being Doing Being Behaviour Construction Systems as black boxes (with internal states) Behavioural specification
  • 75. Doing versus being Doing Being Behaviour Construction Systems as black boxes (with internal states) Behavioural specification
  • 76. Doing versus being Doing Being Behaviour Construction Systems as black boxes (with internal states) Behavioural specification
  • 77. Doing versus being Doing Being Behaviour Construction Systems as black boxes (with internal states) Behavioural specification
  • 78. Example: the shuffle product of streams Being: (σ ⊗ τ) (n) = n k=0 n k · σ(k) · τ(n − k) Doing: σ ⊗ τ σ(0) · τ(0) GG (σ ⊗ τ) + (σ ⊗ τ )
  • 79. Example: the shuffle product of streams Being: (σ ⊗ τ) (n) = n k=0 n k · σ(k) · τ(n − k) Doing: σ ⊗ τ σ(0) · τ(0) GG (σ ⊗ τ) + (σ ⊗ τ )
  • 80. Example: the shuffle product of streams Being: (σ ⊗ τ) (n) = n k=0 n k · σ(k) · τ(n − k) Doing: σ ⊗ τ σ(0) · τ(0) GG (σ ⊗ τ) + (σ ⊗ τ )
  • 81. Example: the Hamming numbers Being: The increasing stream h of all natural numbers that are divisible by only 2, 3, or 5: h = (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, . . . ) h(n) = ? Doing: h 1 GG (2 · h) (3 · h) (5 · h)
  • 82. Example: the Hamming numbers Being: The increasing stream h of all natural numbers that are divisible by only 2, 3, or 5: h = (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, . . . ) h(n) = ? Doing: h 1 GG (2 · h) (3 · h) (5 · h)
  • 83. Example: the Hamming numbers Being: The increasing stream h of all natural numbers that are divisible by only 2, 3, or 5: h = (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, . . . ) h(n) = ? Doing: h 1 GG (2 · h) (3 · h) (5 · h)
  • 84. Example: the Hamming numbers Being: The increasing stream h of all natural numbers that are divisible by only 2, 3, or 5: h = (1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, . . . ) h(n) = ? Doing: h 1 GG (2 · h) (3 · h) (5 · h)
  • 85. Homomorphisms X α h GG Y β F(X) F(h) GG F(Y) . . . are for systems/coalgebras what functions are for sets. . . . are behaviour preserving functions.
  • 86. Functoriality X α h GG Y β F(X) F(h) GG F(Y) Note that for the definition of homomorphism, the type F needs to be a functor: F acts on sets: F(X), F(Y) and on functions: F(h)
  • 87. Example of a homomorphism X h GG Y O × X id × h GG O × Y x0 a GG x1 b GG x2 a GG x3 b ww h GG y0 a VV y1 b xx Minimization through (canonical) homomorphism.
  • 88. Universality Always aim at universal/canonical formulations. For instance: final coalgebras In final coalgebras: Being = Doing ⇒ coinduction (to be discussed shortly) ⇒ semantics
  • 89. Universality Always aim at universal/canonical formulations. For instance: final coalgebras In final coalgebras: Being = Doing ⇒ coinduction (to be discussed shortly) ⇒ semantics
  • 90. Universality Always aim at universal/canonical formulations. For instance: final coalgebras In final coalgebras: Being = Doing ⇒ coinduction (to be discussed shortly) ⇒ semantics
  • 91. Universality Always aim at universal/canonical formulations. For instance: final coalgebras In final coalgebras: Being = Doing ⇒ coinduction (to be discussed shortly) ⇒ semantics
  • 92. Universality Always aim at universal/canonical formulations. For instance: final coalgebras In final coalgebras: Being = Doing ⇒ coinduction (to be discussed shortly) ⇒ semantics
  • 93. Universality Always aim at universal/canonical formulations. For instance: final coalgebras In final coalgebras: Being = Doing ⇒ coinduction (to be discussed shortly) ⇒ semantics
  • 94. Semantics by finality: streams The final homomorphism into the set of streams: X ∃! h GG Oω O × X id × h GG O × Oω maps any system X to its minimization: e.g., x0 a GG x1 b GG x2 a GG x3 b ww h GG (ab)ω a RR (ba)ω btt x0, x2 h GG (ab)ω x1, x3 h GG (ba)ω
  • 95. 4. Duality: induction and coinduction - initial algebra - final coalgebra - congruence - bisimulation - induction - coinduction - least fixed point - greatest fixed point
  • 96. Initial algebra The natural numbers are an example of an initial algebra: 1 + N [zero, succ] GG 1 + S β∀ N ∃ ! GG S Note: any two homomorphisms from N to S are equal. Note: id : N → N is a homomorphism. Note: [zero, succ] : 1 + N ∼= N.
  • 97. Initial algebra The natural numbers are an example of an initial algebra: 1 + N [zero, succ] GG 1 + S β∀ N ∃ ! GG S Note: any two homomorphisms from N to S are equal. Note: id : N → N is a homomorphism. Note: [zero, succ] : 1 + N ∼= N.
  • 98. Initial algebra The natural numbers are an example of an initial algebra: 1 + N [zero, succ] GG 1 + S β∀ N ∃ ! GG S Note: any two homomorphisms from N to S are equal. Note: id : N → N is a homomorphism. Note: [zero, succ] : 1 + N ∼= N.
  • 99. Initial algebra The natural numbers are an example of an initial algebra: 1 + N [zero, succ] GG 1 + S β∀ N ∃ ! GG S Note: any two homomorphisms from N to S are equal. Note: id : N → N is a homomorphism. Note: [zero, succ] : 1 + N ∼= N.
  • 100. Final coalgebra Streams are an example of a final coalgebra: S β∀ ∃ ! GG Nω head, tail N × S GG N × Nω (Note: instead of N, we could have taken any set.) Note: any two homomorphisms from S to Nω are equal. Note: id : Nω → Nω is a homomorphism. Note: head, tail : Nω ∼= N × Nω.
  • 101. Final coalgebra Streams are an example of a final coalgebra: S β∀ ∃ ! GG Nω head, tail N × S GG N × Nω (Note: instead of N, we could have taken any set.) Note: any two homomorphisms from S to Nω are equal. Note: id : Nω → Nω is a homomorphism. Note: head, tail : Nω ∼= N × Nω.
  • 102. Final coalgebra Streams are an example of a final coalgebra: S β∀ ∃ ! GG Nω head, tail N × S GG N × Nω (Note: instead of N, we could have taken any set.) Note: any two homomorphisms from S to Nω are equal. Note: id : Nω → Nω is a homomorphism. Note: head, tail : Nω ∼= N × Nω.
  • 103. Final coalgebra Streams are an example of a final coalgebra: S β∀ ∃ ! GG Nω head, tail N × S GG N × Nω (Note: instead of N, we could have taken any set.) Note: any two homomorphisms from S to Nω are equal. Note: id : Nω → Nω is a homomorphism. Note: head, tail : Nω ∼= N × Nω.
  • 104. Algebra and induction Induction = definition and proof principle for algebras. Ex. mathematical induction: for all P ⊆ N, ( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n) (Other examples: transfinite, well-founded, tree, structural, etc.) We show that induction is a property of initial algebras.
  • 105. Algebra and induction Induction = definition and proof principle for algebras. Ex. mathematical induction: for all P ⊆ N, ( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n) (Other examples: transfinite, well-founded, tree, structural, etc.) We show that induction is a property of initial algebras.
  • 106. Algebra and induction Induction = definition and proof principle for algebras. Ex. mathematical induction: for all P ⊆ N, ( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n) (Other examples: transfinite, well-founded, tree, structural, etc.) We show that induction is a property of initial algebras.
  • 107. Algebra and induction Induction = definition and proof principle for algebras. Ex. mathematical induction: for all P ⊆ N, ( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n) (Other examples: transfinite, well-founded, tree, structural, etc.) We show that induction is a property of initial algebras.
  • 108. Algebras and congruences (ex. natural numbers) We call R ⊆ N × N a congruence if (i) (0, 0) ∈ R and (ii) (n, m) ∈ R ⇒ (succ(n), succ(m)) ∈ R (Note: R is not required to be an equivalence relation.) Equivalently, R ⊆ N × N is a congruence if 1 + N [zero, succ] 1 + R γ∃ oo GG 1 + N [zero, succ] N Rπ1 oo π2 GG N for some function γ : 1 + R → R.
  • 109. Algebras and congruences (ex. natural numbers) We call R ⊆ N × N a congruence if (i) (0, 0) ∈ R and (ii) (n, m) ∈ R ⇒ (succ(n), succ(m)) ∈ R (Note: R is not required to be an equivalence relation.) Equivalently, R ⊆ N × N is a congruence if 1 + N [zero, succ] 1 + R γ∃ oo GG 1 + N [zero, succ] N Rπ1 oo π2 GG N for some function γ : 1 + R → R.
  • 110. Initial algebras and congruences Theorem: induction proof principle Every congruence R ⊆ N × N contains the diagonal: ∆ ⊆ R where ∆ = {(n, n) | n ∈ N}. Proof: Because (N, [zero, succ]) is an initial algebra, 1 + N [zero, succ] CC 1 + R γ∃ oo GG 1 + N [zero, succ] ss N ! AA Rπ1 oo π2 GG N ! uu we have π1◦! = id = π2◦!, which implies !(n) = (n, n), all n ∈ N.
  • 111. Initial algebras and congruences Theorem: induction proof principle Every congruence R ⊆ N × N contains the diagonal: ∆ ⊆ R where ∆ = {(n, n) | n ∈ N}. Proof: Because (N, [zero, succ]) is an initial algebra, 1 + N [zero, succ] CC 1 + R γ∃ oo GG 1 + N [zero, succ] ss N ! AA Rπ1 oo π2 GG N ! uu we have π1◦! = id = π2◦!, which implies !(n) = (n, n), all n ∈ N.
  • 112. Initial algebras and induction Theorem: The following are equivalent: 1. For every congruence relation R ⊆ N × N, ∆ ⊆ R 2. For every predicate P ⊆ N, ( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n) Proof: Exercise. In other words: two equivalent formulations of induction!
  • 113. Initial algebras and induction Theorem: The following are equivalent: 1. For every congruence relation R ⊆ N × N, ∆ ⊆ R 2. For every predicate P ⊆ N, ( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n) Proof: Exercise. In other words: two equivalent formulations of induction!
  • 114. Initial algebras and induction Theorem: The following are equivalent: 1. For every congruence relation R ⊆ N × N, ∆ ⊆ R 2. For every predicate P ⊆ N, ( P(0) and (∀n : P(n) ⇒ P(succ(n))) ) ⇒ ∀n : P(n) Proof: Exercise. In other words: two equivalent formulations of induction!
  • 115. Coalgebra and coinduction Coinduction = definition and proof principle for coalgebras. Coinduction is dual to induction, in a very precise way. Categorically, coinduction is a property of final coalgebras. Algorithmically, coinduction generalises Robin Milner’s bisimulation proof method.
  • 116. Coalgebra and coinduction Coinduction = definition and proof principle for coalgebras. Coinduction is dual to induction, in a very precise way. Categorically, coinduction is a property of final coalgebras. Algorithmically, coinduction generalises Robin Milner’s bisimulation proof method.
  • 117. Coalgebra and coinduction Coinduction = definition and proof principle for coalgebras. Coinduction is dual to induction, in a very precise way. Categorically, coinduction is a property of final coalgebras. Algorithmically, coinduction generalises Robin Milner’s bisimulation proof method.
  • 118. Coalgebra and coinduction Coinduction = definition and proof principle for coalgebras. Coinduction is dual to induction, in a very precise way. Categorically, coinduction is a property of final coalgebras. Algorithmically, coinduction generalises Robin Milner’s bisimulation proof method.
  • 119. Coalgebras and bisimulations (ex. streams) We call R ⊆ Nω × Nω a bisimulation if, for all (σ, τ) ∈ R, (i) head(σ) = head(τ) and (ii) (tail(σ), tail(τ)) ∈ R Equivalently, R ⊆ Nω × Nω is a bisimulation if Nω head, tail R γ∃ π1oo π2 GG Nω head, tail N × Nω N × Roo GG N × Nω for some function γ : R → N × R.
  • 120. Coalgebras and bisimulations (ex. streams) We call R ⊆ Nω × Nω a bisimulation if, for all (σ, τ) ∈ R, (i) head(σ) = head(τ) and (ii) (tail(σ), tail(τ)) ∈ R Equivalently, R ⊆ Nω × Nω is a bisimulation if Nω head, tail R γ∃ π1oo π2 GG Nω head, tail N × Nω N × Roo GG N × Nω for some function γ : R → N × R.
  • 121. Final coalgebras and bisimulations Theorem: coinduction proof principle Every bisimulation R ⊆ Nω × Nω is contained in the diagonal: R ⊆ ∆ where ∆ = {(σ, σ) | σ ∈ Nω}. Proof: Because (Nω, head, tail ) is a final coalgebra, Nω head, tail R γ∃ π1oo π2 GG Nω head, tail N × Nω N × Roo GG N × Nω we have π1 = π2, which implies σ = τ, for all (σ, τ) ∈ Nω.
  • 122. Final coalgebras and bisimulations Theorem: coinduction proof principle Every bisimulation R ⊆ Nω × Nω is contained in the diagonal: R ⊆ ∆ where ∆ = {(σ, σ) | σ ∈ Nω}. Proof: Because (Nω, head, tail ) is a final coalgebra, Nω head, tail R γ∃ π1oo π2 GG Nω head, tail N × Nω N × Roo GG N × Nω we have π1 = π2, which implies σ = τ, for all (σ, τ) ∈ Nω.
  • 123. Final coalgebras and coinduction The following are equivalent: 1. For every bisimulation relation R ⊆ Nω × Nω, R ⊆ ∆ 2. ?? In other words: no obvious equivalent formulation of coinduction!
  • 124. Final coalgebras and coinduction The following are equivalent: 1. For every bisimulation relation R ⊆ Nω × Nω, R ⊆ ∆ 2. ?? In other words: no obvious equivalent formulation of coinduction!
  • 125. Final coalgebras and coinduction The following are equivalent: 1. For every bisimulation relation R ⊆ Nω × Nω, R ⊆ ∆ 2. ?? In other words: no obvious equivalent formulation of coinduction!
  • 126. Congruences and bisimulations: dual? R ⊆ N × N is a congruence if 1 + N [zero, succ] 1 + R γ∃ oo GG 1 + N [zero, succ] N Rπ1 oo π2 GG N R ⊆ Nω × Nω is a bisimulation if Nω head, tail R γ∃ π1oo π2 GG Nω head, tail N × Nω N × Roo GG N × Nω
  • 127. Congruences and bisimulations: dual? R ⊆ S × T is an F-congruence if F(S) α F(R) γ∃ oo GG F(T) β S Rπ1 oo π2 GG T R ⊆ S × T is an F-bisimulation if S α R γ∃ π1oo π2 GG T β F(S) F(R)oo GG F(T)
  • 128. Induction and coinduction: dual? For every congruence relation R ⊆ N × N, ∆ ⊆ R For every bisimulation relation R ⊆ Nω × Nω, R ⊆ ∆
  • 129. Induction and coinduction: dual? For every congruence relation R on an initial algebra: ∆ ⊆ R For every bisimulation relation R on a final coalgebra: R ⊆ ∆
  • 130. An aside: fixed points Let (P, ≤) be a preorder and f : P → P a monotone map. Classically, least fixed point induction is: ∀p ∈ P : f(p) ≤ p ⇒ µf ≤ p Classically, greatest fixed point coinduction is: ∀p ∈ P : p ≤ f(p) ⇒ p ≤ νf
  • 131. An aside: fixed points Let (P, ≤) be a preorder and f : P → P a monotone map. Classically, least fixed point induction is: ∀p ∈ P : f(p) ≤ p ⇒ µf ≤ p Classically, greatest fixed point coinduction is: ∀p ∈ P : p ≤ f(p) ⇒ p ≤ νf
  • 132. An aside: fixed points Let (P, ≤) be a preorder and f : P → P a monotone map. Classically, least fixed point induction is: ∀p ∈ P : f(p) ≤ p ⇒ µf ≤ p Classically, greatest fixed point coinduction is: ∀p ∈ P : p ≤ f(p) ⇒ p ≤ νf
  • 133. An aside: fixed points Any preorder (P, ≤) is a category, with arrows: p → q ≡ p ≤ q Any monotone map is a functor: p → q → f(p) → f(q) Lfp induction and gfp coinduction become: f(µf) GG f(p) µf GG p p GG νf f(p) GG f(νf)
  • 134. An aside: fixed points Any preorder (P, ≤) is a category, with arrows: p → q ≡ p ≤ q Any monotone map is a functor: p → q → f(p) → f(q) Lfp induction and gfp coinduction become: f(µf) GG f(p) µf GG p p GG νf f(p) GG f(νf)
  • 135. An aside: fixed points Any preorder (P, ≤) is a category, with arrows: p → q ≡ p ≤ q Any monotone map is a functor: p → q → f(p) → f(q) Lfp induction and gfp coinduction become: f(µf) GG f(p) µf GG p p GG νf f(p) GG f(νf)
  • 136. Fixed point (co)induction = initiality and finality f(µf) GG f(p) µf GG p p GG νf f(p) GG f(νf) F(A) GG F(S) A ∃ ! GG S S ∃ ! GG Z F(S) GG F(Z)
  • 137. Fixed point (co)induction = initiality and finality f(µf) GG f(p) µf GG p p GG νf f(p) GG f(νf) F(A) GG F(S) A ∃ ! GG S S ∃ ! GG Z F(S) GG F(Z)
  • 138. 5. What coalgebra studies • the behaviour of – often infinite, circular – systems (their equivalence, minimization, synthesis) • rather: the universal principles underlying this behaviour • these days applied in many different scientific disciplines
  • 139. 5. What coalgebra studies • the behaviour of – often infinite, circular – systems (their equivalence, minimization, synthesis) • rather: the universal principles underlying this behaviour • these days applied in many different scientific disciplines
  • 140. 5. What coalgebra studies • the behaviour of – often infinite, circular – systems (their equivalence, minimization, synthesis) • rather: the universal principles underlying this behaviour • these days applied in many different scientific disciplines
  • 141. 5. What coalgebra studies • the behaviour of – often infinite, circular – systems (their equivalence, minimization, synthesis) • rather: the universal principles underlying this behaviour • these days applied in many different scientific disciplines
  • 142. Example: dynamical systems A dynamical system is: set of states X and a transition function t : X → X Notation for transitions: x → y ≡ t(x) = y Examples: x GG y GG z poo r GG s q dd
  • 143. Example: systems with output A system with output: o, t : X → O × X Notation: x a GG y ≡ o(x) = a and t(x) = y. x0 a GG x1 b GG x2 a GG x3 b ww y0 a VV y1 b xx
  • 144. Example: infinite data types For instance, streams of natural numbers: Nω = {σ | σ : N → N } The behaviour of streams: (σ(0), σ(1), σ(2), . . .) σ(0) GG (σ(1), σ(2), σ(3), . . .) where we call σ(0): the initial value (= head) σ = (σ(1), σ(2), σ(3), . . .): the derivative (= tail)
  • 145. Example: streams (1, 1, 1, . . .) 1 GG (1, 1, 1, . . .) 1 GG (1, 1, 1, . . .) 1 GG · · · (1, 1, 1, . . .) 1
  • 146. Example: streams (1, 1, 1, . . .) 1 GG (1, 1, 1, . . .) 1 GG (1, 1, 1, . . .) 1 GG · · · (1, 1, 1, . . .) 1
  • 147. Example: streams (1, 2, 3, . . .) 1 GG (2, 3, 4, . . .) 2 GG (3, 4, 5, . . .) 3 GG · · · (1, 2, 3, . . .) 1 GG (2, 3, 4, . . .) = (1, 2, 3, . . .) + (1, 1, 1, . . .) (1, 2, 3, . . .) 1 GG 1 (1, 1, 1, . . .) 1
  • 148. Example: streams (1, 2, 3, . . .) 1 GG (2, 3, 4, . . .) 2 GG (3, 4, 5, . . .) 3 GG · · · (1, 2, 3, . . .) 1 GG (2, 3, 4, . . .) = (1, 2, 3, . . .) + (1, 1, 1, . . .) (1, 2, 3, . . .) 1 GG 1 (1, 1, 1, . . .) 1
  • 149. Example: streams (1, 2, 3, . . .) 1 GG (2, 3, 4, . . .) 2 GG (3, 4, 5, . . .) 3 GG · · · (1, 2, 3, . . .) 1 GG (2, 3, 4, . . .) = (1, 2, 3, . . .) + (1, 1, 1, . . .) (1, 2, 3, . . .) 1 GG 1 (1, 1, 1, . . .) 1
  • 150. Example: non-well-founded sets Historically important: Peter Aczel’s book. x = {x} y = {y} xDD y rr x = {y} y = {z} z = {x, y} x GG y GG z yy ––
  • 151. Example: non-well-founded sets Historically important: Peter Aczel’s book. x = {x} y = {y} xDD y rr x = {y} y = {z} z = {x, y} x GG y GG z yy ––
  • 152. Example: non-well-founded sets Historically important: Peter Aczel’s book. x = {x} y = {y} xDD y rr x = {y} y = {z} z = {x, y} x GG y GG z yy ––
  • 153. Example: automata A deterministic automaton GG x b a GG z b zz a }} y b yy a tt • initial state: x • final states: y and z • L(x) = {a, b}∗ a
  • 154. Example: automata A deterministic automaton GG x b a GG z b zz a }} y b yy a tt • initial state: x • final states: y and z • L(x) = {a, b}∗ a
  • 155. Example: automata A deterministic automaton GG x b a GG z b zz a }} y b yy a tt • initial state: x • final states: y and z • L(x) = {a, b}∗ a
  • 156. All these examples: circular behaviour GG x b a GG z b zz a }} y b yy a tt y0 a VV y1 b xx (1, 2, 3, . . .) 1 GG 1 (1, 1, 1, . . .) 1
  • 157. Where coalgebra is used • logic, set theory • automata • control theory • data types • dynamical systems • games • economy • ecology
  • 158. 6. Discussion • New way of thinking – give it time • Extensive example: streams (Lecture two) • Algebra and coalgebra (Lecture three and four) - bisimulation up-to - cf. CALCO • Algorithms, tools (Lecture four) - Cf. Hacking nondeterminism with induction and coinduction Bonchi and Pous, Comm. ACM Vol. 58(2), 2015