Representation of Partial Recursive Functions by - - PowerPoint PPT Presentation

representation of partial recursive functions
SMART_READER_LITE
LIVE PREVIEW

Representation of Partial Recursive Functions by - - PowerPoint PPT Presentation

Representation of Partial Recursive Functions by Inductive-Recursive and by Inductive Definitions Anton Setzer Swansea University Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 1 Principle of


slide-1
SLIDE 1

Representation of Partial Recursive Functions

by

Inductive-Recursive

and by

Inductive Definitions

Anton Setzer Swansea University

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 1

slide-2
SLIDE 2

Principle of Ind.-Rec. Defs.

Developed by P . Dybjer. Prime example: Universes Inductively define

U : Set

while simultaneously recursively defining

T(u) : Set (u : U)

So T : U → Set. Generalization:

T : U → D for some arbitary type D.

Indexed ind.-rec. definitions:

U : I → Set T : (i : I, U(i)) → D[i]

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 2

slide-3
SLIDE 3

Example

b N a b Σ(a, b) T(a) T(a) Σ(T(a), T ◦ b) T(b(x)) N b(x) (x : T(a)) U

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 3

slide-4
SLIDE 4

Bove/Capretta Appr. to Par.-Rec. Fun.

Example

f : N ⇀ N f(0) = 0 f(n + 1) = f(f(n))

Represented by the following indexed ind.-rec. def.

f(·)↓ : N → Set eval : (n : N, f(n)↓) → N f(0)↓ = data true eval(0, true) = f(n + 1)↓ = data C (p : f(n)↓, q : f(eval(n, p))↓) eval(n + 1, C(p, q)) = eval(eval(n, p), q)

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 4

slide-5
SLIDE 5

Standard Appr. to Part.-Rec. Func

f(0) = 0 f(n + 1) = f(f(n))

Standard approach to representing a part.-rec. funct.: Define by an ordinary indexed inductive definition

Graphf : N → N → Set

In the example we have:

C0 : Graphf(0, 0) CS : (n : N, m : N, p : Graphf(n, m), k : N, q : Graphf(m, k)) → Graphf(n + 1, k)

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 5

slide-6
SLIDE 6

Standard Appr. to Part.-Rec. Func

f(0) = 0 f(n + 1) = f(f(n)) Graphf : N → N → Set C0 : Graphf(0, 0) CS : (n : N, m : N, p : Graphf(n, m), k : N, q : Graphf(m, k)) → Graphf(n + 1, k)

We can define f(·)↓, eval as follows:

f(·)↓ : N → Set f(n)↓ := (m : N) × Graphf(n, m) eval : (n : N, f(n)↓) → N eval(n, m, p) = m

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 6

slide-7
SLIDE 7

Generalisation

Assume a small indexed ind.-rec. def.

U : I → Set T : (i : I, U(i)) → D(i)

where

D : I → Set

This can be simulated by an indexed ind. def.

GraphT : (i : I, D(i)) → Set

Jump to conclusion.

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 7

slide-8
SLIDE 8

Generalisation

GraphT : (i : I, D(i)) → Set

Now we can define

U : I → Set U(i) := (d : D(i)) × GraphT(i, d) T : (i : I, U(i)) → D(i) T(i, d, p) := d

Simple case: U non-indexed, so

U : Set, T : U → D.

Then we have

GraphT : D → Set

Jump to conclusion.

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 8

slide-9
SLIDE 9

Example

Assume a single inductive argument (plus other constructors):

C : U → U T(C(u)) = g(T(u))

Replace this by

GraphT : D → Set C′ : (d′ : D, p : GraphT(d′)) → GraphT(g(d′))

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 9

slide-10
SLIDE 10

Conclusion

Reduction of small indexed ind.-rec. definitions to indexed inductive definition. Maybe reason why not many real world examples of ind.-rec. definitions have been found. Need to explore whether using small ind.-rec. definitions or ind. definitions is easier. Propaganda: Talk about object-oriented programming in dependent type theory on Thursday at 11:45 in TFP Talk about functional concets in C++ on Thursday at 15:15 in TFP (presented by U. Berger).

Anton Setzer: Representation of part.-rec. functions by ind.-recursive and by ind. definitions 10