computational semantics for dependent type theoriespbo/workshops/alcop2014/samson-abramsky.pdf ·...

156
Computational Semantics for Dependent Type Theories Samson Abramsky Department of Computer Science, University of Oxford Samson Abramsky (Department of Computer Science, University of Oxford) Computational Semantics for Dependent Type Theories 1 / 27

Upload: others

Post on 22-May-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Computational Semantics for Dependent Type Theories

Samson Abramsky

Department of Computer Science, University of Oxford

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 1 / 27

Page 2: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Motivation

HoTT is hot!!The HoTT book, IAS year, Awodey $7.5M grant, . . .

HoTT is essentially (intensional) Martin-Lof type theory with one new axiom.Much of the current energy and enthusiasm stems from the discovery of anew semantics in homotopy types.

Question 1:

Can we find a natural intensional computational semantics for HoTT/DTT?

Question 2:

Can we combine linear and dependent types?

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 2 / 27

Page 3: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Motivation

HoTT is hot!!

The HoTT book, IAS year, Awodey $7.5M grant, . . .

HoTT is essentially (intensional) Martin-Lof type theory with one new axiom.Much of the current energy and enthusiasm stems from the discovery of anew semantics in homotopy types.

Question 1:

Can we find a natural intensional computational semantics for HoTT/DTT?

Question 2:

Can we combine linear and dependent types?

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 2 / 27

Page 4: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Motivation

HoTT is hot!!The HoTT book, IAS year, Awodey $7.5M grant, . . .

HoTT is essentially (intensional) Martin-Lof type theory with one new axiom.Much of the current energy and enthusiasm stems from the discovery of anew semantics in homotopy types.

Question 1:

Can we find a natural intensional computational semantics for HoTT/DTT?

Question 2:

Can we combine linear and dependent types?

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 2 / 27

Page 5: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Motivation

HoTT is hot!!The HoTT book, IAS year, Awodey $7.5M grant, . . .

HoTT is essentially (intensional) Martin-Lof type theory with one new axiom.Much of the current energy and enthusiasm stems from the discovery of anew semantics in homotopy types.

Question 1:

Can we find a natural intensional computational semantics for HoTT/DTT?

Question 2:

Can we combine linear and dependent types?

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 2 / 27

Page 6: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Motivation

HoTT is hot!!The HoTT book, IAS year, Awodey $7.5M grant, . . .

HoTT is essentially (intensional) Martin-Lof type theory with one new axiom.Much of the current energy and enthusiasm stems from the discovery of anew semantics in homotopy types.

Question 1:

Can we find a natural intensional computational semantics for HoTT/DTT?

Question 2:

Can we combine linear and dependent types?

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 2 / 27

Page 7: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Motivation

HoTT is hot!!The HoTT book, IAS year, Awodey $7.5M grant, . . .

HoTT is essentially (intensional) Martin-Lof type theory with one new axiom.Much of the current energy and enthusiasm stems from the discovery of anew semantics in homotopy types.

Question 1:

Can we find a natural intensional computational semantics for HoTT/DTT?

Question 2:

Can we combine linear and dependent types?

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 2 / 27

Page 8: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage. What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 9: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage. What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 10: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage. What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 11: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage. What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 12: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage.

What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 13: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage. What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 14: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage. What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 15: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage. What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 16: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Sketch of a programme

Attempt to find a game semantics for HoTT (or DTT generally).

Joint work with Radha Jagadeesan, Kohei Kishida, Matthijs Vakar, NorihiroYamada.

Still in a preliminary stage. What we have so far:

A restricted form of linear DTT (MV, http://arxiv.org/abs/1405.0033)

A coherence space semantics (SA and MV, paper soon)

Progress towards a game semantics (RJ)

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 3 / 27

Page 17: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The Plan

Give a relaxed talk ,

Empasise ideas rather than technical details.

Firstly:

Why Games? Why Coherence Spaces?

Give a “native” intensional semantics coming from the computational side

Naturally linear, so points to the way to linear forms of dependent type theory

Computational/informatic content:

Information, time vs. Geometry, space

Can exploit techniques for building universal domains, solving “domainequations” (i.e. reflexive type equations).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 4 / 27

Page 18: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The Plan

Give a relaxed talk ,

Empasise ideas rather than technical details.

Firstly:

Why Games? Why Coherence Spaces?

Give a “native” intensional semantics coming from the computational side

Naturally linear, so points to the way to linear forms of dependent type theory

Computational/informatic content:

Information, time vs. Geometry, space

Can exploit techniques for building universal domains, solving “domainequations” (i.e. reflexive type equations).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 4 / 27

Page 19: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The Plan

Give a relaxed talk ,

Empasise ideas rather than technical details.

Firstly:

Why Games? Why Coherence Spaces?

Give a “native” intensional semantics coming from the computational side

Naturally linear, so points to the way to linear forms of dependent type theory

Computational/informatic content:

Information, time vs. Geometry, space

Can exploit techniques for building universal domains, solving “domainequations” (i.e. reflexive type equations).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 4 / 27

Page 20: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The Plan

Give a relaxed talk ,

Empasise ideas rather than technical details.

Firstly:

Why Games? Why Coherence Spaces?

Give a “native” intensional semantics coming from the computational side

Naturally linear, so points to the way to linear forms of dependent type theory

Computational/informatic content:

Information, time vs. Geometry, space

Can exploit techniques for building universal domains, solving “domainequations” (i.e. reflexive type equations).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 4 / 27

Page 21: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The Plan

Give a relaxed talk ,

Empasise ideas rather than technical details.

Firstly:

Why Games? Why Coherence Spaces?

Give a “native” intensional semantics coming from the computational side

Naturally linear, so points to the way to linear forms of dependent type theory

Computational/informatic content:

Information, time vs. Geometry, space

Can exploit techniques for building universal domains, solving “domainequations” (i.e. reflexive type equations).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 4 / 27

Page 22: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The Plan

Give a relaxed talk ,

Empasise ideas rather than technical details.

Firstly:

Why Games? Why Coherence Spaces?

Give a “native” intensional semantics coming from the computational side

Naturally linear, so points to the way to linear forms of dependent type theory

Computational/informatic content:

Information, time vs. Geometry, space

Can exploit techniques for building universal domains, solving “domainequations” (i.e. reflexive type equations).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 4 / 27

Page 23: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The Plan

Give a relaxed talk ,

Empasise ideas rather than technical details.

Firstly:

Why Games? Why Coherence Spaces?

Give a “native” intensional semantics coming from the computational side

Naturally linear, so points to the way to linear forms of dependent type theory

Computational/informatic content:

Information, time vs. Geometry, space

Can exploit techniques for building universal domains, solving “domainequations” (i.e. reflexive type equations).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 4 / 27

Page 24: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The Plan

Give a relaxed talk ,

Empasise ideas rather than technical details.

Firstly:

Why Games? Why Coherence Spaces?

Give a “native” intensional semantics coming from the computational side

Naturally linear, so points to the way to linear forms of dependent type theory

Computational/informatic content:

Information, time vs. Geometry, space

Can exploit techniques for building universal domains, solving “domainequations” (i.e. reflexive type equations).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 4 / 27

Page 25: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The ideas behind semantics

Not just a tool for metamathematics . . .

Examples:

Homotopy semantics for DTT gve rise to HoTT

Coherence space semantics gave rise to Linear Logic

Splitting the atom of computation, twice: a voyage through semantics

A basic setting: higher-order (partial) functions

Type 0: NType 1: N⇀ NType 2: [N⇀ N] ⇀ N

...

Functionals are not so unfamiliar: e.g. the quantifiers!

∀,∃ : [N→ B]→ B

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 5 / 27

Page 26: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The ideas behind semanticsNot just a tool for metamathematics . . .

Examples:

Homotopy semantics for DTT gve rise to HoTT

Coherence space semantics gave rise to Linear Logic

Splitting the atom of computation, twice: a voyage through semantics

A basic setting: higher-order (partial) functions

Type 0: NType 1: N⇀ NType 2: [N⇀ N] ⇀ N

...

Functionals are not so unfamiliar: e.g. the quantifiers!

∀,∃ : [N→ B]→ B

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 5 / 27

Page 27: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The ideas behind semanticsNot just a tool for metamathematics . . .

Examples:

Homotopy semantics for DTT gve rise to HoTT

Coherence space semantics gave rise to Linear Logic

Splitting the atom of computation, twice: a voyage through semantics

A basic setting: higher-order (partial) functions

Type 0: NType 1: N⇀ NType 2: [N⇀ N] ⇀ N

...

Functionals are not so unfamiliar: e.g. the quantifiers!

∀,∃ : [N→ B]→ B

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 5 / 27

Page 28: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The ideas behind semanticsNot just a tool for metamathematics . . .

Examples:

Homotopy semantics for DTT gve rise to HoTT

Coherence space semantics gave rise to Linear Logic

Splitting the atom of computation, twice: a voyage through semantics

A basic setting: higher-order (partial) functions

Type 0: NType 1: N⇀ NType 2: [N⇀ N] ⇀ N

...

Functionals are not so unfamiliar: e.g. the quantifiers!

∀,∃ : [N→ B]→ B

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 5 / 27

Page 29: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The ideas behind semanticsNot just a tool for metamathematics . . .

Examples:

Homotopy semantics for DTT gve rise to HoTT

Coherence space semantics gave rise to Linear Logic

Splitting the atom of computation, twice: a voyage through semantics

A basic setting: higher-order (partial) functions

Type 0: NType 1: N⇀ NType 2: [N⇀ N] ⇀ N

...

Functionals are not so unfamiliar: e.g. the quantifiers!

∀,∃ : [N→ B]→ B

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 5 / 27

Page 30: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The ideas behind semanticsNot just a tool for metamathematics . . .

Examples:

Homotopy semantics for DTT gve rise to HoTT

Coherence space semantics gave rise to Linear Logic

Splitting the atom of computation, twice: a voyage through semantics

A basic setting: higher-order (partial) functions

Type 0: NType 1: N⇀ NType 2: [N⇀ N] ⇀ N

...

Functionals are not so unfamiliar: e.g. the quantifiers!

∀,∃ : [N→ B]→ B

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 5 / 27

Page 31: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The ideas behind semanticsNot just a tool for metamathematics . . .

Examples:

Homotopy semantics for DTT gve rise to HoTT

Coherence space semantics gave rise to Linear Logic

Splitting the atom of computation, twice: a voyage through semantics

A basic setting: higher-order (partial) functions

Type 0: NType 1: N⇀ NType 2: [N⇀ N] ⇀ N

...

Functionals are not so unfamiliar: e.g. the quantifiers!

∀,∃ : [N→ B]→ B

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 5 / 27

Page 32: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The ideas behind semanticsNot just a tool for metamathematics . . .

Examples:

Homotopy semantics for DTT gve rise to HoTT

Coherence space semantics gave rise to Linear Logic

Splitting the atom of computation, twice: a voyage through semantics

A basic setting: higher-order (partial) functions

Type 0: NType 1: N⇀ NType 2: [N⇀ N] ⇀ N

...

Functionals are not so unfamiliar: e.g. the quantifiers!

∀,∃ : [N→ B]→ B

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 5 / 27

Page 33: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom I

Set-theoretically, higher-order functions are monsters.

E.g. F : [N⇀ N] ⇀ N is defined by its graph:

graph(F ) = {(f , n) | f ∈ dom(F )}

Each ordered pair in the graph may contain an infinite amount of information.

The first splitting: look at finite pieces of information.

Information tokens:

t := ({n1,m1), . . . , (nk ,mk)},m)

F |= t ≡ ∀f . [k∧

i=1

f (ni ) = mi ]→ F (f ) = m

F should be determined by the finite pieces of information itsatisfies.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 6 / 27

Page 34: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom ISet-theoretically, higher-order functions are monsters.

E.g. F : [N⇀ N] ⇀ N is defined by its graph:

graph(F ) = {(f , n) | f ∈ dom(F )}

Each ordered pair in the graph may contain an infinite amount of information.

The first splitting: look at finite pieces of information.

Information tokens:

t := ({n1,m1), . . . , (nk ,mk)},m)

F |= t ≡ ∀f . [k∧

i=1

f (ni ) = mi ]→ F (f ) = m

F should be determined by the finite pieces of information itsatisfies.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 6 / 27

Page 35: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom ISet-theoretically, higher-order functions are monsters.

E.g. F : [N⇀ N] ⇀ N is defined by its graph:

graph(F ) = {(f , n) | f ∈ dom(F )}

Each ordered pair in the graph may contain an infinite amount of information.

The first splitting: look at finite pieces of information.

Information tokens:

t := ({n1,m1), . . . , (nk ,mk)},m)

F |= t ≡ ∀f . [k∧

i=1

f (ni ) = mi ]→ F (f ) = m

F should be determined by the finite pieces of information itsatisfies.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 6 / 27

Page 36: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom ISet-theoretically, higher-order functions are monsters.

E.g. F : [N⇀ N] ⇀ N is defined by its graph:

graph(F ) = {(f , n) | f ∈ dom(F )}

Each ordered pair in the graph may contain an infinite amount of information.

The first splitting: look at finite pieces of information.

Information tokens:

t := ({n1,m1), . . . , (nk ,mk)},m)

F |= t ≡ ∀f . [k∧

i=1

f (ni ) = mi ]→ F (f ) = m

F should be determined by the finite pieces of information itsatisfies.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 6 / 27

Page 37: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom ISet-theoretically, higher-order functions are monsters.

E.g. F : [N⇀ N] ⇀ N is defined by its graph:

graph(F ) = {(f , n) | f ∈ dom(F )}

Each ordered pair in the graph may contain an infinite amount of information.

The first splitting: look at finite pieces of information.

Information tokens:

t := ({n1,m1), . . . , (nk ,mk)},m)

F |= t ≡ ∀f . [k∧

i=1

f (ni ) = mi ]→ F (f ) = m

F should be determined by the finite pieces of information itsatisfies.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 6 / 27

Page 38: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom ISet-theoretically, higher-order functions are monsters.

E.g. F : [N⇀ N] ⇀ N is defined by its graph:

graph(F ) = {(f , n) | f ∈ dom(F )}

Each ordered pair in the graph may contain an infinite amount of information.

The first splitting: look at finite pieces of information.

Information tokens:

t := ({n1,m1), . . . , (nk ,mk)},m)

F |= t ≡ ∀f . [k∧

i=1

f (ni ) = mi ]→ F (f ) = m

F should be determined by the finite pieces of information itsatisfies.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 6 / 27

Page 39: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Consequences

This idea induces a topology (the Scott topology) (Kleene, Kreisel, Nerode,Platek, . . . )

This leads to domain theory

Emphasis on finite pieces of information leads to Scott domains and theirrepresentation in terms of information systems.

Everything is represented in terms of tokens.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 7 / 27

Page 40: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Consequences

This idea induces a topology (the Scott topology) (Kleene, Kreisel, Nerode,Platek, . . . )

This leads to domain theory

Emphasis on finite pieces of information leads to Scott domains and theirrepresentation in terms of information systems.

Everything is represented in terms of tokens.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 7 / 27

Page 41: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Consequences

This idea induces a topology (the Scott topology) (Kleene, Kreisel, Nerode,Platek, . . . )

This leads to domain theory

Emphasis on finite pieces of information leads to Scott domains and theirrepresentation in terms of information systems.

Everything is represented in terms of tokens.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 7 / 27

Page 42: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Consequences

This idea induces a topology (the Scott topology) (Kleene, Kreisel, Nerode,Platek, . . . )

This leads to domain theory

Emphasis on finite pieces of information leads to Scott domains and theirrepresentation in terms of information systems.

Everything is represented in terms of tokens.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 7 / 27

Page 43: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Consequences

This idea induces a topology (the Scott topology) (Kleene, Kreisel, Nerode,Platek, . . . )

This leads to domain theory

Emphasis on finite pieces of information leads to Scott domains and theirrepresentation in terms of information systems.

Everything is represented in terms of tokens.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 7 / 27

Page 44: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The coherence space revolution

Gave birth to Linear Logic (Girard 1987).

A radically simple form of token-based finite information semantics.

So simple that:

It makes visible the linear decompositions of intuitionistic types

It allows classical dualities at the linear level

On the other hand, not closed under lifting!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 8 / 27

Page 45: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The coherence space revolution

Gave birth to Linear Logic (Girard 1987).

A radically simple form of token-based finite information semantics.

So simple that:

It makes visible the linear decompositions of intuitionistic types

It allows classical dualities at the linear level

On the other hand, not closed under lifting!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 8 / 27

Page 46: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The coherence space revolution

Gave birth to Linear Logic (Girard 1987).

A radically simple form of token-based finite information semantics.

So simple that:

It makes visible the linear decompositions of intuitionistic types

It allows classical dualities at the linear level

On the other hand, not closed under lifting!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 8 / 27

Page 47: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The coherence space revolution

Gave birth to Linear Logic (Girard 1987).

A radically simple form of token-based finite information semantics.

So simple that:

It makes visible the linear decompositions of intuitionistic types

It allows classical dualities at the linear level

On the other hand, not closed under lifting!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 8 / 27

Page 48: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The coherence space revolution

Gave birth to Linear Logic (Girard 1987).

A radically simple form of token-based finite information semantics.

So simple that:

It makes visible the linear decompositions of intuitionistic types

It allows classical dualities at the linear level

On the other hand, not closed under lifting!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 8 / 27

Page 49: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The coherence space revolution

Gave birth to Linear Logic (Girard 1987).

A radically simple form of token-based finite information semantics.

So simple that:

It makes visible the linear decompositions of intuitionistic types

It allows classical dualities at the linear level

On the other hand, not closed under lifting!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 8 / 27

Page 50: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

The coherence space revolution

Gave birth to Linear Logic (Girard 1987).

A radically simple form of token-based finite information semantics.

So simple that:

It makes visible the linear decompositions of intuitionistic types

It allows classical dualities at the linear level

On the other hand, not closed under lifting!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 8 / 27

Page 51: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Review of Coherence Spaces

The underlying structure of a coherence space is just an undirected reflexivegraph. The coherence space is then the set of cliques of the graph, ordered by setinclusion.

The novelty of coherence spaces lies in the constructions on reflexive graphs,which lead to a categorical model of full Classical Linear Logic — indeed, thismodel gave rise to Linear Logic.

Notation: (|X |, _X ). |X | is the set of tokens.

We write _ for the irreflexive part of _, ^ for the complement of _ (which isirreflexive), and _ for the complement of _.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 9 / 27

Page 52: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Review of Coherence Spaces

The underlying structure of a coherence space is just an undirected reflexivegraph. The coherence space is then the set of cliques of the graph, ordered by setinclusion.

The novelty of coherence spaces lies in the constructions on reflexive graphs,which lead to a categorical model of full Classical Linear Logic — indeed, thismodel gave rise to Linear Logic.

Notation: (|X |, _X ). |X | is the set of tokens.

We write _ for the irreflexive part of _, ^ for the complement of _ (which isirreflexive), and _ for the complement of _.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 9 / 27

Page 53: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Review of Coherence Spaces

The underlying structure of a coherence space is just an undirected reflexivegraph. The coherence space is then the set of cliques of the graph, ordered by setinclusion.

The novelty of coherence spaces lies in the constructions on reflexive graphs,which lead to a categorical model of full Classical Linear Logic — indeed, thismodel gave rise to Linear Logic.

Notation: (|X |, _X ). |X | is the set of tokens.

We write _ for the irreflexive part of _, ^ for the complement of _ (which isirreflexive), and _ for the complement of _.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 9 / 27

Page 54: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Review of Coherence Spaces

The underlying structure of a coherence space is just an undirected reflexivegraph. The coherence space is then the set of cliques of the graph, ordered by setinclusion.

The novelty of coherence spaces lies in the constructions on reflexive graphs,which lead to a categorical model of full Classical Linear Logic — indeed, thismodel gave rise to Linear Logic.

Notation: (|X |, _X ). |X | is the set of tokens.

We write _ for the irreflexive part of _, ^ for the complement of _ (which isirreflexive), and _ for the complement of _.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 9 / 27

Page 55: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Review of Coherence Spaces

The underlying structure of a coherence space is just an undirected reflexivegraph. The coherence space is then the set of cliques of the graph, ordered by setinclusion.

The novelty of coherence spaces lies in the constructions on reflexive graphs,which lead to a categorical model of full Classical Linear Logic — indeed, thismodel gave rise to Linear Logic.

Notation: (|X |, _X ). |X | is the set of tokens.

We write _ for the irreflexive part of _, ^ for the complement of _ (which isirreflexive), and _ for the complement of _.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 9 / 27

Page 56: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions on Coherence SpacesThe linear type constructions combine set-theoretic operations on the token setswith logical operations on the coherence relations.

Linear negationGiven a coherence space X , we define X⊥ with |X⊥| = |X |, and ^_X⊥ = _

^X .

Note that X⊥⊥ = X

MultiplicativesGiven coherence spaces X , Y :

|X ⊗ Y | = |XOY | = |X ( Y | := |X | × |Y |.

(a, b) ^_ (c , d) mod X ⊗ Y ≡ a^_ c mod X ∧ b ^_ d mod Y

(a, b) _ (c , d) mod XOY ≡ a_ c mod X ∨ b _ d mod Y

(a, b) _ (c , d) mod X(Y ≡ a^_ c mod X ⇒ b _ d mod Y

Note that XOY = (X⊥ ⊗ Y⊥)⊥, X ( Y = X⊥OY .

N.B. Interdefinabilities follow from propositional calculus!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 10 / 27

Page 57: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions on Coherence SpacesThe linear type constructions combine set-theoretic operations on the token setswith logical operations on the coherence relations.

Linear negationGiven a coherence space X , we define X⊥ with |X⊥| = |X |, and ^_X⊥ = _

^X .

Note that X⊥⊥ = X

MultiplicativesGiven coherence spaces X , Y :

|X ⊗ Y | = |XOY | = |X ( Y | := |X | × |Y |.

(a, b) ^_ (c , d) mod X ⊗ Y ≡ a^_ c mod X ∧ b ^_ d mod Y

(a, b) _ (c , d) mod XOY ≡ a_ c mod X ∨ b _ d mod Y

(a, b) _ (c , d) mod X(Y ≡ a^_ c mod X ⇒ b _ d mod Y

Note that XOY = (X⊥ ⊗ Y⊥)⊥, X ( Y = X⊥OY .

N.B. Interdefinabilities follow from propositional calculus!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 10 / 27

Page 58: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions on Coherence SpacesThe linear type constructions combine set-theoretic operations on the token setswith logical operations on the coherence relations.

Linear negationGiven a coherence space X , we define X⊥ with |X⊥| = |X |, and ^_X⊥ = _

^X .

Note that X⊥⊥ = X

MultiplicativesGiven coherence spaces X , Y :

|X ⊗ Y | = |XOY | = |X ( Y | := |X | × |Y |.

(a, b) ^_ (c , d) mod X ⊗ Y ≡ a^_ c mod X ∧ b ^_ d mod Y

(a, b) _ (c , d) mod XOY ≡ a_ c mod X ∨ b _ d mod Y

(a, b) _ (c , d) mod X(Y ≡ a^_ c mod X ⇒ b _ d mod Y

Note that XOY = (X⊥ ⊗ Y⊥)⊥, X ( Y = X⊥OY .

N.B. Interdefinabilities follow from propositional calculus!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 10 / 27

Page 59: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions on Coherence SpacesThe linear type constructions combine set-theoretic operations on the token setswith logical operations on the coherence relations.

Linear negationGiven a coherence space X , we define X⊥ with |X⊥| = |X |, and ^_X⊥ = _

^X .

Note that X⊥⊥ = X

MultiplicativesGiven coherence spaces X , Y :

|X ⊗ Y | = |XOY | = |X ( Y | := |X | × |Y |.

(a, b) ^_ (c , d) mod X ⊗ Y ≡ a^_ c mod X ∧ b ^_ d mod Y

(a, b) _ (c , d) mod XOY ≡ a_ c mod X ∨ b _ d mod Y

(a, b) _ (c , d) mod X(Y ≡ a^_ c mod X ⇒ b _ d mod Y

Note that XOY = (X⊥ ⊗ Y⊥)⊥, X ( Y = X⊥OY .

N.B. Interdefinabilities follow from propositional calculus!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 10 / 27

Page 60: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions on Coherence SpacesThe linear type constructions combine set-theoretic operations on the token setswith logical operations on the coherence relations.

Linear negationGiven a coherence space X , we define X⊥ with |X⊥| = |X |, and ^_X⊥ = _

^X .

Note that X⊥⊥ = X

MultiplicativesGiven coherence spaces X , Y :

|X ⊗ Y | = |XOY | = |X ( Y | := |X | × |Y |.

(a, b) ^_ (c , d) mod X ⊗ Y ≡ a^_ c mod X ∧ b ^_ d mod Y

(a, b) _ (c , d) mod XOY ≡ a_ c mod X ∨ b _ d mod Y

(a, b) _ (c , d) mod X(Y ≡ a^_ c mod X ⇒ b _ d mod Y

Note that XOY = (X⊥ ⊗ Y⊥)⊥, X ( Y = X⊥OY .

N.B. Interdefinabilities follow from propositional calculus!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 10 / 27

Page 61: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions ctd

Additives Given coherence spaces X , Y :

|X ⊕ Y | = |XNY | := |X |+ |Y |.

We represent the disjoint union |X |+ |Y | concretely as X × {0} ∪ Y × {1}.

(a, i) ^_ (b, j) mod X ⊕ Y ≡ i = j ∧ a^_ b mod Zi

(a, i) _ (b, j) mod XNY ≡ i = j ⇒ a _ b mod Zi

where Z0 = X and Z1 = Y .

Note that XNY = (X⊥ ⊕ Y⊥)⊥.

Exponentials Given a coherence space X , we define

|!X | = Xfin

x ^_ y mod !X ≡ x ∪ y ∈ X .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 11 / 27

Page 62: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions ctd

Additives Given coherence spaces X , Y :

|X ⊕ Y | = |XNY | := |X |+ |Y |.

We represent the disjoint union |X |+ |Y | concretely as X × {0} ∪ Y × {1}.

(a, i) ^_ (b, j) mod X ⊕ Y ≡ i = j ∧ a^_ b mod Zi

(a, i) _ (b, j) mod XNY ≡ i = j ⇒ a _ b mod Zi

where Z0 = X and Z1 = Y .

Note that XNY = (X⊥ ⊕ Y⊥)⊥.

Exponentials Given a coherence space X , we define

|!X | = Xfin

x ^_ y mod !X ≡ x ∪ y ∈ X .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 11 / 27

Page 63: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions ctd

Additives Given coherence spaces X , Y :

|X ⊕ Y | = |XNY | := |X |+ |Y |.

We represent the disjoint union |X |+ |Y | concretely as X × {0} ∪ Y × {1}.

(a, i) ^_ (b, j) mod X ⊕ Y ≡ i = j ∧ a^_ b mod Zi

(a, i) _ (b, j) mod XNY ≡ i = j ⇒ a _ b mod Zi

where Z0 = X and Z1 = Y .

Note that XNY = (X⊥ ⊕ Y⊥)⊥.

Exponentials Given a coherence space X , we define

|!X | = Xfin

x ^_ y mod !X ≡ x ∪ y ∈ X .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 11 / 27

Page 64: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Linear Type Constructions ctd

Additives Given coherence spaces X , Y :

|X ⊕ Y | = |XNY | := |X |+ |Y |.

We represent the disjoint union |X |+ |Y | concretely as X × {0} ∪ Y × {1}.

(a, i) ^_ (b, j) mod X ⊕ Y ≡ i = j ∧ a^_ b mod Zi

(a, i) _ (b, j) mod XNY ≡ i = j ⇒ a _ b mod Zi

where Z0 = X and Z1 = Y .

Note that XNY = (X⊥ ⊕ Y⊥)⊥.

Exponentials Given a coherence space X , we define

|!X | = Xfin

x ^_ y mod !X ≡ x ∪ y ∈ X .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 11 / 27

Page 65: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Stable functions and traces

We recall that a function f : X → Y is stable if it is monotone, and preservesdirected unions and pull-backs.

Proposition

A monotone and continuous function f : X → Y is stable if and only if, wheneverb ∈ f (x) for x ∈ X , there exists a finite clique s ⊆ x such that b ∈ f (s), andmoreover for all s ′ ⊆ x such that b ∈ f (s ′), s ⊆ s ′.

We define the trace of a stable function:

Tr(f ) := {(s, b) ∈ Xfin × |Y | | b ∈ f (s) ∧ ∀s ′ ⊆ s. b ∈ f (s ′) ⇒ s ′ = s}.

Proposition

A stable function can be uniquely recovered from its trace:

f (x) = {b | ∃(s, b) ∈ Tr(f ). s ⊆ x}.

The trace defines a bijection between stable functions f : X → Y and the pointsof the coherence space X ⇒ Y := !X ( Y .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 12 / 27

Page 66: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Stable functions and tracesWe recall that a function f : X → Y is stable if it is monotone, and preservesdirected unions and pull-backs.

Proposition

A monotone and continuous function f : X → Y is stable if and only if, wheneverb ∈ f (x) for x ∈ X , there exists a finite clique s ⊆ x such that b ∈ f (s), andmoreover for all s ′ ⊆ x such that b ∈ f (s ′), s ⊆ s ′.

We define the trace of a stable function:

Tr(f ) := {(s, b) ∈ Xfin × |Y | | b ∈ f (s) ∧ ∀s ′ ⊆ s. b ∈ f (s ′) ⇒ s ′ = s}.

Proposition

A stable function can be uniquely recovered from its trace:

f (x) = {b | ∃(s, b) ∈ Tr(f ). s ⊆ x}.

The trace defines a bijection between stable functions f : X → Y and the pointsof the coherence space X ⇒ Y := !X ( Y .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 12 / 27

Page 67: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Stable functions and tracesWe recall that a function f : X → Y is stable if it is monotone, and preservesdirected unions and pull-backs.

Proposition

A monotone and continuous function f : X → Y is stable if and only if, wheneverb ∈ f (x) for x ∈ X , there exists a finite clique s ⊆ x such that b ∈ f (s), andmoreover for all s ′ ⊆ x such that b ∈ f (s ′), s ⊆ s ′.

We define the trace of a stable function:

Tr(f ) := {(s, b) ∈ Xfin × |Y | | b ∈ f (s) ∧ ∀s ′ ⊆ s. b ∈ f (s ′) ⇒ s ′ = s}.

Proposition

A stable function can be uniquely recovered from its trace:

f (x) = {b | ∃(s, b) ∈ Tr(f ). s ⊆ x}.

The trace defines a bijection between stable functions f : X → Y and the pointsof the coherence space X ⇒ Y := !X ( Y .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 12 / 27

Page 68: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Stable functions and tracesWe recall that a function f : X → Y is stable if it is monotone, and preservesdirected unions and pull-backs.

Proposition

A monotone and continuous function f : X → Y is stable if and only if, wheneverb ∈ f (x) for x ∈ X , there exists a finite clique s ⊆ x such that b ∈ f (s), andmoreover for all s ′ ⊆ x such that b ∈ f (s ′), s ⊆ s ′.

We define the trace of a stable function:

Tr(f ) := {(s, b) ∈ Xfin × |Y | | b ∈ f (s) ∧ ∀s ′ ⊆ s. b ∈ f (s ′) ⇒ s ′ = s}.

Proposition

A stable function can be uniquely recovered from its trace:

f (x) = {b | ∃(s, b) ∈ Tr(f ). s ⊆ x}.

The trace defines a bijection between stable functions f : X → Y and the pointsof the coherence space X ⇒ Y := !X ( Y .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 12 / 27

Page 69: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Stable functions and tracesWe recall that a function f : X → Y is stable if it is monotone, and preservesdirected unions and pull-backs.

Proposition

A monotone and continuous function f : X → Y is stable if and only if, wheneverb ∈ f (x) for x ∈ X , there exists a finite clique s ⊆ x such that b ∈ f (s), andmoreover for all s ′ ⊆ x such that b ∈ f (s ′), s ⊆ s ′.

We define the trace of a stable function:

Tr(f ) := {(s, b) ∈ Xfin × |Y | | b ∈ f (s) ∧ ∀s ′ ⊆ s. b ∈ f (s ′) ⇒ s ′ = s}.

Proposition

A stable function can be uniquely recovered from its trace:

f (x) = {b | ∃(s, b) ∈ Tr(f ). s ⊆ x}.

The trace defines a bijection between stable functions f : X → Y and the pointsof the coherence space X ⇒ Y := !X ( Y .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 12 / 27

Page 70: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom II: Games

Consider a token such as ({(3, 2), (4, 3)}, 1).

Many possible “schedules” for realising such a token as a process. E.g.

( N ⇒ N ) ⇒ N

q

q

q

3

2

q

q

4

3

1

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 13 / 27

Page 71: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom II: GamesConsider a token such as ({(3, 2), (4, 3)}, 1).

Many possible “schedules” for realising such a token as a process. E.g.

( N ⇒ N ) ⇒ N

q

q

q

3

2

q

q

4

3

1

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 13 / 27

Page 72: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom II: GamesConsider a token such as ({(3, 2), (4, 3)}, 1).

Many possible “schedules” for realising such a token as a process.

E.g.

( N ⇒ N ) ⇒ N

q

q

q

3

2

q

q

4

3

1

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 13 / 27

Page 73: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Splitting the Atom II: GamesConsider a token such as ({(3, 2), (4, 3)}, 1).

Many possible “schedules” for realising such a token as a process. E.g.

( N ⇒ N ) ⇒ N

q

q

q

3

2

q

q

4

3

1Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 13 / 27

Page 74: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 75: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 76: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 77: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 78: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 79: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability.

E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 80: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 81: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 82: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 83: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 84: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Coherence spaces as a collapse of game semantics

Forgetful map from schedules — i.e. plays in a game semantics — to tokens.

Game semantics decomposes information tokens into finer structures.

New subtleties arise:

Partial tokens

Sequential definability. E.g. consider composition.

New possibilities also arise:

Full abstraction and full completeness

Compositional model-checking

So we view the coherence space semantics as a stepping stone to a gamesemantics.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 14 / 27

Page 85: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 86: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 87: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).

Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 88: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 89: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 90: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 91: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 92: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 93: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Type Theory

Key ideas (over and above simple propositional type theories):

Types depending on values of other types (syntactically, on terms).Thus no clean separation between syntax of types and terms; and order incontexts is important!

Identity types.

Universes.

Judgement forms:

` Γ ctxt Γ is a valid context

Γ ` σ type σ is a type in context Γ

Γ ` M : σ M is a term of type σ in context Γ

Plus equality judgements for contexts, types and terms.

Too many rules!

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 15 / 27

Page 94: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Context FormationRules for context formation:

3 ctxt

Γ ` σ type

Γ, x : σ ctxt

Note the mutual recursion between type and context formation.

A useful intuition:In interpreting the simply-typed λ-calculus in a cartesian closed category, weinterpret the comma in contexts as a product, and the turnstile in typingjudgements as function space. Thus a type judgement

A1, . . . ,An ` t : A

is interpreted as a morphism

f : A1 × · · · × An → A.

In interpreting dependent types, we should interpret the comma in contexts as adependent sum, and the turnstile as a dependent product. This is the appropriateway to think of dependent type families.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 16 / 27

Page 95: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Context FormationRules for context formation:

3 ctxt

Γ ` σ type

Γ, x : σ ctxt

Note the mutual recursion between type and context formation.

A useful intuition:In interpreting the simply-typed λ-calculus in a cartesian closed category, weinterpret the comma in contexts as a product, and the turnstile in typingjudgements as function space. Thus a type judgement

A1, . . . ,An ` t : A

is interpreted as a morphism

f : A1 × · · · × An → A.

In interpreting dependent types, we should interpret the comma in contexts as adependent sum, and the turnstile as a dependent product. This is the appropriateway to think of dependent type families.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 16 / 27

Page 96: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Context FormationRules for context formation:

3 ctxt

Γ ` σ type

Γ, x : σ ctxt

Note the mutual recursion between type and context formation.

A useful intuition:In interpreting the simply-typed λ-calculus in a cartesian closed category, weinterpret the comma in contexts as a product, and the turnstile in typingjudgements as function space. Thus a type judgement

A1, . . . ,An ` t : A

is interpreted as a morphism

f : A1 × · · · × An → A.

In interpreting dependent types, we should interpret the comma in contexts as adependent sum, and the turnstile as a dependent product. This is the appropriateway to think of dependent type families.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 16 / 27

Page 97: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Context FormationRules for context formation:

3 ctxt

Γ ` σ type

Γ, x : σ ctxt

Note the mutual recursion between type and context formation.

A useful intuition:In interpreting the simply-typed λ-calculus in a cartesian closed category, weinterpret the comma in contexts as a product, and the turnstile in typingjudgements as function space. Thus a type judgement

A1, . . . ,An ` t : A

is interpreted as a morphism

f : A1 × · · · × An → A.

In interpreting dependent types, we should interpret the comma in contexts as adependent sum, and the turnstile as a dependent product. This is the appropriateway to think of dependent type families.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 16 / 27

Page 98: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Sums and Products

Same type formation rules:

Γ ` σ type Γ, x : σ ` τ type

Γ ` Πx : σ.τ type

Γ ` σ type Γ, x : σ ` τ type

Γ ` Σx : σ.τ type

The introduction rules:

Γ, x : σ ` M : τ

Γ ` λx : σ.M : Πx : σ.τ

Γ ` M : σ Γ ` N : τ [M/x ]

Γ ` Pair(M,N) : Σx : σ.τ

The “canonical elements” of these types are those given by the introduction rules.

The elimination rules give application and projections respectively.

The equality rules give the usual β-conversions.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 17 / 27

Page 99: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Sums and Products

Same type formation rules:

Γ ` σ type Γ, x : σ ` τ type

Γ ` Πx : σ.τ type

Γ ` σ type Γ, x : σ ` τ type

Γ ` Σx : σ.τ type

The introduction rules:

Γ, x : σ ` M : τ

Γ ` λx : σ.M : Πx : σ.τ

Γ ` M : σ Γ ` N : τ [M/x ]

Γ ` Pair(M,N) : Σx : σ.τ

The “canonical elements” of these types are those given by the introduction rules.

The elimination rules give application and projections respectively.

The equality rules give the usual β-conversions.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 17 / 27

Page 100: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Sums and Products

Same type formation rules:

Γ ` σ type Γ, x : σ ` τ type

Γ ` Πx : σ.τ type

Γ ` σ type Γ, x : σ ` τ type

Γ ` Σx : σ.τ type

The introduction rules:

Γ, x : σ ` M : τ

Γ ` λx : σ.M : Πx : σ.τ

Γ ` M : σ Γ ` N : τ [M/x ]

Γ ` Pair(M,N) : Σx : σ.τ

The “canonical elements” of these types are those given by the introduction rules.

The elimination rules give application and projections respectively.

The equality rules give the usual β-conversions.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 17 / 27

Page 101: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Sums and Products

Same type formation rules:

Γ ` σ type Γ, x : σ ` τ type

Γ ` Πx : σ.τ type

Γ ` σ type Γ, x : σ ` τ type

Γ ` Σx : σ.τ type

The introduction rules:

Γ, x : σ ` M : τ

Γ ` λx : σ.M : Πx : σ.τ

Γ ` M : σ Γ ` N : τ [M/x ]

Γ ` Pair(M,N) : Σx : σ.τ

The “canonical elements” of these types are those given by the introduction rules.

The elimination rules give application and projections respectively.

The equality rules give the usual β-conversions.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 17 / 27

Page 102: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Sums and Products

Same type formation rules:

Γ ` σ type Γ, x : σ ` τ type

Γ ` Πx : σ.τ type

Γ ` σ type Γ, x : σ ` τ type

Γ ` Σx : σ.τ type

The introduction rules:

Γ, x : σ ` M : τ

Γ ` λx : σ.M : Πx : σ.τ

Γ ` M : σ Γ ` N : τ [M/x ]

Γ ` Pair(M,N) : Σx : σ.τ

The “canonical elements” of these types are those given by the introduction rules.

The elimination rules give application and projections respectively.

The equality rules give the usual β-conversions.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 17 / 27

Page 103: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent Sums and Products

Same type formation rules:

Γ ` σ type Γ, x : σ ` τ type

Γ ` Πx : σ.τ type

Γ ` σ type Γ, x : σ ` τ type

Γ ` Σx : σ.τ type

The introduction rules:

Γ, x : σ ` M : τ

Γ ` λx : σ.M : Πx : σ.τ

Γ ` M : σ Γ ` N : τ [M/x ]

Γ ` Pair(M,N) : Σx : σ.τ

The “canonical elements” of these types are those given by the introduction rules.

The elimination rules give application and projections respectively.

The equality rules give the usual β-conversions.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 17 / 27

Page 104: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity Types

Formation:Γ ` M : σ Γ ` N : σ

Γ ` Idσ(M,N) type

Introduction:Γ ` M : σ

Γ ` Reflσ(M) : Idσ(M,M)

The reflexivity terms are the canonical elements.

But in the intensional theory, there can be many other elements.

The homotopy interpretation: paths!i.e. witnesses giving ways in which one object can be transformed into another.

Gives a completely new, positive way of thinking about intensional identity types.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 18 / 27

Page 105: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity Types

Formation:Γ ` M : σ Γ ` N : σ

Γ ` Idσ(M,N) type

Introduction:Γ ` M : σ

Γ ` Reflσ(M) : Idσ(M,M)

The reflexivity terms are the canonical elements.

But in the intensional theory, there can be many other elements.

The homotopy interpretation: paths!i.e. witnesses giving ways in which one object can be transformed into another.

Gives a completely new, positive way of thinking about intensional identity types.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 18 / 27

Page 106: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity Types

Formation:Γ ` M : σ Γ ` N : σ

Γ ` Idσ(M,N) type

Introduction:Γ ` M : σ

Γ ` Reflσ(M) : Idσ(M,M)

The reflexivity terms are the canonical elements.

But in the intensional theory, there can be many other elements.

The homotopy interpretation: paths!i.e. witnesses giving ways in which one object can be transformed into another.

Gives a completely new, positive way of thinking about intensional identity types.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 18 / 27

Page 107: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity Types

Formation:Γ ` M : σ Γ ` N : σ

Γ ` Idσ(M,N) type

Introduction:Γ ` M : σ

Γ ` Reflσ(M) : Idσ(M,M)

The reflexivity terms are the canonical elements.

But in the intensional theory, there can be many other elements.

The homotopy interpretation: paths!i.e. witnesses giving ways in which one object can be transformed into another.

Gives a completely new, positive way of thinking about intensional identity types.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 18 / 27

Page 108: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity Types

Formation:Γ ` M : σ Γ ` N : σ

Γ ` Idσ(M,N) type

Introduction:Γ ` M : σ

Γ ` Reflσ(M) : Idσ(M,M)

The reflexivity terms are the canonical elements.

But in the intensional theory, there can be many other elements.

The homotopy interpretation: paths!i.e. witnesses giving ways in which one object can be transformed into another.

Gives a completely new, positive way of thinking about intensional identity types.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 18 / 27

Page 109: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity Types

Formation:Γ ` M : σ Γ ` N : σ

Γ ` Idσ(M,N) type

Introduction:Γ ` M : σ

Γ ` Reflσ(M) : Idσ(M,M)

The reflexivity terms are the canonical elements.

But in the intensional theory, there can be many other elements.

The homotopy interpretation: paths!

i.e. witnesses giving ways in which one object can be transformed into another.

Gives a completely new, positive way of thinking about intensional identity types.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 18 / 27

Page 110: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity Types

Formation:Γ ` M : σ Γ ` N : σ

Γ ` Idσ(M,N) type

Introduction:Γ ` M : σ

Γ ` Reflσ(M) : Idσ(M,M)

The reflexivity terms are the canonical elements.

But in the intensional theory, there can be many other elements.

The homotopy interpretation: paths!i.e. witnesses giving ways in which one object can be transformed into another.

Gives a completely new, positive way of thinking about intensional identity types.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 18 / 27

Page 111: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity Types

Formation:Γ ` M : σ Γ ` N : σ

Γ ` Idσ(M,N) type

Introduction:Γ ` M : σ

Γ ` Reflσ(M) : Idσ(M,M)

The reflexivity terms are the canonical elements.

But in the intensional theory, there can be many other elements.

The homotopy interpretation: paths!i.e. witnesses giving ways in which one object can be transformed into another.

Gives a completely new, positive way of thinking about intensional identity types.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 18 / 27

Page 112: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards a coherence space semantics

It is useful to define the extended trace, which gives minimum data points forfinite outputs:

Tr∗(f ) := {(s, t) ∈ Xfin × Yfin | t ⊆ f (s) ∧ ∀s ′ ⊆ s. t ⊆ f (s ′) ⇒ s ′ = s}.

Note that this extended trace can be derived from the basic version:

(s, {b1, . . . , bn}) ∈ Tr∗(f ) ⇐⇒ s =n⋃

i=1

si ∧ (si , bi ) ∈ Tr(f ), i = 1, . . . , n.

We shall show how to construct a category with families, a standard notion ofsemantics for DTT, based on coherence spaces.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 19 / 27

Page 113: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards a coherence space semantics

It is useful to define the extended trace, which gives minimum data points forfinite outputs:

Tr∗(f ) := {(s, t) ∈ Xfin × Yfin | t ⊆ f (s) ∧ ∀s ′ ⊆ s. t ⊆ f (s ′) ⇒ s ′ = s}.

Note that this extended trace can be derived from the basic version:

(s, {b1, . . . , bn}) ∈ Tr∗(f ) ⇐⇒ s =n⋃

i=1

si ∧ (si , bi ) ∈ Tr(f ), i = 1, . . . , n.

We shall show how to construct a category with families, a standard notion ofsemantics for DTT, based on coherence spaces.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 19 / 27

Page 114: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards a coherence space semantics

It is useful to define the extended trace, which gives minimum data points forfinite outputs:

Tr∗(f ) := {(s, t) ∈ Xfin × Yfin | t ⊆ f (s) ∧ ∀s ′ ⊆ s. t ⊆ f (s ′) ⇒ s ′ = s}.

Note that this extended trace can be derived from the basic version:

(s, {b1, . . . , bn}) ∈ Tr∗(f ) ⇐⇒ s =n⋃

i=1

si ∧ (si , bi ) ∈ Tr(f ), i = 1, . . . , n.

We shall show how to construct a category with families, a standard notion ofsemantics for DTT, based on coherence spaces.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 19 / 27

Page 115: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards a coherence space semantics

It is useful to define the extended trace, which gives minimum data points forfinite outputs:

Tr∗(f ) := {(s, t) ∈ Xfin × Yfin | t ⊆ f (s) ∧ ∀s ′ ⊆ s. t ⊆ f (s ′) ⇒ s ′ = s}.

Note that this extended trace can be derived from the basic version:

(s, {b1, . . . , bn}) ∈ Tr∗(f ) ⇐⇒ s =n⋃

i=1

si ∧ (si , bi ) ∈ Tr(f ), i = 1, . . . , n.

We shall show how to construct a category with families, a standard notion ofsemantics for DTT, based on coherence spaces.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 19 / 27

Page 116: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Parameterizations

We define an order relation on coherence spaces:

X � Y ≡ |X | ⊆ |Y | ∧ ^_

X = ^_

Y ∩ |X |2.

This yields a large cpo (Coh,�) on the class of coherence spaces. This cpo isalgebraic, since every graph is the directed union of its finite sub-graphs, and haspull-backs.

A parameterization on a coherence space X is a stable, continuous functionF : X → Coh. We write Par(X ) for the set of parameterizations on X .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 20 / 27

Page 117: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Parameterizations

We define an order relation on coherence spaces:

X � Y ≡ |X | ⊆ |Y | ∧ ^_

X = ^_

Y ∩ |X |2.

This yields a large cpo (Coh,�) on the class of coherence spaces. This cpo isalgebraic, since every graph is the directed union of its finite sub-graphs, and haspull-backs.

A parameterization on a coherence space X is a stable, continuous functionF : X → Coh. We write Par(X ) for the set of parameterizations on X .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 20 / 27

Page 118: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Parameterizations

We define an order relation on coherence spaces:

X � Y ≡ |X | ⊆ |Y | ∧ ^_

X = ^_

Y ∩ |X |2.

This yields a large cpo (Coh,�) on the class of coherence spaces. This cpo isalgebraic, since every graph is the directed union of its finite sub-graphs, and haspull-backs.

A parameterization on a coherence space X is a stable, continuous functionF : X → Coh. We write Par(X ) for the set of parameterizations on X .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 20 / 27

Page 119: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Parameterizations

We define an order relation on coherence spaces:

X � Y ≡ |X | ⊆ |Y | ∧ ^_

X = ^_

Y ∩ |X |2.

This yields a large cpo (Coh,�) on the class of coherence spaces. This cpo isalgebraic, since every graph is the directed union of its finite sub-graphs, and haspull-backs.

A parameterization on a coherence space X is a stable, continuous functionF : X → Coh. We write Par(X ) for the set of parameterizations on X .

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 20 / 27

Page 120: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent sums and products of coherence spaces

We now define constructions on coherence spaces corresponding to dependentsums and products.

Given F ∈ Par(X ), we define:

|Σ(X ,F )| := {(s, u) | s ∈ Xfin, u ∈ F (s)fin},

(s, u) _ (t, v) mod Σ(X ,F ) ≡ s ∪ t ∈ X ∧ u ∪ v ∈ F (s ∪ t).

Given F ∈ Par(X ), we define the extended trace of F :

Tr∗(F ) := {(s, t) | s ∈ Xfin, b ∈ F (s)fin, ∀s ′ ⊆ s. t ∈ F (s ′)fin ⇒ s ′ = s}.

We define|Π(X ,F )| := Tr∗(F ),

(s, u) _ (t, v) mod Π(X ,F ) ≡ s ∪ t ∈ X ⇒ u ∪ v ∈ F (s ∪ t).

Suppose that F is constant. Define Y := F (∅). Then

Π(X ,F ) = X ⇒ Y , Σ(X ,F ) = !X⊗!Y ∼= !(XNY ).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 21 / 27

Page 121: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent sums and products of coherence spacesWe now define constructions on coherence spaces corresponding to dependentsums and products.

Given F ∈ Par(X ), we define:

|Σ(X ,F )| := {(s, u) | s ∈ Xfin, u ∈ F (s)fin},

(s, u) _ (t, v) mod Σ(X ,F ) ≡ s ∪ t ∈ X ∧ u ∪ v ∈ F (s ∪ t).

Given F ∈ Par(X ), we define the extended trace of F :

Tr∗(F ) := {(s, t) | s ∈ Xfin, b ∈ F (s)fin, ∀s ′ ⊆ s. t ∈ F (s ′)fin ⇒ s ′ = s}.

We define|Π(X ,F )| := Tr∗(F ),

(s, u) _ (t, v) mod Π(X ,F ) ≡ s ∪ t ∈ X ⇒ u ∪ v ∈ F (s ∪ t).

Suppose that F is constant. Define Y := F (∅). Then

Π(X ,F ) = X ⇒ Y , Σ(X ,F ) = !X⊗!Y ∼= !(XNY ).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 21 / 27

Page 122: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent sums and products of coherence spacesWe now define constructions on coherence spaces corresponding to dependentsums and products.

Given F ∈ Par(X ), we define:

|Σ(X ,F )| := {(s, u) | s ∈ Xfin, u ∈ F (s)fin},

(s, u) _ (t, v) mod Σ(X ,F ) ≡ s ∪ t ∈ X ∧ u ∪ v ∈ F (s ∪ t).

Given F ∈ Par(X ), we define the extended trace of F :

Tr∗(F ) := {(s, t) | s ∈ Xfin, b ∈ F (s)fin, ∀s ′ ⊆ s. t ∈ F (s ′)fin ⇒ s ′ = s}.

We define|Π(X ,F )| := Tr∗(F ),

(s, u) _ (t, v) mod Π(X ,F ) ≡ s ∪ t ∈ X ⇒ u ∪ v ∈ F (s ∪ t).

Suppose that F is constant. Define Y := F (∅). Then

Π(X ,F ) = X ⇒ Y , Σ(X ,F ) = !X⊗!Y ∼= !(XNY ).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 21 / 27

Page 123: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent sums and products of coherence spacesWe now define constructions on coherence spaces corresponding to dependentsums and products.

Given F ∈ Par(X ), we define:

|Σ(X ,F )| := {(s, u) | s ∈ Xfin, u ∈ F (s)fin},

(s, u) _ (t, v) mod Σ(X ,F ) ≡ s ∪ t ∈ X ∧ u ∪ v ∈ F (s ∪ t).

Given F ∈ Par(X ), we define the extended trace of F :

Tr∗(F ) := {(s, t) | s ∈ Xfin, b ∈ F (s)fin, ∀s ′ ⊆ s. t ∈ F (s ′)fin ⇒ s ′ = s}.

We define|Π(X ,F )| := Tr∗(F ),

(s, u) _ (t, v) mod Π(X ,F ) ≡ s ∪ t ∈ X ⇒ u ∪ v ∈ F (s ∪ t).

Suppose that F is constant. Define Y := F (∅). Then

Π(X ,F ) = X ⇒ Y , Σ(X ,F ) = !X⊗!Y ∼= !(XNY ).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 21 / 27

Page 124: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent sums and products of coherence spacesWe now define constructions on coherence spaces corresponding to dependentsums and products.

Given F ∈ Par(X ), we define:

|Σ(X ,F )| := {(s, u) | s ∈ Xfin, u ∈ F (s)fin},

(s, u) _ (t, v) mod Σ(X ,F ) ≡ s ∪ t ∈ X ∧ u ∪ v ∈ F (s ∪ t).

Given F ∈ Par(X ), we define the extended trace of F :

Tr∗(F ) := {(s, t) | s ∈ Xfin, b ∈ F (s)fin, ∀s ′ ⊆ s. t ∈ F (s ′)fin ⇒ s ′ = s}.

We define|Π(X ,F )| := Tr∗(F ),

(s, u) _ (t, v) mod Π(X ,F ) ≡ s ∪ t ∈ X ⇒ u ∪ v ∈ F (s ∪ t).

Suppose that F is constant. Define Y := F (∅). Then

Π(X ,F ) = X ⇒ Y , Σ(X ,F ) = !X⊗!Y ∼= !(XNY ).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 21 / 27

Page 125: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Dependent sums and products of coherence spacesWe now define constructions on coherence spaces corresponding to dependentsums and products.

Given F ∈ Par(X ), we define:

|Σ(X ,F )| := {(s, u) | s ∈ Xfin, u ∈ F (s)fin},

(s, u) _ (t, v) mod Σ(X ,F ) ≡ s ∪ t ∈ X ∧ u ∪ v ∈ F (s ∪ t).

Given F ∈ Par(X ), we define the extended trace of F :

Tr∗(F ) := {(s, t) | s ∈ Xfin, b ∈ F (s)fin, ∀s ′ ⊆ s. t ∈ F (s ′)fin ⇒ s ′ = s}.

We define|Π(X ,F )| := Tr∗(F ),

(s, u) _ (t, v) mod Π(X ,F ) ≡ s ∪ t ∈ X ⇒ u ∪ v ∈ F (s ∪ t).

Suppose that F is constant. Define Y := F (∅). Then

Π(X ,F ) = X ⇒ Y , Σ(X ,F ) = !X⊗!Y ∼= !(XNY ).

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 21 / 27

Page 126: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A Category with Families based on Coherence Spaces

We take the category of contexts C to be the category of coherence spacesand stable maps.For each coherence space X , we set Ty(X ) := Par(X ). Given F ∈ Par(X ),we set Tm(X ,F ) := Π(A,F ).For the functorial action on types, given a stable map f : X → Y , andF ∈ Par(Y ), we define F{f } ∈ Par(X ) by:

F{f } = F ◦ f .For the functorial action on terms, given f : X → Y , and t ∈ Π(Y ,F ), wedefine

t{f } := t ◦ f ∈ Π(X ,F{f }).The empty context is the terminal object > in C.Context extension is defined using the dependent sum construction. IfF ∈ Par(X ), then we define

X .F := Σ(X ,F ).

The projection morphism pF : X .F → X is the first projection Σ(X ,F )→ Xwhose trace is given by:

{({(s, u)}, a) | (s, u) ∈ |Σ(X ,F )|, a ∈ s}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 22 / 27

Page 127: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A Category with Families based on Coherence SpacesWe take the category of contexts C to be the category of coherence spacesand stable maps.

For each coherence space X , we set Ty(X ) := Par(X ). Given F ∈ Par(X ),we set Tm(X ,F ) := Π(A,F ).For the functorial action on types, given a stable map f : X → Y , andF ∈ Par(Y ), we define F{f } ∈ Par(X ) by:

F{f } = F ◦ f .For the functorial action on terms, given f : X → Y , and t ∈ Π(Y ,F ), wedefine

t{f } := t ◦ f ∈ Π(X ,F{f }).The empty context is the terminal object > in C.Context extension is defined using the dependent sum construction. IfF ∈ Par(X ), then we define

X .F := Σ(X ,F ).

The projection morphism pF : X .F → X is the first projection Σ(X ,F )→ Xwhose trace is given by:

{({(s, u)}, a) | (s, u) ∈ |Σ(X ,F )|, a ∈ s}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 22 / 27

Page 128: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A Category with Families based on Coherence SpacesWe take the category of contexts C to be the category of coherence spacesand stable maps.For each coherence space X , we set Ty(X ) := Par(X ). Given F ∈ Par(X ),we set Tm(X ,F ) := Π(A,F ).

For the functorial action on types, given a stable map f : X → Y , andF ∈ Par(Y ), we define F{f } ∈ Par(X ) by:

F{f } = F ◦ f .For the functorial action on terms, given f : X → Y , and t ∈ Π(Y ,F ), wedefine

t{f } := t ◦ f ∈ Π(X ,F{f }).The empty context is the terminal object > in C.Context extension is defined using the dependent sum construction. IfF ∈ Par(X ), then we define

X .F := Σ(X ,F ).

The projection morphism pF : X .F → X is the first projection Σ(X ,F )→ Xwhose trace is given by:

{({(s, u)}, a) | (s, u) ∈ |Σ(X ,F )|, a ∈ s}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 22 / 27

Page 129: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A Category with Families based on Coherence SpacesWe take the category of contexts C to be the category of coherence spacesand stable maps.For each coherence space X , we set Ty(X ) := Par(X ). Given F ∈ Par(X ),we set Tm(X ,F ) := Π(A,F ).For the functorial action on types, given a stable map f : X → Y , andF ∈ Par(Y ), we define F{f } ∈ Par(X ) by:

F{f } = F ◦ f .

For the functorial action on terms, given f : X → Y , and t ∈ Π(Y ,F ), wedefine

t{f } := t ◦ f ∈ Π(X ,F{f }).The empty context is the terminal object > in C.Context extension is defined using the dependent sum construction. IfF ∈ Par(X ), then we define

X .F := Σ(X ,F ).

The projection morphism pF : X .F → X is the first projection Σ(X ,F )→ Xwhose trace is given by:

{({(s, u)}, a) | (s, u) ∈ |Σ(X ,F )|, a ∈ s}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 22 / 27

Page 130: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A Category with Families based on Coherence SpacesWe take the category of contexts C to be the category of coherence spacesand stable maps.For each coherence space X , we set Ty(X ) := Par(X ). Given F ∈ Par(X ),we set Tm(X ,F ) := Π(A,F ).For the functorial action on types, given a stable map f : X → Y , andF ∈ Par(Y ), we define F{f } ∈ Par(X ) by:

F{f } = F ◦ f .For the functorial action on terms, given f : X → Y , and t ∈ Π(Y ,F ), wedefine

t{f } := t ◦ f ∈ Π(X ,F{f }).

The empty context is the terminal object > in C.Context extension is defined using the dependent sum construction. IfF ∈ Par(X ), then we define

X .F := Σ(X ,F ).

The projection morphism pF : X .F → X is the first projection Σ(X ,F )→ Xwhose trace is given by:

{({(s, u)}, a) | (s, u) ∈ |Σ(X ,F )|, a ∈ s}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 22 / 27

Page 131: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A Category with Families based on Coherence SpacesWe take the category of contexts C to be the category of coherence spacesand stable maps.For each coherence space X , we set Ty(X ) := Par(X ). Given F ∈ Par(X ),we set Tm(X ,F ) := Π(A,F ).For the functorial action on types, given a stable map f : X → Y , andF ∈ Par(Y ), we define F{f } ∈ Par(X ) by:

F{f } = F ◦ f .For the functorial action on terms, given f : X → Y , and t ∈ Π(Y ,F ), wedefine

t{f } := t ◦ f ∈ Π(X ,F{f }).The empty context is the terminal object > in C.

Context extension is defined using the dependent sum construction. IfF ∈ Par(X ), then we define

X .F := Σ(X ,F ).

The projection morphism pF : X .F → X is the first projection Σ(X ,F )→ Xwhose trace is given by:

{({(s, u)}, a) | (s, u) ∈ |Σ(X ,F )|, a ∈ s}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 22 / 27

Page 132: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A Category with Families based on Coherence SpacesWe take the category of contexts C to be the category of coherence spacesand stable maps.For each coherence space X , we set Ty(X ) := Par(X ). Given F ∈ Par(X ),we set Tm(X ,F ) := Π(A,F ).For the functorial action on types, given a stable map f : X → Y , andF ∈ Par(Y ), we define F{f } ∈ Par(X ) by:

F{f } = F ◦ f .For the functorial action on terms, given f : X → Y , and t ∈ Π(Y ,F ), wedefine

t{f } := t ◦ f ∈ Π(X ,F{f }).The empty context is the terminal object > in C.Context extension is defined using the dependent sum construction. IfF ∈ Par(X ), then we define

X .F := Σ(X ,F ).

The projection morphism pF : X .F → X is the first projection Σ(X ,F )→ Xwhose trace is given by:

{({(s, u)}, a) | (s, u) ∈ |Σ(X ,F )|, a ∈ s}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 22 / 27

Page 133: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A Category with Families based on Coherence SpacesWe take the category of contexts C to be the category of coherence spacesand stable maps.For each coherence space X , we set Ty(X ) := Par(X ). Given F ∈ Par(X ),we set Tm(X ,F ) := Π(A,F ).For the functorial action on types, given a stable map f : X → Y , andF ∈ Par(Y ), we define F{f } ∈ Par(X ) by:

F{f } = F ◦ f .For the functorial action on terms, given f : X → Y , and t ∈ Π(Y ,F ), wedefine

t{f } := t ◦ f ∈ Π(X ,F{f }).The empty context is the terminal object > in C.Context extension is defined using the dependent sum construction. IfF ∈ Par(X ), then we define

X .F := Σ(X ,F ).

The projection morphism pF : X .F → X is the first projection Σ(X ,F )→ Xwhose trace is given by:

{({(s, u)}, a) | (s, u) ∈ |Σ(X ,F )|, a ∈ s}.Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 22 / 27

Page 134: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Definition of CwF ctd

The term vF ∈ Π(Σ(X ,F ),F{pF}) is the second projection, whose trace isgiven by:

{({(s, u)}, b) | (s, u) ∈ |Σ(X ,F )|, b ∈ u}.

Given f : X → Y , F ∈ Par(Y ), and g ∈ Π(X ,F{f }), we define the contextmorphism extension

〈f , g〉F : X → Σ(Y ,F )

as the pairing map, with trace:

{(s ∪ s ′, (t, u)) ∈ Xfin × |Σ(Y ,F )| | (s, t) ∈ Tr∗(f ) ∧ (s ′, u) ∈ Tr∗(g)}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 23 / 27

Page 135: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Definition of CwF ctd

The term vF ∈ Π(Σ(X ,F ),F{pF}) is the second projection, whose trace isgiven by:

{({(s, u)}, b) | (s, u) ∈ |Σ(X ,F )|, b ∈ u}.

Given f : X → Y , F ∈ Par(Y ), and g ∈ Π(X ,F{f }), we define the contextmorphism extension

〈f , g〉F : X → Σ(Y ,F )

as the pairing map, with trace:

{(s ∪ s ′, (t, u)) ∈ Xfin × |Σ(Y ,F )| | (s, t) ∈ Tr∗(f ) ∧ (s ′, u) ∈ Tr∗(g)}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 23 / 27

Page 136: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Definition of CwF ctd

The term vF ∈ Π(Σ(X ,F ),F{pF}) is the second projection, whose trace isgiven by:

{({(s, u)}, b) | (s, u) ∈ |Σ(X ,F )|, b ∈ u}.

Given f : X → Y , F ∈ Par(Y ), and g ∈ Π(X ,F{f }), we define the contextmorphism extension

〈f , g〉F : X → Σ(Y ,F )

as the pairing map, with trace:

{(s ∪ s ′, (t, u)) ∈ Xfin × |Σ(Y ,F )| | (s, t) ∈ Tr∗(f ) ∧ (s ′, u) ∈ Tr∗(g)}.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 23 / 27

Page 137: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Verification

Proposition

The above construction defines a CwF.

Proof The proof amounts to verifying a number of equations.Firstly, for coherence spaces X , Y , Z , stable maps f : X → Y , g : Y → Z ,F ∈ Par(Z ), and t ∈ Π(Z ,F ):

F{idX} = F ∈ Ty(X ) (Ty-Id)

F{g ◦ f } = F{g}{f } ∈ Ty(X ) (Ty-Comp)

t{idZ} = t ∈ Tm(Z ,F ) (Tm-Id)

t{g ◦ f } = t{g}{f } ∈ Tm(X ,F{g ◦ f })) (Tm-Comp)

Furthermore, for f : X → Y , g : Z → X , F ∈ Par(Y ), and t ∈ Π(X ,F{f }):

pF ◦ 〈f , t〉F = f : X → Y (Cons-L)

vF{〈f , t〉F} = t ∈ Tm(X ,F{f }) (Cons-R)

〈f , t〉F ◦ g = 〈f ◦ g , t{g}〉F : Z → Σ(Y ,F ) (Cons-Nat)

〈pF , vF 〉F = idΣ(Y ,F ) : Σ(Y ,F )→ Σ(Y ,F ) (Cons-Id)

�Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 24 / 27

Page 138: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity, Totality and Intensionality

Identity types Idσ(M,N) are interpreted by taking the intersections of the cliquesdenoted by M and N. But this gives a model of partial type theory, aspreviously studied using Scott domains by Palmgren and Stoltenberg-Hansen.

To get an appropriate model of standard type theory, we must extend the modelwith a notion of totality.

If this is done, we get a highly intensional (non-well-pointed) model.

However, it is not yet clear which principles are satisfied in the internal sense ofpropositional equality, e.g. from UIP and Function Extensionality.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 25 / 27

Page 139: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity, Totality and Intensionality

Identity types Idσ(M,N) are interpreted by taking the intersections of the cliquesdenoted by M and N. But this gives a model of partial type theory, aspreviously studied using Scott domains by Palmgren and Stoltenberg-Hansen.

To get an appropriate model of standard type theory, we must extend the modelwith a notion of totality.

If this is done, we get a highly intensional (non-well-pointed) model.

However, it is not yet clear which principles are satisfied in the internal sense ofpropositional equality, e.g. from UIP and Function Extensionality.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 25 / 27

Page 140: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity, Totality and Intensionality

Identity types Idσ(M,N) are interpreted by taking the intersections of the cliquesdenoted by M and N. But this gives a model of partial type theory, aspreviously studied using Scott domains by Palmgren and Stoltenberg-Hansen.

To get an appropriate model of standard type theory, we must extend the modelwith a notion of totality.

If this is done, we get a highly intensional (non-well-pointed) model.

However, it is not yet clear which principles are satisfied in the internal sense ofpropositional equality, e.g. from UIP and Function Extensionality.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 25 / 27

Page 141: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity, Totality and Intensionality

Identity types Idσ(M,N) are interpreted by taking the intersections of the cliquesdenoted by M and N. But this gives a model of partial type theory, aspreviously studied using Scott domains by Palmgren and Stoltenberg-Hansen.

To get an appropriate model of standard type theory, we must extend the modelwith a notion of totality.

If this is done, we get a highly intensional (non-well-pointed) model.

However, it is not yet clear which principles are satisfied in the internal sense ofpropositional equality, e.g. from UIP and Function Extensionality.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 25 / 27

Page 142: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Identity, Totality and Intensionality

Identity types Idσ(M,N) are interpreted by taking the intersections of the cliquesdenoted by M and N. But this gives a model of partial type theory, aspreviously studied using Scott domains by Palmgren and Stoltenberg-Hansen.

To get an appropriate model of standard type theory, we must extend the modelwith a notion of totality.

If this is done, we get a highly intensional (non-well-pointed) model.

However, it is not yet clear which principles are satisfied in the internal sense ofpropositional equality, e.g. from UIP and Function Extensionality.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 25 / 27

Page 143: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A glimpse at linear dependent types

Syntax and Semantics of Linear Dependent Types, Matthijs Vakar,http://arxiv.org/abs/1405.0033.

The key issue is how to handle dependent types σ(x) with x resource-sensitive.

If x is used in forming σ(x), is it still available to form terms of type σ(x)?

This is circumvented in the current approach by considering only linear typesdepending on intuitionistic types, using a dual-context formulation:

Γ|Θ ` M : σ

It is not clear if this is robust with respect to universes.

The underlying semantic structure is strict indexed monoidal categories withcomprehension.

There are a number of other delicate issues, e.g. multiplicative rather thanadditive forms of quantifiers.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 26 / 27

Page 144: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A glimpse at linear dependent types

Syntax and Semantics of Linear Dependent Types, Matthijs Vakar,http://arxiv.org/abs/1405.0033.

The key issue is how to handle dependent types σ(x) with x resource-sensitive.

If x is used in forming σ(x), is it still available to form terms of type σ(x)?

This is circumvented in the current approach by considering only linear typesdepending on intuitionistic types, using a dual-context formulation:

Γ|Θ ` M : σ

It is not clear if this is robust with respect to universes.

The underlying semantic structure is strict indexed monoidal categories withcomprehension.

There are a number of other delicate issues, e.g. multiplicative rather thanadditive forms of quantifiers.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 26 / 27

Page 145: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A glimpse at linear dependent types

Syntax and Semantics of Linear Dependent Types, Matthijs Vakar,http://arxiv.org/abs/1405.0033.

The key issue is how to handle dependent types σ(x) with x resource-sensitive.

If x is used in forming σ(x), is it still available to form terms of type σ(x)?

This is circumvented in the current approach by considering only linear typesdepending on intuitionistic types, using a dual-context formulation:

Γ|Θ ` M : σ

It is not clear if this is robust with respect to universes.

The underlying semantic structure is strict indexed monoidal categories withcomprehension.

There are a number of other delicate issues, e.g. multiplicative rather thanadditive forms of quantifiers.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 26 / 27

Page 146: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A glimpse at linear dependent types

Syntax and Semantics of Linear Dependent Types, Matthijs Vakar,http://arxiv.org/abs/1405.0033.

The key issue is how to handle dependent types σ(x) with x resource-sensitive.

If x is used in forming σ(x), is it still available to form terms of type σ(x)?

This is circumvented in the current approach by considering only linear typesdepending on intuitionistic types, using a dual-context formulation:

Γ|Θ ` M : σ

It is not clear if this is robust with respect to universes.

The underlying semantic structure is strict indexed monoidal categories withcomprehension.

There are a number of other delicate issues, e.g. multiplicative rather thanadditive forms of quantifiers.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 26 / 27

Page 147: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A glimpse at linear dependent types

Syntax and Semantics of Linear Dependent Types, Matthijs Vakar,http://arxiv.org/abs/1405.0033.

The key issue is how to handle dependent types σ(x) with x resource-sensitive.

If x is used in forming σ(x), is it still available to form terms of type σ(x)?

This is circumvented in the current approach by considering only linear typesdepending on intuitionistic types, using a dual-context formulation:

Γ|Θ ` M : σ

It is not clear if this is robust with respect to universes.

The underlying semantic structure is strict indexed monoidal categories withcomprehension.

There are a number of other delicate issues, e.g. multiplicative rather thanadditive forms of quantifiers.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 26 / 27

Page 148: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A glimpse at linear dependent types

Syntax and Semantics of Linear Dependent Types, Matthijs Vakar,http://arxiv.org/abs/1405.0033.

The key issue is how to handle dependent types σ(x) with x resource-sensitive.

If x is used in forming σ(x), is it still available to form terms of type σ(x)?

This is circumvented in the current approach by considering only linear typesdepending on intuitionistic types, using a dual-context formulation:

Γ|Θ ` M : σ

It is not clear if this is robust with respect to universes.

The underlying semantic structure is strict indexed monoidal categories withcomprehension.

There are a number of other delicate issues, e.g. multiplicative rather thanadditive forms of quantifiers.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 26 / 27

Page 149: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A glimpse at linear dependent types

Syntax and Semantics of Linear Dependent Types, Matthijs Vakar,http://arxiv.org/abs/1405.0033.

The key issue is how to handle dependent types σ(x) with x resource-sensitive.

If x is used in forming σ(x), is it still available to form terms of type σ(x)?

This is circumvented in the current approach by considering only linear typesdepending on intuitionistic types, using a dual-context formulation:

Γ|Θ ` M : σ

It is not clear if this is robust with respect to universes.

The underlying semantic structure is strict indexed monoidal categories withcomprehension.

There are a number of other delicate issues, e.g. multiplicative rather thanadditive forms of quantifiers.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 26 / 27

Page 150: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

A glimpse at linear dependent types

Syntax and Semantics of Linear Dependent Types, Matthijs Vakar,http://arxiv.org/abs/1405.0033.

The key issue is how to handle dependent types σ(x) with x resource-sensitive.

If x is used in forming σ(x), is it still available to form terms of type σ(x)?

This is circumvented in the current approach by considering only linear typesdepending on intuitionistic types, using a dual-context formulation:

Γ|Θ ` M : σ

It is not clear if this is robust with respect to universes.

The underlying semantic structure is strict indexed monoidal categories withcomprehension.

There are a number of other delicate issues, e.g. multiplicative rather thanadditive forms of quantifiers.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 26 / 27

Page 151: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards Games

There are some subtleties in refining the coherence space semantics to a gamesemantics.

In particular, consider the dependent sum.

In type theory, we have first and second projections, so we can access thecomponents independently.

However, in game terms, the dependence indicates a causality of informationflow: to get information about the second component, we need information aboutthe first.

It is not clear how this can be captured in game semantics while preserving therequired equations.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 27 / 27

Page 152: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards Games

There are some subtleties in refining the coherence space semantics to a gamesemantics.

In particular, consider the dependent sum.

In type theory, we have first and second projections, so we can access thecomponents independently.

However, in game terms, the dependence indicates a causality of informationflow: to get information about the second component, we need information aboutthe first.

It is not clear how this can be captured in game semantics while preserving therequired equations.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 27 / 27

Page 153: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards Games

There are some subtleties in refining the coherence space semantics to a gamesemantics.

In particular, consider the dependent sum.

In type theory, we have first and second projections, so we can access thecomponents independently.

However, in game terms, the dependence indicates a causality of informationflow: to get information about the second component, we need information aboutthe first.

It is not clear how this can be captured in game semantics while preserving therequired equations.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 27 / 27

Page 154: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards Games

There are some subtleties in refining the coherence space semantics to a gamesemantics.

In particular, consider the dependent sum.

In type theory, we have first and second projections, so we can access thecomponents independently.

However, in game terms, the dependence indicates a causality of informationflow: to get information about the second component, we need information aboutthe first.

It is not clear how this can be captured in game semantics while preserving therequired equations.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 27 / 27

Page 155: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards Games

There are some subtleties in refining the coherence space semantics to a gamesemantics.

In particular, consider the dependent sum.

In type theory, we have first and second projections, so we can access thecomponents independently.

However, in game terms, the dependence indicates a causality of informationflow: to get information about the second component, we need information aboutthe first.

It is not clear how this can be captured in game semantics while preserving therequired equations.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 27 / 27

Page 156: Computational Semantics for Dependent Type Theoriespbo/workshops/ALCOP2014/Samson-Abramsky.pdf · Computational Semantics for Dependent Type Theories Samson Abramsky Department of

Towards Games

There are some subtleties in refining the coherence space semantics to a gamesemantics.

In particular, consider the dependent sum.

In type theory, we have first and second projections, so we can access thecomponents independently.

However, in game terms, the dependence indicates a causality of informationflow: to get information about the second component, we need information aboutthe first.

It is not clear how this can be captured in game semantics while preserving therequired equations.

Samson Abramsky (Department of Computer Science, University of Oxford)Computational Semantics for Dependent Type Theories 27 / 27