A graph easy class of mute terms A. Bucciarelli, A.Carraro, G.Favro, - - PowerPoint PPT Presentation

a graph easy class of mute terms
SMART_READER_LITE
LIVE PREVIEW

A graph easy class of mute terms A. Bucciarelli, A.Carraro, G.Favro, - - PowerPoint PPT Presentation

A graph easy class of mute terms A. Bucciarelli, A.Carraro, G.Favro, A.Salibra ICTCS 2014, Perugia Terms representing undefinedness. A natural problem arising in -calculus is what terms should be considered as representative of undefined


slide-1
SLIDE 1

A graph easy class of mute terms

  • A. Bucciarelli, A.Carraro, G.Favro, A.Salibra

ICTCS 2014, Perugia

slide-2
SLIDE 2

Terms representing undefinedness.

A natural problem arising in λ-calculus is what terms should be considered as representative of undefined programs.

slide-3
SLIDE 3

Terms representing undefinedness.

A natural problem arising in λ-calculus is what terms should be considered as representative of undefined programs. Ω ≡ (λx.xx)(λx.xx) is the simplest term that embodies this intuitive idea.

slide-4
SLIDE 4

Unsolvable terms.

slide-5
SLIDE 5

Unsolvable terms.

Every λ-term has one of the following form:

◮ λx1 . . . xm.yM1 . . . Mn

slide-6
SLIDE 6

Unsolvable terms.

Every λ-term has one of the following form:

◮ λx1 . . . xm.yM1 . . . Mn ◮ λx1 . . . xm.(λz.M)M1 . . . Mn

slide-7
SLIDE 7

Unsolvable terms.

Every λ-term has one of the following form:

◮ λx1 . . . xm.yM1 . . . Mn ◮ λx1 . . . xm.(λz.M)M1 . . . Mn

If a term β-reduces to a term of the first kind, we say it has a head normal form.

slide-8
SLIDE 8

Unsolvable terms.

Every λ-term has one of the following form:

◮ λx1 . . . xm.yM1 . . . Mn ◮ λx1 . . . xm.(λz.M)M1 . . . Mn

If a term β-reduces to a term of the first kind, we say it has a head normal form.

Definition

A term is called unsolvable if it does not have an head normal form.

slide-9
SLIDE 9

Unsolvable terms.

Every λ-term has one of the following form:

◮ λx1 . . . xm.yM1 . . . Mn ◮ λx1 . . . xm.(λz.M)M1 . . . Mn

If a term β-reduces to a term of the first kind, we say it has a head normal form.

Definition

A term is called unsolvable if it does not have an head normal form. Unsolvables can be considered as the terms representing the undefined (Barendregt, Wadsworth).

slide-10
SLIDE 10

λ-theories and unsolvable terms.

Definition

A λ-theory is a theory of equations between λ-terms that contains λβ.

slide-11
SLIDE 11

λ-theories and unsolvable terms.

Definition

A λ-theory is a theory of equations between λ-terms that contains λβ.

Theorem (Berarducci-Intrigila)

There exists a closed unsolvable t such that ∀M s.t. M =β I, λβ + {t = M} is a consistent theory, while ∀M s.t. M =β I, λβ + {t = M} is not consistent.

slide-12
SLIDE 12

Easy terms.

A closed unsolvable term t is called easy if for any closed term M the theory λβ + {t = M} is consistent.

slide-13
SLIDE 13

Easy terms.

A closed unsolvable term t is called easy if for any closed term M the theory λβ + {t = M} is consistent.

Example

◮ Ω

slide-14
SLIDE 14

Easy terms.

A closed unsolvable term t is called easy if for any closed term M the theory λβ + {t = M} is consistent.

Example

◮ Ω ◮ Ω3I, where Ω3 ≡ (λx.xxx)(λx.xxx)

slide-15
SLIDE 15

Easy terms.

A closed unsolvable term t is called easy if for any closed term M the theory λβ + {t = M} is consistent.

Example

◮ Ω ◮ Ω3I, where Ω3 ≡ (λx.xxx)(λx.xxx)

Ω3 is unsolvable but not easy.

slide-16
SLIDE 16

Easy sets.

Definition

A set A of closed unsolvable terms is an easy set if for any closed M the theory λβ + {t = M | t ∈ A} is consistent.

slide-17
SLIDE 17

Easy sets.

Definition

A set A of closed unsolvable terms is an easy set if for any closed M the theory λβ + {t = M | t ∈ A} is consistent.

Example

{Ω(λx1 . . . xk+1.xk+1) | k ∈ ω}

slide-18
SLIDE 18

Easy sets.

Definition

A set A of closed unsolvable terms is an easy set if for any closed M the theory λβ + {t = M | t ∈ A} is consistent.

Example

{Ω(λx1 . . . xk+1.xk+1) | k ∈ ω}

Theorem

The set of easy terms is not an easy set.

slide-19
SLIDE 19

Mute terms.

Berarducci, “Infinite λ-calculus and non-sensible models”.

slide-20
SLIDE 20

Mute terms.

Berarducci, “Infinite λ-calculus and non-sensible models”.

Definition

A term M is a zero term if it does not reduce to an abstraction.

slide-21
SLIDE 21

Mute terms.

Berarducci, “Infinite λ-calculus and non-sensible models”.

Definition

A term M is a zero term if it does not reduce to an abstraction.

Definition

A zero term is mute if it does not reduce to a variable or to a term

  • f the form

(Zero term) · Term

slide-22
SLIDE 22

Examples and properties of Mute terms.

Example

◮ Ω

slide-23
SLIDE 23

Examples and properties of Mute terms.

Example

◮ Ω ◮ BB, where B ≡ λx.x(λy.xy)

slide-24
SLIDE 24

.

slide-25
SLIDE 25

Properties of the mute terms.

◮ The set of mute terms is an easy set.

slide-26
SLIDE 26

Properties of the mute terms.

◮ The set of mute terms is an easy set. ◮ The set of mute terms is not recursively enumerable, as well

as the set of easy sets.

slide-27
SLIDE 27

Properties of the mute terms.

◮ The set of mute terms is an easy set. ◮ The set of mute terms is not recursively enumerable, as well

as the set of easy sets.

Problem

Is Y Ω3, where Y ≡ λf .(λx.f (xx))(λx.f (xx)), easy?

slide-28
SLIDE 28

Regular mute terms

slide-29
SLIDE 29

Hereditarily n-ary terms.

Definition

Let n > 0 and ¯ x ≡ x1, . . . xk be distinct variables. The set of hereditarily n-ary λ-terms over ¯ x, Hn[¯ x], is the smallest set of terms such that:

slide-30
SLIDE 30

Hereditarily n-ary terms.

Definition

Let n > 0 and ¯ x ≡ x1, . . . xk be distinct variables. The set of hereditarily n-ary λ-terms over ¯ x, Hn[¯ x], is the smallest set of terms such that:

◮ For all i = 1, . . . , k

xi ∈ Hn[¯ x]

slide-31
SLIDE 31

Hereditarily n-ary terms.

Definition

Let n > 0 and ¯ x ≡ x1, . . . xk be distinct variables. The set of hereditarily n-ary λ-terms over ¯ x, Hn[¯ x], is the smallest set of terms such that:

◮ For all i = 1, . . . , k

xi ∈ Hn[¯ x]

◮ For all fresh distinct variables ¯

y ≡ y1, . . . , yn, t1 ∈ Hn[¯ x, ¯ y], . . . , tn ∈ Hn[¯ x, ¯ y] λy1 . . . λyn.yit1 . . . tn ∈ Hn[¯ x]

slide-32
SLIDE 32

Examples of hereditarily terms.

◮ λx.xx ∈ H1 = H1[]

slide-33
SLIDE 33

Examples of hereditarily terms.

◮ λx.xx ∈ H1 = H1[] ◮ λy.yx ∈ H1[x]

slide-34
SLIDE 34

Examples of hereditarily terms.

◮ λx.xx ∈ H1 = H1[] ◮ λy.yx ∈ H1[x]

λx.xxx is not an hereditarily n-ary term.

slide-35
SLIDE 35

A hierarchy of sets based on hereditarily terms.

Definition

Let ¯ x ≡ x1, . . . xk and ¯ y ≡ y1, . . . , yn be distinct variables.

◮ H0 n[¯

x] = Hn[¯ x]

slide-36
SLIDE 36

A hierarchy of sets based on hereditarily terms.

Definition

Let ¯ x ≡ x1, . . . xk and ¯ y ≡ y1, . . . , yn be distinct variables.

◮ H0 n[¯

x] = Hn[¯ x]

◮ Hm+1 n

[¯ x] = {s[u/y] : s ∈ Hm

n [¯

x, ¯ y], ¯ u ≡ u1, . . . , un ∈ Hm

n [¯

x]}

slide-37
SLIDE 37

A hierarchy of sets based on hereditarily terms.

Definition

Let ¯ x ≡ x1, . . . xk and ¯ y ≡ y1, . . . , yn be distinct variables.

◮ H0 n[¯

x] = Hn[¯ x]

◮ Hm+1 n

[¯ x] = {s[u/y] : s ∈ Hm

n [¯

x, ¯ y], ¯ u ≡ u1, . . . , un ∈ Hm

n [¯

x]}

◮ Sn[¯

x] =

m Hm n [¯

x].

slide-38
SLIDE 38

A new class of mute terms.

Theorem

Given s0, . . . , sn ∈ Sn, the term s0 . . . sn is mute.

slide-39
SLIDE 39

A new class of mute terms.

Theorem

Given s0, . . . , sn ∈ Sn, the term s0 . . . sn is mute.

Proof.

Sketch: the key point of the proof is that every reduction path can be seen as starting from a term of this form: (λy1 . . . λyn

  • n abstractions

.yi t1 . . . tn

n terms

) M1 . . . Mn

  • n terms

with tj, Mj ∈ Sn

slide-40
SLIDE 40

A new class of mute terms.

Theorem

Given s0, . . . , sn ∈ Sn, the term s0 . . . sn is mute.

Proof.

Sketch: the key point of the proof is that every reduction path can be seen as starting from a term of this form: (λy1 . . . λyn

  • n abstractions

.yi t1 . . . tn

n terms

) M1 . . . Mn

  • n terms

with tj, Mj ∈ Sn This means that at each step the whole term has a shape among those who are allowed for mute terms.

slide-41
SLIDE 41

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms.

slide-42
SLIDE 42

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms. Mn is the set of regular mute terms of the form s0 . . . sn.

slide-43
SLIDE 43

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms. Mn is the set of regular mute terms of the form s0 . . . sn. M is the set of all regular mute.

slide-44
SLIDE 44

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms. Mn is the set of regular mute terms of the form s0 . . . sn. M is the set of all regular mute.

Example

◮ Ω ∈ M1

slide-45
SLIDE 45

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms. Mn is the set of regular mute terms of the form s0 . . . sn. M is the set of all regular mute.

Example

◮ Ω ∈ M1

slide-46
SLIDE 46

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms. Mn is the set of regular mute terms of the form s0 . . . sn. M is the set of all regular mute.

Example

◮ Ω ∈ M1 ◮ (λx.x(λy.yx))(λx.xx) ∈ M1

slide-47
SLIDE 47

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms. Mn is the set of regular mute terms of the form s0 . . . sn. M is the set of all regular mute.

Example

◮ Ω ∈ M1 ◮ (λx.x(λy.yx))(λx.xx) ∈ M1

slide-48
SLIDE 48

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms. Mn is the set of regular mute terms of the form s0 . . . sn. M is the set of all regular mute.

Example

◮ Ω ∈ M1 ◮ (λx.x(λy.yx))(λx.xx) ∈ M1 ◮ AAA ∈ M2, where A := λxy.x(λzt.tzx)y.

slide-49
SLIDE 49

Definition

Terms of the form s0 . . . sn ∈ Sn where si belongs to Sn, are called Regular mute terms. Mn is the set of regular mute terms of the form s0 . . . sn. M is the set of all regular mute.

Example

◮ Ω ∈ M1 ◮ (λx.x(λy.yx))(λx.xx) ∈ M1 ◮ AAA ∈ M2, where A := λxy.x(λzt.tzx)y.

BB, where B := λx.x(λy.xy), is a mute term that is not regular.

slide-50
SLIDE 50

Regular mute and graph models

slide-51
SLIDE 51

Semantic of λ-calculus.

Definition

A model of λ-calculus is a reflexive object in a cartesian closed cathegory.

slide-52
SLIDE 52

Semantic of λ-calculus.

Definition

A model of λ-calculus is a reflexive object in a cartesian closed cathegory.

Problem

Graph easiness of M: is it possible to find, for every closed term M, a graph models that equates M to every t ∈ M?

slide-53
SLIDE 53

This is part of a general problem, the analysis of the expressive power of λ-models:

slide-54
SLIDE 54

This is part of a general problem, the analysis of the expressive power of λ-models: given a class of λ-models, which theories can they express?

slide-55
SLIDE 55

This is part of a general problem, the analysis of the expressive power of λ-models: given a class of λ-models, which theories can they express? Graph easiness proves that graph models can express the theory λβ + {t = M|t ∈ M} for all closed M.

slide-56
SLIDE 56

Graph models.

Definition

A graph model is a pair (D, p), where D is an infinite set and p : Pfin(D) × D → D is an injective total function.

slide-57
SLIDE 57

Graph models.

Definition

A graph model is a pair (D, p), where D is an infinite set and p : Pfin(D) × D → D is an injective total function. Using such pair (D, p) it is possible to define a λ-model whose universe is P(D).

slide-58
SLIDE 58

Graph models.

Definition

A graph model is a pair (D, p), where D is an infinite set and p : Pfin(D) × D → D is an injective total function. Using such pair (D, p) it is possible to define a λ-model whose universe is P(D). Interpretation of terms is defined as follows:

◮ |x|p ρ = ρ(x), where ρ : Var → P(D) evaluates free variables. ◮ |tu|p ρ = {α : (∃a ⊆ |u|p ρ) p(a, α) ∈ |t|p ρ} ◮ |λx.t|p ρ = { a → α : α ∈ |t|p ρ[x:=a]}

slide-59
SLIDE 59

Main theorem.

slide-60
SLIDE 60

Main theorem.

Theorem

Let M be a closed term. Then, for every e ⊆fin N \ 0 there exists a graph model (D, l) such that (D, l) | = t = M for all t ∈ Me, where Me =

n∈e Mn, the set of n-regular mute terms for n ∈ e.

slide-61
SLIDE 61

Forcing.

Definition

(Forcing) For a closed term M, a partial pair (D, q) and α ∈ D, the abbreviation q α ∈ M means that for all total injections p ⊇ q we have that (D, p) | = α ∈ |M|p.

slide-62
SLIDE 62

Forcing.

Definition

(Forcing) For a closed term M, a partial pair (D, q) and α ∈ D, the abbreviation q α ∈ M means that for all total injections p ⊇ q we have that (D, p) | = α ∈ |M|p.

Lemma

For every closed term M, the function FM : I(D) → P(D) defined by FM(q) = { α ∈ D : q α ∈ M} is weakly continuous, and we have FM(p) = |M|p for each total p.

slide-63
SLIDE 63

Main lemma on mute terms and graph models.

Lemma

Let F : I(D) → P(D) be a weakly continuous function and let e ⊆fin N \ 0. Then there exists a total l : Pfin(D) × D → D such that (D, l) | = t = F(l) for all terms t ∈ Me.

slide-64
SLIDE 64

Proof.

◮ Given a closed M, using the forcing lemma we get a weakly

continuous function F.

slide-65
SLIDE 65

Proof.

◮ Given a closed M, using the forcing lemma we get a weakly

continuous function F.

◮ Using F in the other theorem, we get a total l such that

(D, l) | = t = F(l) for all t ∈ Me.

slide-66
SLIDE 66

Proof.

◮ Given a closed M, using the forcing lemma we get a weakly

continuous function F.

◮ Using F in the other theorem, we get a total l such that

(D, l) | = t = F(l) for all t ∈ Me.

◮ By the forcing lemma, F(p) = |M|p for all total p. So

(D, l) | = t = M

slide-67
SLIDE 67

Ultraproducts

λ-models are first order structures, so we can use the theory of ultraproducts to prove graph easiness of regular mute.

slide-68
SLIDE 68

Ultraproducts

λ-models are first order structures, so we can use the theory of ultraproducts to prove graph easiness of regular mute.

Lo´ s theorem

slide-69
SLIDE 69

Ultraproducts

λ-models are first order structures, so we can use the theory of ultraproducts to prove graph easiness of regular mute.

Lo´ s theorem

◮ (Bucciarelli,Carraro,Salibra)

Let (Dj, pj)j∈J be a family of total pairs, A = (Aj : j ∈ J) be the corresponding family of graph λ-models, where Aj = (P(Dj), ·, k, s), and let F be an ultrafilter on J. Then there exists a graph model (E, q) such that the ultraproduct (Πj∈JAj)/F can be embedded into the graph λ-model determined by (E, q).

slide-70
SLIDE 70

Final theorem.

Theorem

Let M be a closed term and M =

n>0 Mn be the set of all

regular mute λ-terms. Then there exists a graph model (E, q) such that (E, q) | = M = t for every t ∈ M.

slide-71
SLIDE 71

Final comments.

Our result is a first step on the investigation of subclasses of mute terms.

slide-72
SLIDE 72

Open questions.

◮ Are regular mute terms easy with respect to other kind of

models?

slide-73
SLIDE 73

Open questions.

◮ Are regular mute terms easy with respect to other kind of

models?

◮ Is the set of regular mute a maximal graph easy class?