Interpreting inductive-inductive definitions as indexed inductive - - PowerPoint PPT Presentation

interpreting inductive inductive definitions as indexed
SMART_READER_LITE
LIVE PREVIEW

Interpreting inductive-inductive definitions as indexed inductive - - PowerPoint PPT Presentation

Interpreting inductive-inductive definitions as indexed inductive definitions Fredrik Nordvall Forsberg Swansea University csfnf@swansea.ac.uk (Work in progress) What is induction-induction? What is induction-induction? Induction-induction


slide-1
SLIDE 1

Interpreting inductive-inductive definitions as indexed inductive definitions

Fredrik Nordvall Forsberg

Swansea University csfnf@swansea.ac.uk

(Work in progress)

slide-2
SLIDE 2

What is induction-induction?

slide-3
SLIDE 3

What is induction-induction?

Induction-induction is an induction principle in Martin-L¨

  • f Type

Theory. It allows us to define A : Set, together with B : A → Set, where:

◮ Both A and B(a) for a : A are inductively defined. ◮ The constructors for A can refer to B and vice versa. ◮ The constructors for B can also use constructors for A. Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 1

slide-4
SLIDE 4

What is induction-induction?

What induction-induction is not

An inductive-inductive definition is in general not: An ordinary inductive definition

◮ Because we define A : Set and B : A → Set simultaneously. Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 2

slide-5
SLIDE 5

What is induction-induction?

What induction-induction is not

An inductive-inductive definition is in general not: An ordinary inductive definition

◮ Because we define A : Set and B : A → Set simultaneously.

An ordinary mutual inductive definition

◮ Because B : A → Set is indexed by A. Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 2

slide-6
SLIDE 6

What is induction-induction?

What induction-induction is not

An inductive-inductive definition is in general not: An ordinary inductive definition

◮ Because we define A : Set and B : A → Set simultaneously.

An ordinary mutual inductive definition

◮ Because B : A → Set is indexed by A.

An inductive-recursive definition

◮ Because B : A → Set is defined inductively, not recursively. Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 2

slide-7
SLIDE 7

What is induction-induction?

What induction-induction is not

An inductive-inductive definition is in general not: An ordinary inductive definition

◮ Because we define A : Set and B : A → Set simultaneously.

An ordinary mutual inductive definition

◮ Because B : A → Set is indexed by A.

An inductive-recursive definition

◮ Because B : A → Set is defined inductively, not recursively.

An indexed inductive definition

◮ Because the index set A : Set is defined along with B : A → Set, and

not fixed beforehand.

◮ However, we will show that it can be reduced to IID. Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 2

slide-8
SLIDE 8

What is induction-induction? Examples

Habitat 67

2600 Avenue Pierre Dupoy, Montr´ eal, Quebec, Canada

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 3

slide-9
SLIDE 9

What is induction-induction? Examples

Modelling Habitat 67

Platform : Set Building : Platform → Set p : Platform means p is a platform. b : Building(p) means b is a building built on the platform p.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 4

slide-10
SLIDE 10

What is induction-induction? Examples

Example: buildings and platforms

ground : Platform

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 5

slide-11
SLIDE 11

What is induction-induction? Examples

Example: buildings and platforms

p : Platform

  • nTop(p) : Building(p)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 5

slide-12
SLIDE 12

What is induction-induction? Examples

Example: buildings and platforms

p : Platform b : Building(p) extension(p, b) : Platform

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 5

slide-13
SLIDE 13

What is induction-induction? Examples

Example: buildings and platforms

p : Platform b : Building(p) hangingUnder(p, b) : Building(extension(p, b))

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 5

slide-14
SLIDE 14

What is induction-induction? Examples

Buildings and platforms

ground : Platform p : Platform b : Building(p) extension(p, b) : Platform p : Platform

  • nTop(p) : Building(p)

p : Platform b : Building(p) hangingUnder(p, b) : Building(extension(p, b))

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 6

slide-15
SLIDE 15

What is induction-induction? Examples

. . . and so on

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 7

slide-16
SLIDE 16

What is induction-induction? Examples

More seriously

On a more serious note, instances of induction-induction have been used implicitly by Dybjer (1996), Danielsson (2007), and Chapman (2009) to model dependent type theory inside itself.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 8

slide-17
SLIDE 17

What is induction-induction? Examples

Type theory inside type theory

Context : Set Type : Context → Set Term : (Γ : Context) → Type(Γ) → Set . . . Substitutions, . . . . . .

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 9

defined inductively

slide-18
SLIDE 18

An axiomatisation

An axiomatisation

We have given an axiomatisation of inductive-inductive definitions. Similar to axiomatisation of induction-recursion by Dybjer and Setzer. Main idea: add universe U consisting of codes for ind.-ind. defined sets.

◮ The codes reflect syntactic definition of the sets. ◮ For each γ : U, there is Aγ : Set, Bγ : Aγ → Set. ◮ Appropriate introduction and elimination rules

(stating Aγ, Bγ inductively defined).

Makes meta-mathematical analysis of the theory of all inductive-inductive definitions possible.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 10

slide-19
SLIDE 19

An axiomatisation Meta-mathematical questions

But is it consistent?

Yes, we have a set-theoretical model.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 11

slide-20
SLIDE 20

An axiomatisation Meta-mathematical questions

But is it consistent?

Yes, we have a set-theoretical model.

What about the proof theoretical strength?

We will show that induction-induction can be reduced to indexed inductive definitions. Hence these theories have the same proof theoretical strength.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 11

slide-21
SLIDE 21

An axiomatisation Meta-mathematical questions

But is it consistent?

Yes, we have a set-theoretical model. More satisfying answer: yes, we have a model in IIDext.

What about the proof theoretical strength?

We will show that induction-induction can be reduced to indexed inductive definitions. Hence these theories have the same proof theoretical strength.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 11

slide-22
SLIDE 22

Reduction to indexed inductive definitions

slide-23
SLIDE 23

Reduction to IID What is IID?

What are indexed inductive definitions?

An inductive family of sets (for fixed index set I). Typical examples:

◮ finite sets Fin : N → Set. ◮ vectors (lists of certain length) Vec : N → Set.

Whole family defined at once, so constructors can relate different indices. Special case: mutual definitions – indexed by finite set. Get axiomatisation “for free” by considering Dybjer and Setzer’s axiomatisation of indexed IR with trivial recursive part (T : U → 1).

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 12

slide-24
SLIDE 24

Reduction to IID

The general picture

Have: A : Set B : A → Set Will define (with IID): Apre : Set Bpre : Set as a first approximation, and then goodA : Apre → Set goodB : Bpre → Apre → Set to filter out the good elements. (goodB(b, a) inhabitated ⇔ “b : B(a)”)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 13

slide-25
SLIDE 25

Reduction to IID

The general picture (cont.)

We can then define A := (Σa : Apre) goodA(a) B(a, ag) := (Σb : Bpre) goodB(b, a) . Need to show that the introduction and elimination rules hold. For the elimination rules, things become a lot simpler if we work in extensional type theory.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 14

slide-26
SLIDE 26

Reduction to IID The example reduced

The specific picture

Formally, all this is done for an arbitrary code γ representing inductive-inductively defined Aγ, Bγ. We map such codes to codes for IID. In this talk, we will illustrate the construction on a specific example, namely the platforms and buildings.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 15

slide-27
SLIDE 27

Reduction to IID The example reduced

Pre-platforms

For the “first approximation”, we simply drop all index information: ground : Platform p : Platform b : Building(p) extension(p, b) : Platform becomes groundpre : Platformpre p : Platformpre b : Buildingpre extpre(p, b) : Platformpre

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 16

slide-28
SLIDE 28

Reduction to IID The example reduced

Pre-buildings

p : Platform

  • nTop(p) : Building(p)

becomes p : Platformpre

  • nToppre(p) : Buildingpre

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 17

slide-29
SLIDE 29

Reduction to IID The example reduced

Pre-buildings

p : Platform

  • nTop(p) : Building(p)

p : Platform b : Building(p) hangingUnder(p, b) : Building(extension(p, b)) becomes p : Platformpre

  • nToppre(p) : Buildingpre

p : Platformpre b : Buildingpre HUpre(p, b) : Buildingpre

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 17

slide-30
SLIDE 30

Reduction to IID The example reduced

Good platforms

Instead, the indices come back in the goodness predicates. ground : Platform becomes groundgood : goodPlatform(groundpre)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 18

slide-31
SLIDE 31

Reduction to IID The example reduced

Good platforms

Instead, the indices come back in the goodness predicates. ground : Platform p : Platform b : Building(p) extension(p, b) : Platform becomes groundgood : goodPlatform(groundpre) p : Platformpre gp : goodPlatform(p) b : Buildingpre gb : goodBuilding(b, p) extgood(p, gp, b, gb) : goodPlatform(extpre(p, b))

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 18

slide-32
SLIDE 32

Reduction to IID The example reduced

Good buildings

p : Platform

  • nTop(p) : Building(p)

becomes p : Platformpre gp : goodPlatform(p)

  • nTopgood(p, gp) : goodBuilding(onToppre(p), p)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 19

slide-33
SLIDE 33

Reduction to IID The example reduced

Good buildings

p : Platform

  • nTop(p) : Building(p)

p : Platform b : Building(p) hangingUnder(p, b) : Building(extension(p, b)) becomes p : Platformpre gp : goodPlatform(p)

  • nTopgood(p, gp) : goodBuilding(onToppre(p), p)

p : Platformpre gp : goodPlatform(p) b : Buildingpre gb : goodBuilding(b, p) HUgood(p, gp, b, gb) : goodBuilding(HUpre(p, b), extpre(p, b))

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 19

slide-34
SLIDE 34

Reduction to IID The example reduced

Formation rules

Platform := (Σp :Platformpre) goodPlatform(p) Building(p, gp) := (Σb:Buildingpre) goodBuilding(b, p)

Taking a step back

Given an ind.-ind. definition Platform : Set Building : Platform → Set we have defined Platform : Set Building : Platform → Set using only IID. Must now show that original intro. and elim. rules are definable.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 20

slide-35
SLIDE 35

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = {?} extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = {?}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-36
SLIDE 36

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = {?} extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = {?}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-37
SLIDE 37

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = {?0 : Platformpre} , {?1 : goodPlatform(?0)} extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = {?}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-38
SLIDE 38

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, {?1 : goodPlatform(groundpre)} extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = {?}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-39
SLIDE 39

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, {?1 : goodPlatform(groundpre)} extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = {?}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

groundgood : goodPlatform(groundpre)

slide-40
SLIDE 40

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = {?}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-41
SLIDE 41

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = {?}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-42
SLIDE 42

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = {?0 : Platformpre} , {?1 : goodPlatform(?0)}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-43
SLIDE 43

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = extpre( {?2 : Platformpre} , {?3 : Buildingpre} ), {?1 : goodPlatform(?0)}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-44
SLIDE 44

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = extpre(p, {?3 : Buildingpre} ), {?1 : goodPlatform(?0)}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-45
SLIDE 45

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = extpre(p, b), {?1 : goodPlatform(extpre(p, b))}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-46
SLIDE 46

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = extpre(p, b), {?1 : goodPlatform(extpre(p, b))}

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

p : Platformpre gp : goodPlatform(p) b : Buildingpre gb : goodBuilding(b, p) extgood(p, gp, b, gb) : goodPlatform(extpre(p, b))

slide-47
SLIDE 47

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = extpre(p, b), extgood(p, gp, b, gb)

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-48
SLIDE 48

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = extpre(p, b), extgood(p, gp, b, gb)

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = {?}

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-49
SLIDE 49

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = extpre(p, b), extgood(p, gp, b, gb)

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = onToppre(p), onTopgood(p, gp)

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = {?}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-50
SLIDE 50

Reduction to IID The example reduced

Introduction rules

ground : Platform ground = groundpre, groundgood extension : (x : Platform) → Building(x) → Platform extension(p, gp, b, gb) = extpre(p, b), extgood(p, gp, b, gb)

  • nTop : (x : Platform) → Building(x)
  • nTop(p, gp) = onToppre(p), onTopgood(p, gp)

hangingUnder : (x : Platform) → (y : Building(x)) → Building(extension(x, y)) hangingUnder(p, gp, b, gb) = HUpre(p, b), HUgood(p, gp, b, gb)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 21

slide-51
SLIDE 51

Reduction to IID The example reduced

Elimination rules

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p) elimBuilding : (P : Platform → Set) → . . . → (p : Platform) → (b : Building(p)) → P′(p, b)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 22

slide-52
SLIDE 52

Reduction to IID The example reduced

Elimination rules

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p) elimBuilding : (P : Platform → Set) → . . . → (p : Platform) → (b : Building(p)) → P′(p, b)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 22

slide-53
SLIDE 53

Reduction to IID The example reduced

Elimination rules

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p) elimBuilding : (P : Platform → Set) → . . . → (p : Platform) → (b : Building(p)) → P′(p, b)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 22

slide-54
SLIDE 54

Reduction to IID The example reduced

Elimination rules

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p) elimBuilding : (P : Platform → Set) → . . . → (p : Platform) → (b : Building(p)) → P′(p, b)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 22

slide-55
SLIDE 55

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , x) = {?0 : P(x)}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-56
SLIDE 56

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , p′, gp) = {?0 : P(p′, gp)}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-57
SLIDE 57

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , p′, groundgood) = {?0 : P(p′, groundgood)} elimPlatform(. . . , p′, extgood(p, gp, b, gb)) = {?1 : P(p′, extgood(p, b, gp, gb))}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-58
SLIDE 58

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , groundpre, groundgood) = {?0 : P(groundpre, groundgood elimPlatform(. . . , extpre(p, b), extgood(p, gp, b, gb)) = {?1 : P(extpre(p, b), extgood(p, b, gp, gb))}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-59
SLIDE 59

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , groundpre, groundgood) = {?0 : P(ground)} elimPlatform(. . . , extpre(p, b), extgood(p, gp, b, gb)) = {?1 : P(extpre(p, b), extgood(p, b, gp, gb))}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-60
SLIDE 60

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , groundpre, groundgood) = basePlatform elimPlatform(. . . , extpre(p, b), extgood(p, gp, b, gb)) = {?1 : P(extpre(p, b), extgood(p, b, gp, gb))}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-61
SLIDE 61

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , groundpre, groundgood) = basePlatform elimPlatform(. . . , extpre(p, b), extgood(p, gp, b, gb)) = {?1 : P(extension(p, gp, b, gb))}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-62
SLIDE 62

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , groundpre, groundgood) = basePlatform elimPlatform(. . . , extpre(p, b), extgood(p, gp, b, gb)) = stepPlatform(p, gp, b, gb, {?2 : P(p, gp)} , {?3 : P′(p, gp, b, gb)} )

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-63
SLIDE 63

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , groundpre, groundgood) = basePlatform elimPlatform(. . . , extpre(p, b), extgood(p, gp, b, gb)) = stepPlatform(p, gp, b, gb, elimPlatform(. . . , p, gp), {?3 : P′(p, gp, b, gb)}

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-64
SLIDE 64

Reduction to IID The example reduced

elimPlatform

elimPlatform : (P : Platform → Set) → (P′ : (p : Platform) → Building(p) → Set) → (basePlatform : P(ground)) → (stepPlatform : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P(extension(p, b))) → (baseBuilding : (p : Platform) → P′(p, onTop(p))) → (stepBuilding : (p : Platform) → (b : Building(p)) → P(p) → P′(p, b) → P′(extension(p, b), hangingUnder(p, b))) → (p : Platform) → P(p)

elimPlatform(. . . , groundpre, groundgood) = basePlatform elimPlatform(. . . , extpre(p, b), extgood(p, gp, b, gb)) = stepPlatform(p, gp, b, gb, elimPlatform(. . . , p, gp), elimBuilding(. . .))

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 23

slide-65
SLIDE 65

Reduction to IID The example reduced

elimBuilding

For elimBuilding, the story is similar, but we also need to prove

Lemma

Let Γ : Platformpre. For all Γg, Γg′ : goodPlatform(Γ), Γg =goodPlatform(Γ) Γg′ (follows from elim. rules for goodPlatform) With extensional type theory and its equality reflection, we can then define elimBuilding such that the computation rules hold.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 24

slide-66
SLIDE 66

Results

IndInd ≤ IndIndext ≤ IIDext

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 25

slide-67
SLIDE 67

Results

IndInd ≤ IndIndext “≤” IIDext

Still work in progress, but nearly there

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 25

slide-68
SLIDE 68

Results

IID ≤ IndInd ≤ IndIndext “≤” IIDext

Still work in progress, but nearly there Let A be isomorphic copy of I (constructor introA : I → A)

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 25

slide-69
SLIDE 69

Results

IID ≤ IndInd ≤ IndIndext “≤” IIDext

Still work in progress, but nearly there Let A be isomorphic copy of I (constructor introA : I → A)

When it comes to well orderings

Likely that |IID| = |IIDext|, so that |IndInd| = |IID|.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 25

slide-70
SLIDE 70

Results

IID ≤ IndInd ≤ IndIndext “≤” IIDext

Still work in progress, but nearly there Let A be isomorphic copy of I (constructor introA : I → A)

When it comes to well orderings

Likely that |IID| = |IIDext|, so that |IndInd| = |IID|.

Fredrik Nordvall Forsberg (Swansea) Induction-induction ❀ IID TYPES 2010, Warsaw 25

Thanks!