Uniform Inductive Reasoning in Transitive Closure Logic via Infinite - - PowerPoint PPT Presentation

uniform inductive reasoning in transitive closure logic
SMART_READER_LITE
LIVE PREVIEW

Uniform Inductive Reasoning in Transitive Closure Logic via Infinite - - PowerPoint PPT Presentation

Uniform Inductive Reasoning in Transitive Closure Logic via Infinite Descent SREPLS 10, Birkbeck, University of London 1 Dept of Computer Science, Cornell University, Ithaca, NY, USA 2 School of Computing, University of Kent, Canterbury, UK Liron


slide-1
SLIDE 1

Uniform Inductive Reasoning in Transitive Closure Logic via Infinite Descent

Liron Cohen 1 Reuben N. S. Rowe 2 SREPLS 10, Birkbeck, University of London Tuesday 18th September 2018

1Dept of Computer Science, Cornell University, Ithaca, NY, USA 2School of Computing, University of Kent, Canterbury, UK

slide-2
SLIDE 2

Motivation

  • Carry out formal inductive reasoning
  • Do so automatically (as much as possible)
  • Study/compare different ‘styles’ of inductive reasoning

1

slide-3
SLIDE 3

Formalising Inductive Reasoning

slide-4
SLIDE 4

Explicit Inductive Definitions

  • Use clauses to inductively define predicates:

ϕ1 ∧ . . . ∧ ϕn ⇒ P( ⃗ t) . . . ψ1 ∧ . . . ∧ ψm ⇒ P( ⃗ t)

  • We take the smallest interpretation closed under the rules

N 0 N x N sx E 0 O x E sx E x O sx N = {0, s0, ss0, . . . , sn 0, . . .} E = {0, ss0, . . . , s2n 0, . . .} O = {s0, . . . , s2n+1 0, . . .}

2

slide-5
SLIDE 5

Reasoning Using Explicit Induction Principles

  • We reason using the corresponding induction principles

Γ ⊢ INDQ(F) (∀Q mutually recursive with P) Γ, F( ⃗ t) ⊢ ∆ Γ, P⃗ t ⊢ ∆

  • E.g. the productions for N give

Γ ⊢ F(0) Γ, F(x) ⊢ F(sx) Γ, F(t) ⊢ ∆ Γ, Nt ⊢ ∆

3

slide-6
SLIDE 6

Non-well-founded Proofs: Reasoning by Infinite Descent

. . . . . . . .

  • .

. . . .

  • . . . . . . . .

P t

(Inference)

  • ·

· ·

  • (Axiom)
  • (Axiom)
  • (Axiom)
  • Q u
  • We trace predicate instances through the proof
  • At certain points, these progress (i.e. get ‘smaller’)
  • Each infinite path must admit some infinite descent
  • This global trace condition is an
  • regular property
  • i.e. decidable using Büchi automata

4

slide-7
SLIDE 7

Non-well-founded Proofs: Reasoning by Infinite Descent

. . . . . . . .

  • .

. . . .

  • . . . . . . . . ∞

(Inference)

  • ·

· ·

  • (Axiom)
  • (Axiom)

(Axiom)

  • We trace predicate instances through the proof
  • At certain points, these progress (i.e. get ‘smaller’)
  • Each infinite path must admit some infinite descent
  • This global trace condition is an
  • regular property
  • i.e. decidable using Büchi automata

4

slide-8
SLIDE 8

Non-well-founded Proofs: Reasoning by Infinite Descent

. . . . . . . .

  • Q(⃗

u)

. . . . .

R(⃗ s) . . . . . . . . ∞

(Inference)

P(⃗ r)

· · ·

P( ⃗ t)

(Axiom)

  • (Axiom)

(Axiom)

  • We trace predicate instances through the proof
  • At certain points, these progress (i.e. get ‘smaller’)
  • Each infinite path must admit some infinite descent
  • This global trace condition is an
  • regular property
  • i.e. decidable using Büchi automata

4

slide-9
SLIDE 9

Non-well-founded Proofs: Reasoning by Infinite Descent

. . . . . . . .

  • Q(⃗

u)

. . . . .

R(⃗ s) . . . . . . . . ∞

(Inference)

P(⃗ r)

· · ·

P( ⃗ t)

(Axiom)

  • (Axiom)

(Axiom)

  • We trace predicate instances through the proof
  • At certain points, these progress (i.e. get ‘smaller’)
  • Each infinite path must admit some infinite descent
  • This global trace condition is an
  • regular property
  • i.e. decidable using Büchi automata

4

slide-10
SLIDE 10

Non-well-founded Proofs: Reasoning by Infinite Descent

. . . . . . . .

  • Q(⃗

u)

. . . . .

R(⃗ s) . . . . . . . . ∞

(Inference)

P(⃗ r)

· · ·

P( ⃗ t)

(Axiom)

  • (Axiom)

(Axiom)

  • We trace predicate instances through the proof
  • At certain points, these progress (i.e. get ‘smaller’)
  • Each infinite path must admit some infinite descent
  • This global trace condition is an
  • regular property
  • i.e. decidable using Büchi automata

4

slide-11
SLIDE 11

Non-well-founded Proofs: Reasoning by Infinite Descent

. . . . . . . .

  • Q(⃗

u)

. . . . .

R(⃗ s) . . . . . . . . P( ⃗ t)

(Inference)

P(⃗ r)

· · ·

P( ⃗ t)

(Axiom)

  • (Axiom)

(Axiom)

Q(⃗ u)

  • We trace predicate instances through the proof
  • At certain points, these progress (i.e. get ‘smaller’)
  • Each infinite path must admit some infinite descent
  • This global trace condition is an ω-regular property
  • i.e. decidable using Büchi automata

4

slide-12
SLIDE 12

An Example Cyclic Proof

⇒ N 0 N x ⇒ N sx ⇒ E 0 O x ⇒ E sx E x ⇒ O sx (N R1) ⊢ N 0 (=L) x = 0 ⊢ N x E x ⊢ N x (Subst) E z ⊢ N z (N R2) E z ⊢ N sz (=L) y = sz, E z ⊢ N y (Case O) O y ⊢ N y (N R2) O y ⊢ N sy (=L) x = sy, O y ⊢ N x (Case E) E x ⊢ N x

5

slide-13
SLIDE 13

An Example Cyclic Proof

⇒ N 0 N x ⇒ N sx ⇒ E 0 O x ⇒ E sx E x ⇒ O sx (N R1) ⊢ N 0 (=L) x = 0 ⊢ N x E x ⊢ N x (Subst) E z ⊢ N z (N R2) E z ⊢ N sz (=L) y = sz, E z ⊢ N y (Case O) O y ⊢ N y (N R2) O y ⊢ N sy (=L) x = sy, O y ⊢ N x (Case E) E x ⊢ N x Left unfolding rule

5

slide-14
SLIDE 14

An Example Cyclic Proof

⇒ N 0 N x ⇒ N sx ⇒ E 0 O x ⇒ E sx E x ⇒ O sx (N R1) ⊢ N 0 (=L) x = 0 ⊢ N x E x ⊢ N x (Subst) E z ⊢ N z (N R2) E z ⊢ N sz (=L) y = sz, E z ⊢ N y (Case O) O y ⊢ N y (N R2) O y ⊢ N sy (=L) x = sy, O y ⊢ N x (Case E) E x ⊢ N x Left unfolding rule

5

slide-15
SLIDE 15

An Example Cyclic Proof

⇒ N 0 N x ⇒ N sx ⇒ E 0 O x ⇒ E sx E x ⇒ O sx (N R1) ⊢ N 0 (=L) x = 0 ⊢ N x E x ⊢ N x (Subst) E z ⊢ N z (N R2) E z ⊢ N sz (=L) y = sz, E z ⊢ N y (Case O) O y ⊢ N y (N R2) O y ⊢ N sy (=L) x = sy, O y ⊢ N x (Case E) E x ⊢ N x Right unfolding rule

5

slide-16
SLIDE 16

An Example Cyclic Proof

⇒ N 0 N x ⇒ N sx ⇒ E 0 O x ⇒ E sx E x ⇒ O sx (N R1) ⊢ N 0 (=L) x = 0 ⊢ N x E x ⊢ N x (Subst) E z ⊢ N z (N R2) E z ⊢ N sz (=L) y = sz, E z ⊢ N y (Case O) O y ⊢ N y (N R2) O y ⊢ N sy (=L) x = sy, O y ⊢ N x (Case E) E x ⊢ N x Right unfolding rule

5

slide-17
SLIDE 17

An Example Cyclic Proof

⇒ N 0 N x ⇒ N sx ⇒ E 0 O x ⇒ E sx E x ⇒ O sx (N R1) ⊢ N 0 (=L) x = 0 ⊢ N x E x ⊢ N x (Subst) E z ⊢ N z (N R2) E z ⊢ N sz (=L) y = sz, E z ⊢ N y (Case O) O y ⊢ N y (N R2) O y ⊢ N sy (=L) x = sy, O y ⊢ N x (Case E) E x ⊢ N x Right unfolding rule

5

slide-18
SLIDE 18

An Example Cyclic Proof

⇒ N 0 N x ⇒ N sx ⇒ E 0 O x ⇒ E sx E x ⇒ O sx (N R1) ⊢ N 0 (=L) x = 0 ⊢ N x E x ⊢ N x (Subst) E z ⊢ N z (N R2) E z ⊢ N sz (=L) y = sz, E z ⊢ N y (Case O) O y ⊢ N y (N R2) O y ⊢ N sy (=L) x = sy, O y ⊢ N x (Case E) E x ⊢ N x

5

slide-19
SLIDE 19

Comparing the Two Approaches

For FOL with Martin-Löf style inductive definitions:

[Brotherston & Simpson, 2007]

  • Infinitary system sound/complete for standard semantics
  • Cyclic system subsumes explicit induction
  • Equivalent under arithmetic
  • Not equivalent in general (2-Hydra counterexample)

[Berardi & Tatsuta, 2017]

  • Explicit induction sound/complete for Henkin semantics

6

slide-20
SLIDE 20

Comparing the Two Approaches

For FOL with Martin-Löf style inductive definitions:

[Brotherston & Simpson, 2007]

  • Infinitary system sound/complete for standard semantics
  • Cyclic system subsumes explicit induction
  • Equivalent under arithmetic
  • Not equivalent in general (2-Hydra counterexample)

[Berardi & Tatsuta, 2017]

  • Explicit induction sound/complete for Henkin semantics

6

slide-21
SLIDE 21

Comparing the Two Approaches

For FOL with Martin-Löf style inductive definitions:

[Brotherston & Simpson, 2007]

  • Infinitary system sound/complete for standard semantics
  • Cyclic system subsumes explicit induction
  • Equivalent under arithmetic
  • Not equivalent in general (2-Hydra counterexample)

[Berardi & Tatsuta, 2017]

  • Explicit induction sound/complete for Henkin semantics

6

slide-22
SLIDE 22

Transitive Closure Logic

slide-23
SLIDE 23

Transitive Closure Logic

Transitive Closure (TC) Logic extends FOL with formulas:

  • (RTCx,y ϕ)(s, t)
  • ϕ is a formula
  • x and y are distinct variables (which become bound in ϕ)
  • s and t are terms

whose intended meaning is an infinite disjunction s = t ∨ ϕ[s/x, t/y] ∨ (∃w1 . ϕ[s/x, w1/y] ∧ ϕ[w1/x, t/y]) ∨ (∃w1, w2 . ϕ[s/x, w1/y] ∧ ϕ[w1/x, w2/y] ∧ ϕ[w2/x, t/y]) ∨ . . .

7

slide-24
SLIDE 24

Transitive Closure Logic: Standard Semantics

The formal semantics:

  • M is a (standard) first-order model with domain D
  • v is a valuation of terms in M:

M, v | = (RTCx,y ϕ)(s, t) a0 an D v s a0 v t an M v x ai y ai

1

for all i n

a0 a1 a2 an

1

an v s v t

8

slide-25
SLIDE 25

Transitive Closure Logic: Standard Semantics

The formal semantics:

  • M is a (standard) first-order model with domain D
  • v is a valuation of terms in M:

M, v | = (RTCx,y ϕ)(s, t) ⇔ ∃a0, . . . , an ∈ D v s a0 v t an M v x ai y ai

1

for all i n

a0 a1 a2 an−1 an v s v t

. . .

8

slide-26
SLIDE 26

Transitive Closure Logic: Standard Semantics

The formal semantics:

  • M is a (standard) first-order model with domain D
  • v is a valuation of terms in M:

M, v | = (RTCx,y ϕ)(s, t) ⇔ ∃a0, . . . , an ∈ D . v(s) = a0 ∧ v(t) = an M v x ai y ai

1

for all i n

a0 a1 a2 an−1 an v(s) v(t)

. . .

8

slide-27
SLIDE 27

Transitive Closure Logic: Standard Semantics

The formal semantics:

  • M is a (standard) first-order model with domain D
  • v is a valuation of terms in M:

M, v | = (RTCx,y ϕ)(s, t) ⇔ ∃a0, . . . , an ∈ D . v(s) = a0 ∧ v(t) = an ∧ M, v[x := ai, y := ai+1] | = ϕ for all i < n

a0 a1 a2 an−1 an v(s) v(t)

φ φ φ φ

8

slide-28
SLIDE 28

Example: Arithmetic in TC

Take a signature Σ = {0, s} + equality and pairing Nat(x) ≡ (RTCv,w sv = w)(0, x) x y RTCv w sv w x y “x y z” RTCv w n1 n2 v n1 n2 w sn1 sn2 0 y z x

s0 ss0 sn-1 0 x

s· = · s· = · s· = · s· = ·

0 y s0 sy ss0 ssy sz 0 sz y 9

slide-29
SLIDE 29

Example: Arithmetic in TC

Take a signature Σ = {0, s} + equality and pairing Nat(x) ≡ (RTCv,w sv = w)(0, x) x ≤ y ≡ (RTCv,w sv = w)(x, y) “x y z” RTCv w n1 n2 v n1 n2 w sn1 sn2 0 y z x

x sx ssx sn-1 x y

s· = · s· = · s· = · s· = ·

0 y s0 sy ss0 ssy sz 0 sz y 9

slide-30
SLIDE 30

Example: Arithmetic in TC

Take a signature Σ = {0, s} + equality and pairing Nat(x) ≡ (RTCv,w sv = w)(0, x) x ≤ y ≡ (RTCv,w sv = w)(x, y) “x = y + z” ≡ (RTCv,w ∃n1, n2 . v = ⟨n1, n2⟩ ∧ w = ⟨sn1, sn2⟩)(⟨0, y⟩, ⟨z, x⟩)

x sx ssx sn 1 x y

s s s s

0 y s0 sy ss0 ssy sz 0 sz y 9

slide-31
SLIDE 31

Example: Arithmetic in TC

Take a signature Σ = {0, s} + equality and pairing Nat(x) ≡ (RTCv,w sv = w)(0, x) x ≤ y ≡ (RTCv,w sv = w)(x, y) “x = y + z” ≡ (RTCv,w ∃n1, n2 . v = ⟨n1, n2⟩ ∧ w = ⟨sn1, sn2⟩)(⟨0, y⟩, ⟨z, x⟩)

x sx ssx sn 1 x y

s s s s

⟨0, y⟩ s0 sy ss0 ssy sz 0 sz y 9

slide-32
SLIDE 32

Example: Arithmetic in TC

Take a signature Σ = {0, s} + equality and pairing Nat(x) ≡ (RTCv,w sv = w)(0, x) x ≤ y ≡ (RTCv,w sv = w)(x, y) “x = y + z” ≡ (RTCv,w ∃n1, n2 . v = ⟨n1, n2⟩ ∧ w = ⟨sn1, sn2⟩)(⟨0, y⟩, ⟨z, x⟩)

x sx ssx sn 1 x y

s s s s

⟨0, y⟩ ⟨s0, sy⟩ ss0 ssy sz 0 sz y 9

slide-33
SLIDE 33

Example: Arithmetic in TC

Take a signature Σ = {0, s} + equality and pairing Nat(x) ≡ (RTCv,w sv = w)(0, x) x ≤ y ≡ (RTCv,w sv = w)(x, y) “x = y + z” ≡ (RTCv,w ∃n1, n2 . v = ⟨n1, n2⟩ ∧ w = ⟨sn1, sn2⟩)(⟨0, y⟩, ⟨z, x⟩)

x sx ssx sn 1 x y

s s s s

⟨0, y⟩ ⟨s0, sy⟩ ⟨ss0, ssy⟩ sz 0 sz y 9

slide-34
SLIDE 34

Example: Arithmetic in TC

Take a signature Σ = {0, s} + equality and pairing Nat(x) ≡ (RTCv,w sv = w)(0, x) x ≤ y ≡ (RTCv,w sv = w)(x, y) “x = y + z” ≡ (RTCv,w ∃n1, n2 . v = ⟨n1, n2⟩ ∧ w = ⟨sn1, sn2⟩)(⟨0, y⟩, ⟨z, x⟩)

x sx ssx sn 1 x y

s s s s

⟨0, y⟩ ⟨s0, sy⟩ ⟨ss0, ssy⟩ ⟨sz 0, sz y⟩ 9

slide-35
SLIDE 35

Proof Rules for Reasoning in TC

reflexivity ⊢ (RTCx,y φ)(t, t) step Γ ⊢ ∆, (RTCx,y φ)(s, r) Γ ⊢ ∆, φ[r/x, t/y] Γ ⊢ ∆, (RTCx,y φ)(s, t) induction Γ ⊢ ∆, ψ[s/x] Γ, ψ(x), φ(x, y) ⊢ ∆, ψ[y/x] Γ, ψ[t/x] ⊢ ∆ Γ, (RTCx,y φ)(s, t) ⊢ ∆

x ̸∈ fv(Γ, ∆) and y ̸∈ fv(Γ, ∆, ψ)

case-split s t RTCx y s z z x t y

(z fresh)

RTCx y s t

10

slide-36
SLIDE 36

Proof Rules for Reasoning in TC

reflexivity ⊢ (RTCx,y φ)(t, t) step Γ ⊢ ∆, (RTCx,y φ)(s, r) Γ ⊢ ∆, φ[r/x, t/y] Γ ⊢ ∆, (RTCx,y φ)(s, t) induction Γ ⊢ ∆, ψ[s/x] Γ, ψ(x), φ(x, y) ⊢ ∆, ψ[y/x] Γ, ψ[t/x] ⊢ ∆ Γ, (RTCx,y φ)(s, t) ⊢ ∆

x ̸∈ fv(Γ, ∆) and y ̸∈ fv(Γ, ∆, ψ)

case-split Γ, s = t ⊢ ∆ Γ, (RTCx,y φ)(s, z), φ[z/x, t/y] ⊢ ∆

(z fresh)

Γ, (RTCx,y φ)(s, t) ⊢ ∆

10

slide-37
SLIDE 37

Proof Rules for Reasoning in TC

reflexivity ⊢ (RTCx,y φ)(t, t) step Γ ⊢ ∆, (RTCx,y φ)(s, r) Γ ⊢ ∆, φ[r/x, t/y] Γ ⊢ ∆, (RTCx,y φ)(s, t) induction Γ ⊢ ∆, ψ[s/x] Γ, ψ(x), φ(x, y) ⊢ ∆, ψ[y/x] Γ, ψ[t/x] ⊢ ∆ Γ, (RTCx,y φ)(s, t) ⊢ ∆

x ̸∈ fv(Γ, ∆) and y ̸∈ fv(Γ, ∆, ψ)

case-split Γ, s = t ⊢ ∆ Γ, (RTCx,y φ)(s, z), φ[z/x, t/y] ⊢ ∆

(z fresh)

Γ, (RTCx,y φ)(s, t) ⊢ ∆

10

slide-38
SLIDE 38

Advantages of TC as a Formal Framework

  • It is only a minimal extension of FOL
  • It only requires a single, uniform induction principle
  • No need to ‘choose’ particular inductive definitions
  • It is a sufficiently expressive logic

Theorem (Avron ’03)

All finitely inductively definable relations† are definable in TC.

  • A. Avron, Transitive Closure and the Mechanization of Mathematics.

†as formalised in: S. Feferman, Finitary Inductively Presented Logics, 1989

11

slide-39
SLIDE 39

Comparing Styles of Induction for TC

  • Infinitary system sound/complete for standard semantics
  • Cyclic system subsumes explicit induction
  • Equivalent under arithmetic
  • Don’t know if they are inequivalent in general!

2-Hydra does not work since all inductive definitions available via RTC

  • Explicit induction sound/complete for Henkin semantics

12

slide-40
SLIDE 40

Comparing Styles of Induction for TC

  • Infinitary system sound/complete for standard semantics
  • Cyclic system subsumes explicit induction
  • Equivalent under arithmetic
  • Don’t know if they are inequivalent in general!

2-Hydra does not work since all inductive definitions available via RTC

  • Explicit induction sound/complete for Henkin semantics

12

slide-41
SLIDE 41

Comparing Styles of Induction for TC

  • Infinitary system sound/complete for standard semantics
  • Cyclic system subsumes explicit induction
  • Equivalent under arithmetic
  • Don’t know if they are inequivalent in general!

2-Hydra does not work since all inductive definitions available via RTC

  • Explicit induction sound/complete for Henkin semantics

12

slide-42
SLIDE 42

Comparing Styles of Induction for TC

  • Infinitary system sound/complete for standard semantics
  • Cyclic system subsumes explicit induction
  • Equivalent under arithmetic
  • Don’t know if they are inequivalent in general!

2-Hydra does not work since all inductive definitions available via RTC

  • Explicit induction sound/complete for Henkin semantics

12

slide-43
SLIDE 43

Future Work

  • open question of equivalence for TC proof systems
  • Implementation to support automated reasoning.
  • Use TC to better study implicit vs explicit induction.
  • Adapt TC for coinductive reasoning?

13

slide-44
SLIDE 44

Thank you!