Lecture 16: Sequential Algorithms
Lecture 16
- Sequential ⟹ Stable
- Cds
Revisit the definition of
-
Good for straightforward cartesian closure:
-
Good for straightforward execution: Forest/programs
-
Good for straightforward composition:
Recall that a proof is a sequence
st
- Condition 1:
an infinite proof -
Condition 2 (Stability): if
are two proofs of the same cell, then the longest common prefix is either
or ends with a cell.(cf. picture)
If
On top of that:
Notations:
iff (filled)- If
and and (accessible) (enabled)
(cf. picture)
The stability condition allows us to represent configurations as forests (the
Example:
We write
Prop: for every cds
, satisfies:
Proof:
-
thus if , then -
if
, then there exists by uniqueness (stability) such that
Let
Th: Any sequential algorithm computes a sequential function
Prop: Any sequential function is stable.
Proof:
By contradiction, suppose that
3 different ways to define sequential algorithms (78)
-
As configurations of
A dive into the corresponding category:
- Objects: Cds
-
SeqAlg whose morphisms are given by
Look at the cells, they have the form:
Similarly, we have to check that
Cells in both of them: resp. of the form
Categorical composition
Sequential algorithms as forests
Consider the quick left or:
cf. pictures
Formally, sequential algorithms as forests are defined via
- a recursive syntax
- typing rules
We only accept forests that are well-typed:
and:
Alternatively, we can give a syntax in terms of branches (aka plays):
E.g.:
Composition
where
A generalized point
i.e., in a way:
cf. picture
Leave a comment