HF Sets in Constructive Type Theory Gert Smolka and Kathrin Stark - - PowerPoint PPT Presentation

hf sets in constructive type theory
SMART_READER_LITE
LIVE PREVIEW

HF Sets in Constructive Type Theory Gert Smolka and Kathrin Stark - - PowerPoint PPT Presentation

HF Sets in Constructive Type Theory Gert Smolka and Kathrin Stark Interactive Theorem Proving, Nancy, August 24, 2016 saarland university computer science saarland university computer science A minimal computational axiomatization of HF


slide-1
SLIDE 1

HF Sets in Constructive Type Theory

Gert Smolka and Kathrin Stark

Interactive Theorem Proving, Nancy, August 24, 2016

computer science

saarland

university

slide-2
SLIDE 2

computer science

saarland

university

A minimal computational axiomatization

  • f HF sets

with a unique model.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 2 / 19

slide-3
SLIDE 3

computer science

saarland

university

What are Hereditarily Finite sets?

= all finite, well-founded sets whose elements are HF again

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 3 / 19

slide-4
SLIDE 4

computer science

saarland

university

What are HF sets useful for?

Świerczkowski (1994), Paulson (2015)

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 4 / 19

slide-5
SLIDE 5

computer science

saarland

university

Previous Work

1950 1975 2000

Ackermann (1937) Givant, Tarski (1977) Takahashi (1977) Previale (1994) Świerczkowski (1994) Kirby (2009)

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 5 / 19

hf ≈ N

24 23 22 21 20 21 ≈ 1 1 1 ⌈21⌉ = {⌈4⌉, ⌈2⌉, ⌈0⌉}

slide-6
SLIDE 6

computer science

saarland

university

Previous Work

1950 1975 2000

Ackermann (1937) Givant, Tarski (1977) Takahashi (1977) Previale (1994) Świerczkowski (1994) Kirby (2009)

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 5 / 19

∅:HF x:HF y:HF {x}∪y

  • x.y

:HF

i

a x a.x

slide-7
SLIDE 7

computer science

saarland

university

Previous Work

1950 1975 2000

Ackermann (1937) Givant, Tarski (1977) Takahashi (1977) Previale (1994) Świerczkowski (1994) Kirby (2009)

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 5 / 19

intuitionistic

slide-8
SLIDE 8

computer science

saarland

university

Previous Work

1950 1975 2000

Ackermann (1937) Givant, Tarski (1977) Takahashi (1977) Previale (1994) Świerczkowski (1994) Kirby (2009)

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 5 / 19

membership not as primitive

slide-9
SLIDE 9

computer science

saarland

university

A minimal computational axiomatization

  • f HF sets

with a unique model.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 6 / 19

slide-10
SLIDE 10

computer science

saarland

university

What is needed for HF sets?

1 Constants: hf, ∅, a.x

x ∈ y := x.y = y

2 A characterization of equality

x.x.y = x.y (cancellation) x.y.z = y.x.z (swap) x.y = ∅ (discreteness) x.y.z = y.z → x = y ∨ x.z = z

  • x∈y.z→x=y ∨ x∈z

(membership)

3 A strong induction principle

∀p : hf → Type. p ∅ → (∀x y. p x → p y → p (x.y)) → ∀x. p x

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 7 / 19

slide-11
SLIDE 11

computer science

saarland

university

Working with the Induction Principle

R : p ∅ → (∀x y. p x → p y → p (x.y)) → ∀x. p x R p0 pS ∅ ? = p0 R p0 pS (a.x) ? = pS (R p0 pS a) (R p0 pS x)

π1 ∅ = None π1 (a.x) = Some a

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 8 / 19

slide-12
SLIDE 12

computer science

saarland

university

Working with the Induction Principle

R : p ∅ → (∀x y. p x → p y → p (x.y)) → ∀x. p x

1 Recursive Specification

∅ ∪ y = y a.x ∪ y = a.(x ∪ y)

2 Membership Specification

z ∈ x ∪ y ↔ z ∈ x ∨ z ∈ y

1 Membership Specification

Σu. ∀z. z ∈ u ↔ z ∈ x ∨ z ∈ y

2 Recursive Specification

Needed: extensionality

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 8 / 19

slide-13
SLIDE 13

computer science

saarland

university

What is not needed as primitives?

1 Membership

x ∈ y := x.y = y

2 Recursion equations 3 Decidability of equality: dep. on extensionality 4 Extensionality: dep. on decidability of equality

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 9 / 19

slide-14
SLIDE 14

computer science

saarland

university

Extensionality and Decidability Results

dec (x ∈ y) dec (y ∈ x) dec (x ⊆ y) dec (y ⊆ x) Extensionality

x ⊆ y → y ⊆ x → x = y

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 10 / 19

slide-15
SLIDE 15

computer science

saarland

university

Extensionality and Decidability Results

dec (a.x ∈ b.y) dec (b.y ∈ a.x) dec (a.x ⊆ b.y) dec (b.y ⊆ a.x) Extensionality

a.x ⊆ b.y → b.y ⊆ a.x → a.x = b.y

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 10 / 19

slide-16
SLIDE 16

computer science

saarland

university

A minimal computational axiomatization

  • f HF sets

with a unique model.

existence uniqueness

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 11 / 19

slide-17
SLIDE 17

computer science

saarland

university

A Tree Model for HF Sets

∅ a

. . .b . . . c . . .

=

{a, b, c,}

=

b

. . . a . . . c . . .

{b, a, c}

HF sets = ∅ + a.x + equality + induction principle

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 12 / 19

slide-18
SLIDE 18

computer science

saarland

university

A Tree Model for HF Sets

∅ a

. . .b . . . c . . .

{a, b, c,}

b

. . . a . . . c . . .

{b, a, c} σ

1 An inductive type representing the tree structure:

T := 0 | T.T

2 An equivalence relation ≈: T → T → Prop 3 An idempotent normalizer σ : T → T s.t.

s ≈ t ↔ σs = σt

4 Construct a subtype X of T only containing normalized trees.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 12 / 19

slide-19
SLIDE 19

computer science

saarland

university

Definition of ≈

Equivalence s.s.t ≈ s.t s.t.u ≈ t.s.u s ≈ s s ≈ t t ≈ s s ≈ t t ≈ u s ≈ u s ≈ s′ t ≈ t′ s.t ≈ s′.t′

To show: ≈ satisfies the equality axioms of HFs, for example

1 s.s.t ≈ s.t 2 s.t.u ≈ t.u → s ≈ t ∨ s.u ≈ u

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 13 / 19

slide-20
SLIDE 20

computer science

saarland

university

A Normalization Function

Idea: Use sorted trees as normal form.

Lexical Tree Order 0 < s.t s < s′ s.t < s′.t′ t < t′ s.t < s.t′

Define a sort function σ : T → T according to the above order satisfying

1 σ (σ s) = σ s 2 s ≈ t ↔ σs = σt

⇒ There exists a type {t | σt = t}.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 14 / 19

slide-21
SLIDE 21

computer science

saarland

university

A minimal computational axiomatization

  • f HF sets

with a unique model.

existence uniqueness

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 15 / 19

slide-22
SLIDE 22

computer science

saarland

university

Are all HF structures the same?

X ...

?

↔ Y ...

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 16 / 19

f : X → Y homomorphism: f ∅ = ∅ f (a.x) = (f a).(f x)

slide-23
SLIDE 23

computer science

saarland

university

Are all HF structures the same?

X ... ↔

homomorphism + bijection + greatest bisimulation

Y ...

1 Totality ∀x. Σy. R x y. 2 Functionality R x y → R x y′ → y = y′

◮ Simulation R x y → a ∈ x → ∃ b.b ∈ y ∧ R a b

3 f homomorphism ⇒ R x (f x) 4 All homomorphisms between HF structures are equivalent. 5 All HF structures are isomorphic.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 16 / 19

R ∅ ∅ R a b R x y R a.x b.y

slide-24
SLIDE 24

computer science

saarland

university

A minimal computational axiomatization

  • f HF sets

with a unique model.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 17 / 19

slide-25
SLIDE 25

computer science

saarland

university

Everything is formalized in Coq.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 18 / 19

Axiomatization + Discreteness + Operations + Ordinals + Categoricity + Model Construction ∼ 2000 lines

slide-26
SLIDE 26

computer science

saarland

university

Everything is formalized in Coq.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 18 / 19

similar to proofs in paper special-purpose tactic based on intro-elim rules

slide-27
SLIDE 27

computer science

saarland

university

Everything is formalized in Coq.

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 18 / 19

no inductive types except for the model construction

slide-28
SLIDE 28

computer science

saarland

university

Everything is formalized in Coq.

Where?

  • www.ps.uni-saarland.de/extras/hfs

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 18 / 19

slide-29
SLIDE 29

computer science

saarland

university

Contribution

First minimal, computationally complete axiomatization of HF sets Operationally complete axiomatization First proof of categoricity Further Work A recursor with equations Axiomatization of non-wellfounded sets

Thank you for your attention!

Gert Smolka and Kathrin Stark HF Sets in Constructive Type Theory ITP 2016 19 / 19

Where? - www.ps.uni-saarland.de/extras/hfs