Conway and Iteration Semirings Stephen L. Bloom Stevens Institute - - PDF document
Conway and Iteration Semirings Stephen L. Bloom Stevens Institute - - PDF document
Conway and Iteration Semirings Stephen L. Bloom Stevens Institute of Technology Hoboken, NJ International Category Theory Conference 2008 Joint work with Zoltan Esik Outline Some categories with fixed points Conway and iteration
SLIDE 1
SLIDE 2
Joint work with Zoltan ´ Esik
SLIDE 3
Outline
- Some categories with fixed points
- Conway and iteration theories
- Matrix theories and star semirings
- A Kleene type theorem
- Some characterizations of Nrat
A∗ and
N∞rat
A∗
- Open problems
SLIDE 4
Some categories with fixed point operators
SLIDE 5
Suppose C is a category with coproducts. A parameterized fixed point operation is a func- tion C(X, X + Y )
†
C(X, Y )
such that f† = X
f
X + Y
f†,1Y
Y.
In product form: C(X×Y, X)
†
C(Y, X) such
that f† = Y
f†,1Y
X × Y
f
X
SLIDE 6
Pfn(A)
- A is a collection of sets closed under finite
coproducts +
- Pfn(A) is category with objects X ∈ A
- an arrow f : X
Y is partial function
- if f : X
X + Y , f† : X Y is “do
f while value is in X”. f† = X
f
X + Y
f†, 1Y
Y.
SLIDE 7
Fω(A)
- A is a collection of ω-complete
posets closed under finite products ×
- Fω(A) is category with objects X ∈ A
- an arrow f : X
Y is continuous func-
tion
- if f : X × Y
X, f† : Y X is least
x such that f(x, y) = x. f† = Y
f†,1Y
X × Y
f
X
f†(y) = f(f†(y), y).
SLIDE 8
Fn(A)
- A a collection of ω-complete
categories closed under finite products
- objects in Fn(A) are categories in A
- an arrow in Fn(A) is ω-continuous functor
f : A
B
- if f : A × B
A, for each b ∈ B,
fb : A
- A is
fb = f(−, b)
- f† : B
A on b is initial fb-algebra
fb(f†(b))
- f†(b).
SLIDE 9
Trees Σ⊥TR
- Σ a ranked set ; ⊥ ∈ Σ0.
- a morphism 1
p is node labeled Σ-
tree with internal nodes with n-successors labeled by letter in Σn; leaves labeled either by letter in Σ0 or “variable” x1, . . . , xp
- a morphism n
p is n-tuple of trees 1 p.
- composition: tree substition
- if f : 1
1 + p, f† : 1 p is unique
tree such that f† = 1
f
1 + p
f†,1p
p.
SLIDE 10
Matrices The subsets of words on an alphabet X form a semiring 2X∗ where A + B = A ∪ B and A · B = {uv : u ∈ A, v ∈ B}. Matrices over this semiring form a category Mat(2X∗):
- an arrow f : n
p is n × p matrix
- f · g matrix product
- if f = [a b] : n
n + p, f† = [a∗b], where
a∗ = 1n + a + a2 + . . . .
SLIDE 11
Theories with fixed points Each of the above examples are categories T with
- finite coproducts or products
- a parameterized fixed point operation
- In Pfn, Mat, Fω, f† is a least fixed point
- In Σ⊥TR, f† is a unique fixed point
- In Fn, f† is an initial fixed point
SLIDE 12
Main Results
- (Bloom, ´
Esik) A large number of the com- putationally interesting structures have one
- f two equational theories IT, IT0.
- IT := Id(Fω(A)) = Id(Fn(A)) = Id(Σ⊥TR)
IT is the iteration theory identities.
- IT0 = IT + {x = y : x, y : 1 → 0} =
Id(Pfn(A)) = Id(Mat(2X∗)),
- (Simpson, Plotkin) Every consistent itera-
tion theory is either IT or IT0.
SLIDE 13
Axiomatization Axioms for iteration theory identities fall into two groups.
- The “Conway axioms”:
fixed point, pa- rameter, simple composition and double- dagger
- The group axioms.
SLIDE 14
Representing f†
Y f = f X Y X X
SLIDE 15
Parameter identity
= f g f g
(f · (1X ⊕ g))† = f† · g f : X
X + Y , g : Y Z.
SLIDE 16
Another formulation of the parameter identity C(X, X + Z) C(X, Z)
†
- C(X, X + Y )
C(X, X + Z)
C(1X,1X⊕g)
- C(X, X + Y )
C(X, Y )
†
C(X, Y )
C(X, Z)
C(1X,g)
- commutes, for any g : Y
Z.
SLIDE 17
Simple Composition identity
= f g f g f
(f · g)† = f · (g · f)† f : X
Y , g : Y X.
SLIDE 18
Double dagger Identity
f:X −> X+X+Y = f f
f†† = (f · (1X, 1X ⊕ 1Y ))†
SLIDE 19
Traced monoidal categories Conway theories are essentially the same as traced monoidal categories of Joyal, Street and Verity. (Feedback replaces dagger.)
SLIDE 20
Iteration Theories An iteration theory is a Conway theory satisfying all group identities. For the two element group G2:
= f f f
12 · f · ρ1, f · ρ2† = f††. The G2-identity
SLIDE 21
Star semirings A semiring, or rig, S consists of
- a commutative monoid (S, +, 0), and
- a monoid (S, ·, 1), such that
- multiplication distributes over addition
x(y + z) = xy + xz (y + z)x = yx + zx 0 · x = x · 0 = 0.
- A star semiring is semiring with ∗ : S → S.
SLIDE 22
Conway and iteration matrix theories Mat(S), the theory of matrices over a semiring S, is a Conway theory iff S is a star semiring satisfying
- the sum star identity:
(x + y)∗ = (x∗y)∗x∗,
- the product star identity:
(xy)∗ = 1 + x(yx)∗y. Special cases: zero and fixed point identity: 0∗ = 1 x∗ = 1 + xx∗ = 1 + x∗x.
SLIDE 23
- Definition. A Conway semiring is star semiring
satisfying the sum and product star identities. Examples
- Language semirings:
(2X∗, +, ·, 0, 1,∗ ), where X is an alphabet, and for A, B ⊆ X∗, A + B = A ∪ B; 0 = ∅; 1 = {ǫ} A · B = {uv : u ∈ A, v ∈ B} A∗ =
∞
- k=0
Ak.
SLIDE 24
More Examples
- N∞ = {0, 1, . . . , } ∪ {∞}, with 0∗ = 1, x∗ =
∞, otherwise.
- The boolean semiring B = {0, 1}, with x∗ =
1 = 1 + x.
SLIDE 25
Which Rings are reducts of Conway semirings?
- The star fixed point identity:
x∗ = 1 + x · x∗ implies x∗ · (1 − x) = 1.
- Letting x = 1:
= 1.
SLIDE 26
Inductive definition of M∗ If M is n × n, n > 1, write M =
- a
b c d
- with a, d square. The Conway identities imply
that M∗ is M∗ =
- (a + bd∗c)∗
(a + bd∗c)∗bd∗ (d + ca∗b)∗ca∗ (d + ca∗b)∗
SLIDE 27
Group identities for matrix theories Suppose G is a group with underlying set {1, 2, . . . , n}. The G identity is (x1 + . . . + xn)∗ = e1M∗
Gun
MG is n × n matrix with entries in {x1, . . . , xn} MG[i, j] = xi−1·j i−1 · j is computed in G. e1 = [1 0 . . . 0]. un is n × 1 matrix of 1’s.
SLIDE 28
Example When G = G2 is the 2-element group, MG =
- x1
x2 x2 x1
- The G2-identity is
(x1 + x2)∗ = (x1 + x2x∗
1x2)∗(1 + x∗ 1x2).
Special case: x1 = 0 and x2 = 1, 1∗ = 1∗(1 + 1) = 1∗ + 1∗.
SLIDE 29
Iteration semirings
- Suppose S is a Conway semiring. Mat(S)
is an iteration theory iff S satisfies all group identities.
- Definition. An iteration semiring is a Con-
way semiring satisfying all group identities.
SLIDE 30
Closure Properties If S is Conway or iteration semiring, so is Sn×n for n ≥ 0, the semiring of n × n matrices over S, with matrix product as product, pointwise sum, and star computed using the inductive formula.
SLIDE 31
Power series semirings If S is Conway or iteration semiring, so is S A∗
- the semiring of formal power series. Elements
are functions A∗
S.
- Notational convention:
f =
- u∈A∗
(f, u)u, where (f, u), the coefficient of u, is f(u).
- Examples. For a ∈ A, s ∈ S:
τa(u) = 1 if u = a, 0 otherwise. σs(u) = s if u = ǫ, 0 otherwise.
- The notational convention implies
a = τa s = σs.
SLIDE 32
Semiring operations in S A∗
- If
f =
- u∈A∗
(f, u)u g =
- u∈A∗
(g, u)u then f + g :=
- u∈A∗
((f, u) + (g, u))u f · g :=
- u∈A∗
(
- xy=u
(f, x) · (g, y))u.
- Example If f = 2 + 3a, g = 2b + ab,
fg = 4b + 8ab + 3a2b. ab = ǫ · (ab) or a · b.
SLIDE 33
f∗ in S A∗ ?
- If f(ǫ) = 0, there is unique f∗ satisfying
f∗ = 1 + f · f∗ f∗ = 1 +
- u
(
- xy=u
(f, x)(f∗, y))u.
- If f = s + g, g(ǫ) = 0, the sum star identity
implies f∗ = (s + g)∗ = (s∗g)∗s∗.
SLIDE 34
Some iteration and Conway semirings
- Each of
B = {0, 1}, N∞, 2X∗
is an iteration semiring.
- The initial Conway semiring S0 has ele-
ments 0, 1, 2, . . . , k(1∗)p, and 1∗∗.
- In any iteration semiring
1∗ + 1∗ = 1∗.
- The initial iteration semiring S1 has ele-
ments 0, 1, 2, . . . , (1∗)p, 1∗∗.
SLIDE 35
(Countably) complete semirings S is (countably) complete if for any (count- able) set I,
i∈I si exists, and has the usual
- properties. We may define
s∗ := 1 + s + s2 + . . . and the resulting star semiring is an iteration semiring. Example: N∞ is countably complete. In N∞, x∗ =
1 x = 0 ∞
- therwise.
SLIDE 36
For each n ≥ 1,
- Sn×n
is a Conway, but not an iteration semiring, and
- For each alphabet A, S0
A∗ is a Conway, but not an iteration semiring.
SLIDE 37
Rational power series For a Conway semiring S and alphabet A,
- Srat
A∗ , the rational series, is the least sub star semiring of S A∗ containing each series σs, and τa, for s ∈ S, a ∈ A.
SLIDE 38
Example: regular sets on A The series in Brat A∗ may be identified with least collection of subsets of A∗ containing the singletons {a}, for a ∈ A, the empty set, the set {ǫ}, closed under binary union, product and star, i.e., the regular sets.
SLIDE 39
Automata via matrices We may model finite automata as matrices:
c
1 2
a,b b,c d
α = [1 0], M =
- a + b
b + c c d
- , β =
- 1
- .
SLIDE 40
α, β are matrices over B; M is matrix whose entries are linear combinations of letters. The behavior of (α, M, β) is α · M∗ · β in B A∗ .
SLIDE 41
S-weighted Automata For a Conway semiring S, and alphabet A, SA is the set of all finite series in S A∗
- f the
form s1a1 + . . . + snan, with si ∈ S, ai ∈ A. An automaton is triple (α, M, β), where
- α is 1 × n matrix over S
- M is n × n matrix over SA
- β is n × 1 matrix over S.
The behavior of (α, M, β) is the series in S A∗ : |(α, M, β)| = α · M∗ · β.
SLIDE 42
Recognizable series
- A series f is recognizable if
f = |(α, M, β)| for some automaton (α, M, β).
- The collection of all recognizable series is
denoted Srec A∗ .
SLIDE 43
Examples
- s = σs ∈ S is |(s, 0, 1)| = s · 0∗ · 1
- τa is |α, M, β| when
α = (1 0) , M =
- a
- , β =
- 1
- αM∗β
= (1 0) ·
- 1
a 1
- ·
- 1
- =
a
SLIDE 44
A Kleene theorem for Conway semirings Theorem(Bloom, ´ Esik, Kuich) Srat A∗
- =
Srec A∗ .
SLIDE 45
Some free semirings
- Brat
A∗ is freely generated by A in class
- f iteration semirings satisfying 1∗ = 1.
[Krob]
- Brat
A∗ is isomorphic to star semiring of regular subsets of A∗; thus the axioms of iteration semirings together with 1∗ = 1 give an equational axiomatization of the regular sets.
SLIDE 46
Partial Conway semirings An ideal I in a semiring S is a subset I con- taining 0, satisfying S · I ∪ I · S ∪ I + I ⊆ I A partial Conway semiring is a semiring with a partial star operation defined on an ideal I = I(S) in S such that the Conway identities hold when restricted to elements in I: (x + y)∗ = (x∗y)∗x∗ (xy)∗ = 1 + x(yx)∗y, for x, y ∈ I. The Kleene theorem also holds for partial Con- way semirings.
SLIDE 47
Examples
- For any semiring S, S
A∗ is a partial Con- way semiring, with f∗ defined on all series f such that f(ǫ) = 0. In fact, for such series, f∗ is the unique solution to ξ = 1 + f · ξ.
- N is partial iteration semiring, with I(N) =
{0}. (If n > 0, what is n∗ = 1 + n · n∗?)
SLIDE 48
A characterization of Nrat A∗
- Theorem.(Bloom, ´
Esik) Nrat A∗ is freely gen- erated by A in the class of all partial iteration semirings, i.e., for any partial iteration semi- ring S and any function h : A → I(S), there is a unique semiring morphism h# : Nrat A∗ → S such that if (f, ǫ) = 0, then h#(f) ∈ I(S) and h#(f∗) = (h#(f))∗.
SLIDE 49
We will outline the proof, which uses the Kleene theorem: rational series are the behaviors of automata. Corollary. If S is an iteration semiring, any function h : A → S extends uniquely to a star semiring morphism Nrat A∗ → S.
SLIDE 50
The extension
- Given a partial iteration semiring S and a
function f : A → I(S), we define the image
- f the automaton (α, M, β) in N
A∗ in the
- bvious way: e.g., if M[i, j] = 3a+4b, then
fM[i, j] = 3f(a) + 4f(b).
- If s is the behavior of (α, M, β) define f#(s) =
α(fM)∗β.
- Must show if two automata have the same
behavior, their image is the same.
SLIDE 51
Simulations In the classical case, Brat A∗ , if two automata have the same behavior, their accessible and coaccessible parts have a common homomor- phic image. A similar fact holds for Nrat A∗ . Suppose A = (α, M, β) and B = (α′, M′, β′) A simulation ρ : A → B is: n × m matrix over
N such that
1
α
- 1
α′
- m
m
M′
- n
m
ρ
- n
n
M
n
m
ρ
- 1
β
- 1
- β′
SLIDE 52
Let ∼ be the least equivalence on automata such that if ρ : A → B is a simulation, then
A ∼ B.
- Theorem. (B´
eal, Lombardy, Sakarovitch). Two automata A,
B have the same behavior iff A ∼ B.
SLIDE 53
Where are the group axioms? They are used to prove that if m m
M′
- n
m
ρ
- n
n
M
n
m
ρ
- commutes, then
m m
(M′)∗
- n
m
ρ
- n
n
M∗
n
m
ρ
- does also.
SLIDE 54
A characterization of N∞rat A∗
- If S is a countably complete star semiring,
and s∗ = ∞
i=0 si, then S satisfies
1∗ · 1∗ = 1∗; x · 1∗ = 1∗ · x; 1∗ · (1∗ · x)∗ = 1∗ · x∗.
- N∞ is initial in V.
- Theorem (Bloom, ´
Esik) N∞rat A∗ is freely generated by A in the variety V of all iter- ation semirings satisfying these three extra identities.
SLIDE 55
An A-term t t = 0 | 1 | a | t + t | t · t | t∗. for a ∈ A. The series denoted by t is |t|.
SLIDE 56
Outline of proof In V, each A-term is equivalent to one of form tc + tI + 1∗s, where
- tc ∈ N,
- tI is “ideal term”;
tI = 0 | a | tI + tI | tI · tI | tI · t∗
I
- s is any A-term
- tc = 0 =
⇒ (|s|, ǫ) = 0.
SLIDE 57
Claim: |s| = |t| iff s = t holds in V. Fact. If f = |t|, for an ideal term t, then (f, ǫ) = 0 and (f, u) ∈ N, otherwise. Also, f ∈ Nrat A∗ .
SLIDE 58
First two steps
- If |s0 + sI + 1∗s| = |t0 + tI + 1∗t|, then
|s0| = |t0|, |sI| = |tI|, |1∗s| = |1∗t|.
- |s0| = |t0| are in N; N∞ initial in V implies
s0 = t0 in V.
- |sI| = |tI| belong to Nrat
A∗ , which is free in all partial iteration semirings. Thus, sI = tI in V.
SLIDE 59
Last step is to show that if |1∗s| = |1∗t|, then 1∗s = 1∗t in V.
- Lemma. Let W be variety of iteration star
semirings satisfying 1∗ = 1. An identity 1∗s = 1∗t holds in V iff it holds in W.
- Brat
A∗ is freely generated by A in W [Krob].
- |1∗s| is a rational series all of whose nonzero
coefficients are 1∗. Thus 1∗s = 1∗t in Brat A∗ , and hence in W by Krob. Thus, by the Lemma, 1∗s = 1∗t in V.
SLIDE 60
Inductive semirings An ordered semiring is semiring equipped with a partial order ≤ preserved by +, ·. A star semiring is inductive if aa∗ + 1 ≤ a∗ ax + b ≤ x = ⇒ a∗b ≤ x xa + b ≤ x = ⇒ ba∗ ≤ x. Fact:(´ Esik, Kuich) Any inductive semiring is an iteration semiring satisfying 1∗ = 1∗∗.
SLIDE 61
Examples of inductive semirings
- Mat(2X∗) where A ≤ B ⇐
⇒ A ⊆ B
- N∞ where n < n + 1 < ∞
- N∞rat
A∗ is inductive semiring, when or- dered by sum order: f ≤ g ⇐ ⇒ g = f + h, for some h ∈ N∞rat A∗
SLIDE 62
Non-examples of inductive semrings
- S0, the initial Conway semiring
- S1, the initial iteration semiring
- S0
A∗ , S1 A∗ .
SLIDE 63
A second characterization Theorem: (Bloom, ´ Esik) N∞rat A∗ is freely generated by A in class of inductive semirings satisfying x · 1∗ ≤ 1∗ · x.
SLIDE 64
Two Open problems
- Is there an algorithm to decide, given star
semiring terms r, r′ whether r = r′ in all Conway semirings?
- What is a concrete description of the free
Conway and iteration semirings?
SLIDE 65
References for Conway and iteration semirings S.L. Bloom and Z. ´
- Esik. Axiomatizing rational
power series, to appear. S.L. Bloom, Z. ´ Esik and W. Kuich. Partial Conway and iteration semirings, Fundamenta Informaticae, to appear. J.C. Conway. Regular Algebra and Finite Ma- chines, Chapman and Hall, London, 1971.
- Z. ´
Esik and W. Kuich. Inductive *-semirings. Theoretical Computer Science 324(2004),3-33.
SLIDE 66
References for Conway and iteration theories S.L. Bloom and Z. ´ Esik. Iteration Theories: The Equational Logic of Iterative Processes, EATCS Monographs on Theoretical Computer Science, Springer–Verlag, 1993. A.K. Simpson and G. Plotkin. Complete Axioms for categorical fixed-point
- perators.
Proc. Fifteenth Symp.
- n Logic in Com-