Modal Operators for Coequations Jesse Hughes jesse@cmu.edu - - PowerPoint PPT Presentation

modal operators for coequations
SMART_READER_LITE
LIVE PREVIEW

Modal Operators for Coequations Jesse Hughes jesse@cmu.edu - - PowerPoint PPT Presentation

Modal Operators for Coequations Jesse Hughes jesse@cmu.edu Carnegie Mellon University Modal Operators for Coequations p.1/17 Outline I. The co-Birkhoff Theorem Modal Operators for Coequations p.2/17 Outline I. The co-Birkhoff


slide-1
SLIDE 1

Modal Operators for Coequations

Jesse Hughes

jesse@cmu.edu

Carnegie Mellon University

Modal Operators for Coequations – p.1/17

slide-2
SLIDE 2

Outline

  • I. The co-Birkhoff Theorem

Modal Operators for Coequations – p.2/17

slide-3
SLIDE 3

Outline

  • I. The co-Birkhoff Theorem
  • II. Deductive completeness

Modal Operators for Coequations – p.2/17

slide-4
SLIDE 4

Outline

  • I. The co-Birkhoff Theorem
  • II. Deductive completeness
  • III. The
  • perator

Modal Operators for Coequations – p.2/17

slide-5
SLIDE 5

Outline

  • I. The co-Birkhoff Theorem
  • II. Deductive completeness
  • III. The
  • perator
  • IV. The
  • perator

Modal Operators for Coequations – p.2/17

slide-6
SLIDE 6

Outline

  • I. The co-Birkhoff Theorem
  • II. Deductive completeness
  • III. The
  • perator
  • IV. The
  • perator
  • V. The invariance theorem

Modal Operators for Coequations – p.2/17

slide-7
SLIDE 7

The Birkhoff variety theorem

Let

  • :Set

Set be a polynomial functor, and X an

infinite set of variables. Theorem (Birkhoff’s variety theorem (1935)). A full subcategory V of Set

is closed under

  • products,
  • subalgebras and
  • quotients (codomains of regular epis)

just in case V is definable by a set of equations E over X, i.e., V = {A, α | A, α | = E}.

Modal Operators for Coequations – p.3/17

slide-8
SLIDE 8

The covariety theorem

Let Γ:E

E be a functor bounded by C ∈ E.

  • Theorem. A full subcategory V of EΓ is closed under
  • coproducts,
  • images (codomains of epis) and
  • (regular) subcoalgebras

just in case V is definable by a coequation ϕ over C, i.e., V = {A, α | A, α | = ϕ}.

Modal Operators for Coequations – p.4/17

slide-9
SLIDE 9

Coequations

A coequation over C is a subobject of UHC, the cofree coalgebra over C.

Modal Operators for Coequations – p.5/17

slide-10
SLIDE 10

Coequations

A coequation over C is a subobject of UHC, the cofree coalgebra over C. A coalgebra A, α satisfies ϕ just in case, for every homomorphism p:A, α

HC,

the image of p is contained in ϕ (i.e., Im(p) ≤ ϕ). UA, α

  • UHC

ϕ

  • Modal Operators for Coequations – p.5/17
slide-11
SLIDE 11

Example

The cofree coalgebra H2

Modal Operators for Coequations – p.6/17

slide-12
SLIDE 12

Example

A coequation.

Modal Operators for Coequations – p.6/17

slide-13
SLIDE 13

Example

This coalgebra satisfies ϕ.

Modal Operators for Coequations – p.6/17

slide-14
SLIDE 14

Example

Under any coloring, the elements of the coalgebra map to elements of ϕ.

Modal Operators for Coequations – p.6/17

slide-15
SLIDE 15

Example

This coalgebra doesn’t satisfy ϕ.

Modal Operators for Coequations – p.6/17

slide-16
SLIDE 16

Example

If we paint the circle red, it isn’t mapped to an element of ϕ.

Modal Operators for Coequations – p.6/17

slide-17
SLIDE 17

Coequations as predicates

Since a coequation ϕ over C is just a subobject of UHC, a coequation can be viewed as a predicate over UHC.

Modal Operators for Coequations – p.7/17

slide-18
SLIDE 18

Coequations as predicates

Since a coequation ϕ over C is just a subobject of UHC, a coequation can be viewed as a predicate over UHC. Hence, the coequations over C come with a natural

  • structure. We can build new coequations out of old via ∧,

¬, ∀, etc.

Modal Operators for Coequations – p.7/17

slide-19
SLIDE 19

Coequations as predicates

Since a coequation ϕ over C is just a subobject of UHC, a coequation can be viewed as a predicate over UHC. Coequation satisfaction can be stated in terms of predicate satisfaction.

Modal Operators for Coequations – p.7/17

slide-20
SLIDE 20

Coequations as predicates

Since a coequation ϕ over C is just a subobject of UHC, a coequation can be viewed as a predicate over UHC. Coequation satisfaction can be stated in terms of predicate satisfaction. A, α satisfies ϕ just in case, for every p:A, α

HC,

Im(p) ≤ ϕ.

Modal Operators for Coequations – p.7/17

slide-21
SLIDE 21

Coequations as predicates

Since a coequation ϕ over C is just a subobject of UHC, a coequation can be viewed as a predicate over UHC. Coequation satisfaction can be stated in terms of predicate satisfaction. A, α satisfies ϕ just in case, for every p:A, α

HC,

∃a∈A(p(a) = x) ⊢ ϕ(x).

Modal Operators for Coequations – p.7/17

slide-22
SLIDE 22

Birkhoff’s deduction theorem

A set of equations E is deductively closed just in case E satisfies the following: (i) x = x ∈ E; (ii) t1 = t2 ∈ E ⇒ t2 = t1 ∈ E; (iii) t1 = t2 ∈ E and t2 = t3 ∈ E ⇒ t1 = t3 ∈ E; (iv) E is closed under the

  • operations;

(v) t1 = t2 ∈ E ⇒ t1[t/x] = t2[t/x] ∈ E.

Modal Operators for Coequations – p.8/17

slide-23
SLIDE 23

Birkhoff’s deduction theorem

A set of equations E is deductively closed just in case E satisfies the following: (i) x = x ∈ E; (ii) t1 = t2 ∈ E ⇒ t2 = t1 ∈ E; (iii) t1 = t2 ∈ E and t2 = t3 ∈ E ⇒ t1 = t3 ∈ E; (iv) E is closed under the

  • operations;

(v) t1 = t2 ∈ E ⇒ t1[t/x] = t2[t/x] ∈ E. Items (i)–(iv) ensure that E is a congruence and hence uniquely determines a quotient of FX.

Modal Operators for Coequations – p.8/17

slide-24
SLIDE 24

Birkhoff’s deduction theorem

A set of equations E is deductively closed just in case E satisfies the following: (i) x = x ∈ E; (ii) t1 = t2 ∈ E ⇒ t2 = t1 ∈ E; (iii) t1 = t2 ∈ E and t2 = t3 ∈ E ⇒ t1 = t3 ∈ E; (iv) E is closed under the

  • operations;

(v) t1 = t2 ∈ E ⇒ t1[t/x] = t2[t/x] ∈ E. Item (v) ensures that E is a stable

  • algebra, i.e., closed

under substitutions.

Modal Operators for Coequations – p.8/17

slide-25
SLIDE 25

Birkhoff’s deduction theorem

A set of equations E is deductively closed just in case E satisfies the following: (i) x = x ∈ E; (ii) t1 = t2 ∈ E ⇒ t2 = t1 ∈ E; (iii) t1 = t2 ∈ E and t2 = t3 ∈ E ⇒ t1 = t3 ∈ E; (iv) E is closed under the

  • operations;

(v) t1 = t2 ∈ E ⇒ t1[t/x] = t2[t/x] ∈ E. Theorem (Birkhoff completeness theorem). E = T hEq(V) for some class V iff E is deductively closed.

Modal Operators for Coequations – p.8/17

slide-26
SLIDE 26

Dualizing the completeness theorem

Theorem (Birkhoff completeness theorem). E = T hEq(V) for some class V iff E is deductively closed. The duals of the closure conditions yield two modal opera- tors in the coalgebraic setting.

Modal Operators for Coequations – p.9/17

slide-27
SLIDE 27

Dualizing the completeness theorem

Theorem (Birkhoff completeness theorem). E = T hEq(V) for some class V iff E is deductively closed. The duals of the closure conditions yield two modal

  • perators in the coalgebraic setting.
  • Taking the least congruence generated by E

corresponds to taking the largest subcoalgebra of ϕ.

Modal Operators for Coequations – p.9/17

slide-28
SLIDE 28

Dualizing the completeness theorem

Theorem (Birkhoff completeness theorem). E = T hEq(V) for some class V iff E is deductively closed. The duals of the closure conditions yield two modal

  • perators in the coalgebraic setting.
  • Taking the least congruence generated by E

corresponds to taking the largest subcoalgebra of ϕ.

  • Closing E under substitutions corresponds to taking

the largest invariant coequation contained in ϕ.

Modal Operators for Coequations – p.9/17

slide-29
SLIDE 29

Dualizing the completeness theorem

The duals of the closure conditions yield two modal

  • perators in the coalgebraic setting.
  • Taking the least congruence generated by E

corresponds to taking the largest subcoalgebra of ϕ.

  • Closing E under substitutions corresponds to taking

the largest invariant coequation contained in ϕ. Theorem (Invariance theorem). ϕ is a generating coequation just in case ϕ is an invariant subcoalgebra

  • f HC.

Modal Operators for Coequations – p.9/17

slide-30
SLIDE 30

Theories/Generating coequations

A set of equations E is the equational theory for some class V of algebras iff

  • V |

= E;

  • If V |

= E′, then E′ ⊆ E.

Modal Operators for Coequations – p.10/17

slide-31
SLIDE 31

Theories/Generating coequations

A set of equations E is the equational theory for some class V of algebras iff

  • V |

= E;

  • If V |

= E′, then E′ ⊆ E. A coequation ϕ is the generating coequation for some class V of coalgebras iff

  • V |

= ϕ;

  • If V |

= ψ, then ϕ ⊢ ψ.

Modal Operators for Coequations – p.10/17

slide-32
SLIDE 32

Theories/Generating coequations

A coequation ϕ is the generating coequation for some class V of coalgebras iff

  • V |

= ϕ;

  • If V |

= ψ, then ϕ ⊢ ψ. A generating coequation gives a measure of the “coequa- tional commitment” of V.

Modal Operators for Coequations – p.10/17

slide-33
SLIDE 33

Invariant coequations

Let ϕ ⊆ UHC. We say that ϕ is invariant just in case, for every “repainting” p:UHC

C,

equivalently, every homomorphism p:HC

HC, we have

pϕ ≤ ϕ.

Modal Operators for Coequations – p.11/17

slide-34
SLIDE 34

Invariant coequations

Let ϕ ⊆ UHC. We say that ϕ is invariant just in case, for every “repainting” p:UHC

C,

equivalently, every homomorphism p:HC

HC, we have

∃c∈UHC( p(c) = x ∧ ϕ(c)) ⊢ ϕ(x).

Modal Operators for Coequations – p.11/17

slide-35
SLIDE 35

Invariant coequations

Let ϕ ⊆ UHC. We say that ϕ is invariant just in case, for every “repainting” p:UHC

C,

equivalently, every homomorphism p:HC

HC, we have

∃c∈UHC( p(c) = x ∧ ϕ(c)) ⊢ ϕ(x). In other words, however we repaint HC, the elements of ϕ are again (under this new coloring) elements of ϕ.

Modal Operators for Coequations – p.11/17

slide-36
SLIDE 36

Example (cont.)

The coequation ϕ.

Modal Operators for Coequations – p.12/17

slide-37
SLIDE 37

Example (cont.)

The cofree coalgebra The repainted coalgebra

ϕ is not invariant.

Modal Operators for Coequations – p.12/17

slide-38
SLIDE 38

Example (cont.)

The coequation ϕ.

Modal Operators for Coequations – p.12/17

slide-39
SLIDE 39

The modal operator

Let :Sub(UHC)

Sub(UHC) be the comonad taking a

coequation ϕ to the largest subcoalgebra A, α of HC such that A ≤ ϕ.

Modal Operators for Coequations – p.13/17

slide-40
SLIDE 40

The modal operator

Let :Sub(UHC)

Sub(UHC) be the comonad taking a

coequation ϕ to the largest subcoalgebra A, α of HC such that A ≤ ϕ. As is well-known, if Γ preserves pullbacks of subobjects, then is an S4 operator. (i) If ϕ ⊢ ψ then ϕ ⊢ ψ; (ii) ϕ ⊢ ϕ; (iii) ϕ ⊢ ϕ; (iv) (ϕ → ψ) ⊢ ϕ → ψ;

Modal Operators for Coequations – p.13/17

slide-41
SLIDE 41

The modal operator

Let :Sub(UHC)

Sub(UHC) be the comonad taking a

coequation ϕ to the largest subcoalgebra A, α of HC such that A ≤ ϕ. (i) If ϕ ⊢ ψ then ϕ ⊢ ψ; (ii) ϕ ⊢ ϕ; (iii) ϕ ⊢ ϕ; (iv) (ϕ → ψ) ⊢ ϕ → ψ; (i) follows from functoriality.

Modal Operators for Coequations – p.13/17

slide-42
SLIDE 42

The modal operator

Let :Sub(UHC)

Sub(UHC) be the comonad taking a

coequation ϕ to the largest subcoalgebra A, α of HC such that A ≤ ϕ. (i) If ϕ ⊢ ψ then ϕ ⊢ ψ; (ii) ϕ ⊢ ϕ; (iii) ϕ ⊢ ϕ; (iv) (ϕ → ψ) ⊢ ϕ → ψ; (ii) and (iii) are the counit and comultiplication of the comonad.

Modal Operators for Coequations – p.13/17

slide-43
SLIDE 43

The modal operator

Let :Sub(UHC)

Sub(UHC) be the comonad taking a

coequation ϕ to the largest subcoalgebra A, α of HC such that A ≤ ϕ. (i) If ϕ ⊢ ψ then ϕ ⊢ ψ; (ii) ϕ ⊢ ϕ; (iii) ϕ ⊢ ϕ; (iv) (ϕ → ψ) ⊢ ϕ → ψ; (iv) follows from the fact that U :EΓ

E preserves finite

meets.

Modal Operators for Coequations – p.13/17

slide-44
SLIDE 44

Definition of

Let ϕ ⊆ UHC. Define Iϕ = {ψ ≤ UHC | ∀p:HC

HC(∃pψ ≤ ϕ)}.

We define a functor :Sub(UHC)

Sub(UHC) by

ϕ =

  • Iϕ.

Then ϕ is the greatest invariant subobject of UHC con- tained in ϕ.

Modal Operators for Coequations – p.14/17

slide-45
SLIDE 45

is S4

One can show that is an S4 operator. (i) If ϕ ⊢ ψ then ϕ ⊢ ψ; (ii) ϕ ⊢ ϕ; (iii) ϕ ⊢ ϕ; (iv) (ϕ → ψ) ⊢ ϕ → ψ;

Modal Operators for Coequations – p.15/17

slide-46
SLIDE 46

is S4

One can show that is an S4 operator. (i) If ϕ ⊢ ψ then ϕ ⊢ ψ; (ii) ϕ ⊢ ϕ; (iii) ϕ ⊢ ϕ; (iv) (ϕ → ψ) ⊢ ϕ → ψ; (i) - (iii) follow from the fact that is a comonad, as before.

Modal Operators for Coequations – p.15/17

slide-47
SLIDE 47

is S4

One can show that is an S4 operator. (i) If ϕ ⊢ ψ then ϕ ⊢ ψ; (ii) ϕ ⊢ ϕ; (iii) ϕ ⊢ ϕ; (iv) (ϕ → ψ) ⊢ ϕ → ψ; (iv) requires an argument that the meet of two invariant co- equations is again invariant. This is not difficult.

Modal Operators for Coequations – p.15/17

slide-48
SLIDE 48

The invariance theorem, revisited

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

Modal Operators for Coequations – p.16/17

slide-49
SLIDE 49

The invariance theorem, revisited

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

Modal Operators for Coequations – p.16/17

slide-50
SLIDE 50

The invariance theorem, revisited

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. Let [−]:SubE(UHC)

SubEΓ(HC) be the

right adjoint to U :SubEΓ(HC)

SubE(HC) (so

= U ◦ [−]). Then [ ϕ] | = ϕ.

Modal Operators for Coequations – p.16/17

slide-51
SLIDE 51

The invariance theorem, revisited

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. [

ϕ] | = ϕ.

  • Theorem. ϕ is a generating coequation iff ϕ =

ϕ.

Modal Operators for Coequations – p.16/17

slide-52
SLIDE 52

The invariance theorem, revisited

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. [

ϕ] | = ϕ.

  • Theorem. ϕ is a generating coequation iff ϕ =

ϕ. Theorem. ϕ ≤ ϕ, i.e., if ϕ is invariant, then so is ϕ.

Modal Operators for Coequations – p.16/17

slide-53
SLIDE 53

The invariance theorem, revisited

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. A, α |

= ϕ iff A, α | = ϕ.

  • Lemma. [

ϕ] | = ϕ.

  • Theorem. ϕ is a generating coequation iff ϕ =

ϕ. Theorem. ϕ ≤ ϕ, i.e., if ϕ is invariant, then so is ϕ.

  • Theorem. If Γ preserves non-empty intersections,

then ϕ = ϕ.

Modal Operators for Coequations – p.16/17

slide-54
SLIDE 54

Some open questions

  • Is the preservation of non-empty intersections really

relevant to the conclusion that = ?

Modal Operators for Coequations – p.17/17

slide-55
SLIDE 55

Some open questions

  • Is the preservation of non-empty intersections really

relevant to the conclusion that = ?

  • What is the relation between the construction of a

coequation ϕ and the corresponding covariety?

Modal Operators for Coequations – p.17/17

slide-56
SLIDE 56

Some open questions

  • Is the preservation of non-empty intersections really

relevant to the conclusion that = ?

  • What is the relation between the construction of a

coequation ϕ and the corresponding covariety? V

ϕ = Vϕ

V

ϕ = Vϕ

Vϕ∧ψ = Vϕ ∩ Vψ V∃pϕ = ? V¬ϕ = ?

Modal Operators for Coequations – p.17/17

slide-57
SLIDE 57

Some open questions

  • Is the preservation of non-empty intersections really

relevant to the conclusion that = ?

  • What is the relation between the construction of a

coequation ϕ and the corresponding covariety?

  • What applications do these “non-behavioral”

covarieties have in computer programming semantics?

Modal Operators for Coequations – p.17/17