Tests, Games, and Martin-Lfs Meaning Explanations for - - PowerPoint PPT Presentation

tests games and martin l f s meaning explanations for
SMART_READER_LITE
LIVE PREVIEW

Tests, Games, and Martin-Lfs Meaning Explanations for - - PowerPoint PPT Presentation

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory Tests, Games, and Martin-Lfs Meaning Explanations for Intuitionistic Type Theory Meeting on Logic and Interactions


slide-1
SLIDE 1

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Tests, Games, and Martin-Löf’s Meaning Explanations for Intuitionistic Type Theory

Meeting on Logic and Interactions CIRM, Marseille 30 January - 2 March 2012 Peter Dybjer

Chalmers tekniska högskola, Göteborg (joint work in progress with Pierre Clairambault, Cambridge)

13 February 2012

slide-2
SLIDE 2

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic:

slide-3
SLIDE 3

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic: 1908 BHK. A calculus of problems (Kolmogorov) or a calculus

  • f intended constructions (Heyting)
slide-4
SLIDE 4

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic: 1908 BHK. A calculus of problems (Kolmogorov) or a calculus

  • f intended constructions (Heyting)

1945 Kleene. Realizability

slide-5
SLIDE 5

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic: 1908 BHK. A calculus of problems (Kolmogorov) or a calculus

  • f intended constructions (Heyting)

1945 Kleene. Realizability 1969 Curry-Howard. Formulas as types

slide-6
SLIDE 6

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic: 1908 BHK. A calculus of problems (Kolmogorov) or a calculus

  • f intended constructions (Heyting)

1945 Kleene. Realizability 1969 Curry-Howard. Formulas as types Intuitionistic type theory:

slide-7
SLIDE 7

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic: 1908 BHK. A calculus of problems (Kolmogorov) or a calculus

  • f intended constructions (Heyting)

1945 Kleene. Realizability 1969 Curry-Howard. Formulas as types Intuitionistic type theory: 1972 Martin-Löf. Intuitionistic type theory, proof theoretic properties

slide-8
SLIDE 8

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic: 1908 BHK. A calculus of problems (Kolmogorov) or a calculus

  • f intended constructions (Heyting)

1945 Kleene. Realizability 1969 Curry-Howard. Formulas as types Intuitionistic type theory: 1972 Martin-Löf. Intuitionistic type theory, proof theoretic properties 1974 Aczel. Realizability

slide-9
SLIDE 9

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic: 1908 BHK. A calculus of problems (Kolmogorov) or a calculus

  • f intended constructions (Heyting)

1945 Kleene. Realizability 1969 Curry-Howard. Formulas as types Intuitionistic type theory: 1972 Martin-Löf. Intuitionistic type theory, proof theoretic properties 1974 Aczel. Realizability 1979 Martin-Löf. Meaning explanations

slide-10
SLIDE 10

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning and justification of intuitionistic logic and type theory - evolution of ideas during the 20th century

Intuitionistic logic: 1908 BHK. A calculus of problems (Kolmogorov) or a calculus

  • f intended constructions (Heyting)

1945 Kleene. Realizability 1969 Curry-Howard. Formulas as types Intuitionistic type theory: 1972 Martin-Löf. Intuitionistic type theory, proof theoretic properties 1974 Aczel. Realizability 1979 Martin-Löf. Meaning explanations 2009 Prawitz on Martin-Löf. Proof: epistemological or

  • ntological concept?
slide-11
SLIDE 11

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Intuitionistic Type Theory - a language for both mathematics and programming

Full-scale framework for constructive mathematics in the style of Bishop ("ZF for intuitionism"). Others are e g

Myhill-Aczel constructive set theory, Aczel-Feferman style type-free theories.

A functional programming language with dependent types where all programs terminate (core of NuPRL, Coq, Agda, etc)

slide-12
SLIDE 12

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Type formers of intuitionistic type theory

To interpret predicate logic with identity:

Πx ∈ A.B,Σx ∈ A.B,A+ B,N0,N1,I(A,a,b)

Other mathematical objects

N,Wx ∈ A.B,U,U1,U2,...

slide-13
SLIDE 13

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Type formers of intuitionistic type theory

To interpret predicate logic with identity:

Πx ∈ A.B,Σx ∈ A.B,A+ B,N0,N1,I(A,a,b)

Other mathematical objects

N,Wx ∈ A.B,U,U1,U2,...

Extensions with general notion of inductive definition – important for programming.

slide-14
SLIDE 14

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Type formers of intuitionistic type theory

To interpret predicate logic with identity:

Πx ∈ A.B,Σx ∈ A.B,A+ B,N0,N1,I(A,a,b)

Other mathematical objects

N,Wx ∈ A.B,U,U1,U2,...

Extensions with general notion of inductive definition – important for programming. Extensions into the constructive higher infinite: super universes, universe hierarchies, Mahlo universes, autonomous Mahlo universes, general inductive-recursive definitions etc.

slide-15
SLIDE 15

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Judgements of Intuitionistic Type Theory

Γ ⊢ A type Γ ⊢ A = A′ Γ ⊢ a ∈ A Γ ⊢ a = a′ ∈ A

slide-16
SLIDE 16

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

What are Martin-Löf’s meaning explanations?

Meaning explanations. Also called direct semantics, intuitive semantics, standard semantics, syntactico-semantical approach "pre-mathematical" as opposed to "meta-mathematical": References: Constructive Mathematics and Computer Programming, LMPS 1979; Intuitionistic Type Theory, Bibliopolis, 1984; Philosophical Implications of Type Theory, Firenze lectures 1987. Before 1979: normalization proofs, but no meaning explanations.

slide-17
SLIDE 17

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Natural numbers - meaning explanations

Start with untyped expressions and notion of computation of closed expression to canonical form (whnf) a ⇒ v. A ⇒ N A type A ⇒ N A′ ⇒ N A = A′ A ⇒ N a ⇒ 0 a ∈ A A ⇒ N a ⇒ s(b) b ∈ N a ∈ A A ⇒ N a ⇒ 0 a′ ⇒ 0 a = a′ ∈ A A ⇒ N a ⇒ s(b) a′ ⇒ s(b′) b = b′ ∈ N a = a′ ∈ A How to understand these rules, meta-mathematically (realizability) or pre-mathematically (meaning explanations)?

slide-18
SLIDE 18

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

General pattern

A ⇒ C(a1,....am)

···

A type A ⇒ C(a1,....am) A′ ⇒ C(a′

1,....a′ m)

···

A = A′ where C is an m-place type constructor (N,Π,Σ,I,U, etc), and A ⇒ C(a1,....am) a ⇒ c(b1,....bn)

···

a ∈ A A ⇒ C(a1,....am) a ⇒ c(b1,....bn) a′ ⇒ c(b′

1,....b′ n)

···

a = a′ ∈ A where c is an n-place term constructor for the m-place type constructor C (0,s for N; λ for Π; N,Π,... for U; etc).

slide-19
SLIDE 19

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning of hypothetical judgements (Martin-Löf 1979)

a ∈ A (x1 ∈ A1,...,xn ∈ An) means that

slide-20
SLIDE 20

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The meaning of hypothetical judgements (Martin-Löf 1979)

a ∈ A (x1 ∈ A1,...,xn ∈ An) means that a(a1,...,an/x1,...,xn) ∈ A(a1,...,an/x1,...,xn) provided a1 ∈ A1, . . . an ∈ An(a1,...,an−1/x1,...,xn−1), and, moreover, a(a1,...,an/x1,...,xn) = a(b1,...,bn/x1,...,xn) ∈ A(a1,...,an/x1,...,xn) provided a1 = b1 ∈ A1, . . .

slide-21
SLIDE 21

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Martin-Löf on meaning explanations

slide-22
SLIDE 22

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Martin-Löf on meaning explanations

Some people feel that when I have presented my meaning explanations I have said nothing.

slide-23
SLIDE 23

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Martin-Löf on meaning explanations

Some people feel that when I have presented my meaning explanations I have said nothing. And this is how it should be.

slide-24
SLIDE 24

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Martin-Löf on meaning explanations

Some people feel that when I have presented my meaning explanations I have said nothing. And this is how it should be. The standard semantics should be just that: standard. It should come as no surprise.

slide-25
SLIDE 25

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Martin-Löf on meaning explanations

Some people feel that when I have presented my meaning explanations I have said nothing. And this is how it should be. The standard semantics should be just that: standard. It should come as no surprise. Martin-Löf at the Types Summer School in Giens 2002 (as I recall it)

slide-26
SLIDE 26

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Program testing and Martin-Löf’s meaning explanations

Mathematical induction vs inductive inference.

slide-27
SLIDE 27

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Program testing and Martin-Löf’s meaning explanations

Mathematical induction vs inductive inference. Idealist vs realist; subjective vs objective; epistemic vs

  • ntological?
slide-28
SLIDE 28

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Program testing and Martin-Löf’s meaning explanations

Mathematical induction vs inductive inference. Idealist vs realist; subjective vs objective; epistemic vs

  • ntological? Is logic better off with or without reality?
slide-29
SLIDE 29

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Program testing and Martin-Löf’s meaning explanations

Mathematical induction vs inductive inference. Idealist vs realist; subjective vs objective; epistemic vs

  • ntological? Is logic better off with or without reality?

Testing, QuickCheck (Claessen and Hughes 2000), input

  • generation. Test manual for Martin-Löf type theory. Cf Hayashi’s

proof animation for PX from the1980s.

slide-30
SLIDE 30

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Program testing and Martin-Löf’s meaning explanations

Mathematical induction vs inductive inference. Idealist vs realist; subjective vs objective; epistemic vs

  • ntological? Is logic better off with or without reality?

Testing, QuickCheck (Claessen and Hughes 2000), input

  • generation. Test manual for Martin-Löf type theory. Cf Hayashi’s

proof animation for PX from the1980s. Meaning (testing) of hypothetical judgements, type equality, identity types

slide-31
SLIDE 31

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Program testing and Martin-Löf’s meaning explanations

Mathematical induction vs inductive inference. Idealist vs realist; subjective vs objective; epistemic vs

  • ntological? Is logic better off with or without reality?

Testing, QuickCheck (Claessen and Hughes 2000), input

  • generation. Test manual for Martin-Löf type theory. Cf Hayashi’s

proof animation for PX from the1980s. Meaning (testing) of hypothetical judgements, type equality, identity types Meaning (testing) of functionals. Continuity, domains, games.

slide-32
SLIDE 32

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Is mathematics an experimental science?

Miquel 2010: The experimental effectiveness of mathematical proof: We can thus argue (against Popper) that mathematics fulfills the demarcation criterion that makes mathematics an empirical science. The only specificity of mathematics is that the universal empirical hypothesis underlying mathematics is (almost) never stated explicitly.

slide-33
SLIDE 33

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Truth and proof: ontological or epistemic concepts?

Prawitz 2011: "More precisely, Martin-Löf makes a distinction between two senses of proofs."

  • ntological: "proof object" a in a ∈ A

epistemic: "demonstration" - a tree of inferences: . . .

Γ ⊢ a ∈ A

slide-34
SLIDE 34

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

How to test categorical judgements a ∈ A?

Compute the canonical form of A and a! If A ⇒ N, then

if a ⇒ 0, then the test is successful. if a ⇒ s(b), then test whether b ∈ N. if a ⇒ c(b1,...,bn) for some other constructor c (including λ), then the test fails.

If A ⇒ Πx ∈ B.C, then

if a ⇒ λx.c, then test x ∈ B ⊢ c ∈ C if a ⇒ c(b1,...,bn) for some other constructor c, then the test fails.

If A ⇒ U

if a ⇒ N, then the test is successful. if a ⇒ Πx ∈ B.C, then test whether B ∈ U and x ∈ B ⊢ C ∈ U. . . . if a ⇒ c(b1,...,bn) for some c which is not a constructor for small sets, then the test fails.

slide-35
SLIDE 35

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Weak head normal form vs head normal form

Weak head normal form If A ⇒ Πx ∈ B.C, then if a ⇒ λx.c, then test x ∈ B ⊢ c ∈ C if a ⇒ c(b1,...,bn) for some other constructor c, then the test fails. Head normal form If A ⇒ Πx ∈ B.C, then test x ∈ B ⊢ ax ∈ C

slide-36
SLIDE 36

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

How to generate input?

Easy to generate input of type N (and other algebraic data types). But how do we generate input of type N → N (and other higher types)?

We do not know how to generate an arbitrary x ∈ N → N! Key observation. Continuity tells us that x will only call finitely many arguments. Domain theory and game semantics to the rescue!

slide-37
SLIDE 37

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Testing functionals: an example

How to test f ∈ N → N ⊢ if f 0 = 0then f 1else f 2 ∈ Fin(s(f 1+ f 2)) where

Fin0 = N0 Fin(s(n)) = N1 +Finn

0+ n

=

n

s(m)+ n = s(m + n)

Assume suitable encoding of numbers and

N0 = Fin0 ⊆ Fin1 ⊆ Fin2 ⊆ ··· ⊆ N

slide-38
SLIDE 38

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Game-theoretic testing

Test f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ Fin(s(f 1+ f 2))!

slide-39
SLIDE 39

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Game-theoretic testing

Test f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ Fin(s(f 1+ f 2))! Evaluate first type and then term to hnf: f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ 1+Fin(f 1+ f 2) We are not ready to match term constructor and type constructor because outermost constructor of term is not known: need value

  • f f 0.
slide-40
SLIDE 40

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Game-theoretic testing

Test f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ Fin(s(f 1+ f 2))! Evaluate first type and then term to hnf: f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ 1+Fin(f 1+ f 2) We are not ready to match term constructor and type constructor because outermost constructor of term is not known: need value

  • f f 0.

Generate f 0 := 0 – opponent move.

slide-41
SLIDE 41

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Game-theoretic testing

Test f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ Fin(s(f 1+ f 2))! Evaluate first type and then term to hnf: f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ 1+Fin(f 1+ f 2) We are not ready to match term constructor and type constructor because outermost constructor of term is not known: need value

  • f f 0.

Generate f 0 := 0 – opponent move. Evaluate term: f : N → N ⊢ f 1 ∈ 1+Fin(f 1+ f 2) Outermost term constructor still not known: need value of f 1.

slide-42
SLIDE 42

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Game-theoretic testing

Test f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ Fin(s(f 1+ f 2))! Evaluate first type and then term to hnf: f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ 1+Fin(f 1+ f 2) We are not ready to match term constructor and type constructor because outermost constructor of term is not known: need value

  • f f 0.

Generate f 0 := 0 – opponent move. Evaluate term: f : N → N ⊢ f 1 ∈ 1+Fin(f 1+ f 2) Outermost term constructor still not known: need value of f 1. Generate f 1 := 0 – opponent move.

slide-43
SLIDE 43

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Game-theoretic testing

Test f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ Fin(s(f 1+ f 2))! Evaluate first type and then term to hnf: f : N → N ⊢ if f 0 = 0 then f 1 else f 2 ∈ 1+Fin(f 1+ f 2) We are not ready to match term constructor and type constructor because outermost constructor of term is not known: need value

  • f f 0.

Generate f 0 := 0 – opponent move. Evaluate term: f : N → N ⊢ f 1 ∈ 1+Fin(f 1+ f 2) Outermost term constructor still not known: need value of f 1. Generate f 1 := 0 – opponent move. Evaluate term: f : N → N ⊢ 0 ∈ N1 +Fin(f 1+ f 2) Test has succeeded!

slide-44
SLIDE 44

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Proofs, tests, and games

Testing proofs: 1980s Hayashi: proof animation for PX Game semantics for proofs and lambda terms: 1930s Gentzen? 1950s Lorenzen: dialogue semantics 1990s Hyland and Ong; Nikau; Abramsky, Jagadeesan, and Malacaria: game semantics for PCF

slide-45
SLIDE 45

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Finite System T

Types A

::= Bool | A → A

Terms a

::=

x | aa | λx.a | tt | ff | ifaaa Head neutral terms s

::=

x | s a | ifs aa Head normal forms (hnfs) v

::= λx.v | tt | ff | s

Head normal form relation a ⇒ v (rules omitted)

slide-46
SLIDE 46

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of a ∈ Bool

Run the closed term a! a ⇒ tt: the test succeeds. a ⇒ ff: the test succeeds. a ⇒ λx.b: the test fails.

slide-47
SLIDE 47

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of a ∈ Bool

Run the closed term a! a ⇒ tt: the test succeeds. a ⇒ ff: the test succeeds. a ⇒ λx.b: the test fails. The arena for Bool: a ⇒? a ⇒ tt a ⇒ ff

slide-48
SLIDE 48

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of a ∈ Bool → Bool

Test x ∈ Bool ⊢ ax : Bool! ax ⇒ tt: the test succeeds. ax ⇒ ff: the test succeeds. ax ⇒ λy.b: the test fails. ax ⇒ s (neutral term): generate head variable x := tt or x := ff.

slide-49
SLIDE 49

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of a ∈ Bool → Bool

Test x ∈ Bool ⊢ ax : Bool! ax ⇒ tt: the test succeeds. ax ⇒ ff: the test succeeds. ax ⇒ λy.b: the test fails. ax ⇒ s (neutral term): generate head variable x := tt or x := ff. Arena for Bool → Bool: ax ⇒? ax ⇒ needs x ax ⇒ tt ax ⇒ ff x := tt x := ff

slide-50
SLIDE 50

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of a ∈ Bool → Bool

Test x ∈ Bool ⊢ ax : Bool! ax ⇒ tt: the test succeeds. ax ⇒ ff: the test succeeds. ax ⇒ λy.b: the test fails. ax ⇒ s (neutral term): generate head variable x := tt or x := ff. Arena for Bool → Bool: ax ⇒? ax ⇒ needs x ax ⇒ tt ax ⇒ ff x := tt x := ff Correspondence with game semantics. Move in arbitrary innocent well-bracketed opponent strategy x ∈ Bool. Only head occurrence of x is instantiated at the first stage. Repetition of moves possible.

slide-51
SLIDE 51

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of a ∈ (Bool → Bool) → Bool

Test x ∈ Bool → Bool ⊢ ax ∈ Bool. ax ⇒ tt: the test succeeds. ax ⇒ ff: the test succeeds. ax ⇒ λy.b: the test fails. ax ⇒ s (neutral term). Evaluation is blocked by head variable x.

slide-52
SLIDE 52

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of a ∈ (Bool → Bool) → Bool

Test x ∈ Bool → Bool ⊢ ax ∈ Bool. ax ⇒ tt: the test succeeds. ax ⇒ ff: the test succeeds. ax ⇒ λy.b: the test fails. ax ⇒ s (neutral term). Evaluation is blocked by head variable x. Arena for (Bool → Bool) → Bool: ax ⇒? ax ⇒ needs x ax ⇒ tt ax ⇒ ff x b := needs b x b := tt x b := ff b ⇒ tt b ⇒ ff

slide-53
SLIDE 53

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

A play for x ∈ Bool → Bool ⊢ x (x tt) ∈ Bool

(Bool

Bool)

Bool

x (x tt) ⇒? x (x tt) ⇒ x (x tt) x (x tt) := ? x tt ⇒ x tt x tt := ?

tt ⇒ tt

x tt := ff x tt ⇒ ff x (x tt) := tt x (x tt) ⇒ tt

slide-54
SLIDE 54

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The arena for lazy N

a ⇒? a ⇒ 0 a ⇒ s(b) b ⇒? b ⇒ 0 b ⇒ s(c) c ⇒? c ⇒ 0 c ⇒ s(d) . . .

slide-55
SLIDE 55

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Intuitionistic type theory (the N,Π,U-fragment)

Terms (including types) a

::=

x | aa | λx.a | 0 | s(a) | Raaa | Πx ∈ a.a | N | U Head neutral terms s

::=

x | s a | Rs aa Head normal forms v

::= λx.v | 0 | s(a) | Πx ∈ a.a | N | U | s

slide-56
SLIDE 56

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of hypothetical judgement: case N

To test x1 ∈ A1,...,xn ∈ An ⊢ a ∈ A we compute hnf of A. A ⇒ N. Then we compute hnf of a.

a ⇒ 0: success. a ⇒ s(b). Test x1 ∈ A1,...,xn ∈ An ⊢ b ∈ N a ⇒ s (neutral term). Play strategy for head variable xi ∈ Ai. First we must generate the outermost type constructor of Ai, that is, we must test x1 ∈ A1,...,xi−1 ∈ Ai−1 ⊢ Ai type This computation may require playing strategies for other variables xj ∈ Aj for j < i, etc. If the hnf of a is another constructor (including λ) then we fail.

slide-57
SLIDE 57

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of hypothetical judgement: case Π

A ⇒ Πx ∈ B.C. Test x1 ∈ A1,...,xn ∈ An,x ∈ B ⊢ ax ∈ C

slide-58
SLIDE 58

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Test of hypothetical judgement: neutral case

A ⇒ s (neutral term).

As before we play the strategy for the head variable xi ∈ Ai of s, remembering (by innocence) what was played before. The computation of Ai can itself enforce playing strategies for

  • ther variables xj ∈ Aj for j < i. Etc.

When we have generated (played) enough of the variables x1 ∈ A1,...,xn ∈ An, then we compute hnf a, generating, if necessary more of the variables, respecting innocence.

slide-59
SLIDE 59

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

The arena for untyped expressions

a ⇒? a ⇒?x1 a ⇒?x2

···

a ⇒ U a ⇒ Πx : b.c a ⇒ N a ⇒ 0 a ⇒ s(b) x1 :=? x2 :=? b ⇒? c ⇒? b ⇒? . . . . . . . . . . . . . . .

slide-60
SLIDE 60

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

  • Summary. A question.

Summary The test manual determines the meaning of judgements (including equality judgements). Tests can corroborate or refute judgements (Popper). Tests with functional input leads us into games: input generation corresponds to playing innocent, well-bracketed opponent strategy. Meaning of hypothetical judgements, type equality, and identity types differs from Martin-Löf 1979. Nevertheless, rules of extensional type theory of Martin-Löf 1979 are justified, but in a different way.

slide-61
SLIDE 61

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

  • Summary. A question.

Summary The test manual determines the meaning of judgements (including equality judgements). Tests can corroborate or refute judgements (Popper). Tests with functional input leads us into games: input generation corresponds to playing innocent, well-bracketed opponent strategy. Meaning of hypothetical judgements, type equality, and identity types differs from Martin-Löf 1979. Nevertheless, rules of extensional type theory of Martin-Löf 1979 are justified, but in a different way. A question Meaning explanations for impredicative intuitionistic type theory (System F, Calculus of Constructions) in terms of tests?

slide-62
SLIDE 62

PFM

Intuitionistic type theory Meaning explanations Test manual Games Finite system T System T Intuitionistic type theory

Innocence

In an innocent player strategy the next move is uniquely determined by the player view. This view ignores two kinds of moves: those between an opponent question and its justifying player question; those between an opponent answer and its corresponding

  • pponent question.

Formally: P − view([)

= [