Page 1
Verification of PCP-RelatedComputational Reductions in Coq
Yannick Forster, Edith Heiter, Gert Smolka
ITP 2018July 12
computer science
saarlanduniversity
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 1
Page 2
computer science
saarlanduniversityDecidability
A problem P : X → P is decidable if . . .
Classically Fix a model of computation M:there is a decider in M
For the cbv λ-calculus ∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory ∃f : X → B. ∀x : X . Px ↔ fx = true
dependent version(Coq, Agda, Lean, . . . ) ∀x : X . {Px}+ {¬Px}
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 2
Page 3
computer science
saarlanduniversityDecidability
A problem P : X → P is decidable if . . .
Classically Fix a model of computation M:there is a decider in M
For the cbv λ-calculus ∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory ∃f : X → B. ∀x : X . Px ↔ fx = true
dependent version(Coq, Agda, Lean, . . . ) ∀x : X . {Px}+ {¬Px}
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 2
Page 4
computer science
saarlanduniversityDecidability
A problem P : X → P is decidable if . . .
Classically Fix a model of computation M:there is a decider in M
For the cbv λ-calculus ∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory ∃f : X → B. ∀x : X . Px ↔ fx = true
dependent version(Coq, Agda, Lean, . . . ) ∀x : X . {Px}+ {¬Px}
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 2
Page 5
computer science
saarlanduniversityDecidability
A problem P : X → P is decidable if . . .
Classically Fix a model of computation M:there is a decider in M
For the cbv λ-calculus ∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory ∃f : X → B. ∀x : X . Px ↔ fx = true
dependent version(Coq, Agda, Lean, . . . ) ∀x : X . {Px}+ {¬Px}
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 2
Page 6
computer science
saarlanduniversityUndecidability
A problem P : X → P is undecidable if . . .
Classically If there is no decider u in M
For the cbv λ-calculus ¬∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory
In practice: most proofs are by reduction
Definition
P undecidable := Halting problem reduces to P
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 3
Page 7
computer science
saarlanduniversityUndecidability
A problem P : X → P is undecidable if . . .
Classically If there is no decider u in M
For the cbv λ-calculus ¬∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory
In practice: most proofs are by reduction
Definition
P undecidable := Halting problem reduces to P
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 3
Page 8
computer science
saarlanduniversityUndecidability
A problem P : X → P is undecidable if . . .
Classically If there is no decider u in M
For the cbv λ-calculus ¬∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory ¬(∀x : X . {Px}+ {¬Px})
In practice: most proofs are by reduction
Definition
P undecidable := Halting problem reduces to P
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 3
Page 9
computer science
saarlanduniversityUndecidability
A problem P : X → P is undecidable if . . .
Classically If there is no decider u in M
For the cbv λ-calculus ¬∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory((((((((((((¬(∀x : X . {Px}+ {¬Px})
In practice: most proofs are by reduction
Definition
P undecidable := Halting problem reduces to P
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 3
Page 10
computer science
saarlanduniversityUndecidability
A problem P : X → P is undecidable if . . .
Classically If there is no decider u in M
For the cbv λ-calculus ¬∃u : T.∀x : X . (ux . T ∧ Px)∨ (ux . F ∧ ¬Px)
Type Theory((((((((((((¬(∀x : X . {Px}+ {¬Px})
In practice: most proofs are by reduction
Definition
P undecidable := Halting problem reduces to P
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 3
Page 11
computer science
saarlanduniversityReduction
A problem is a type X and a unary predicate P : X → P
A reduction of (X ,P) to (Y ,Q) is a function f : X → Y s.t.∀x . Px ↔ Q(fx)
Write
P � Q
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 4
Page 12
computer science
saarlanduniversity
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 5
Page 13
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 14
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 15
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 16
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 17
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor
d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 18
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 19
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 20
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 21
computer science
saarlanduniversityPCP
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
Symbols a, b, c: NStrings x , y , z : lists of symbols
Card c: pairs of strings
Stacks A,P: lists of cards
A ⊆ P: list inclusion
[ ]1 := ε [ ]2 := ε
(x/y :: A)1 := x(A1) (x/y :: A)2 := y(A2)
PCP (P) := ∃A ⊆ P. A 6= [ ]∧ A1 = A2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 6
Page 22
computer science
saarlanduniversityHistory
TM halting � MPCP
SR � PCP PCP � CFI
At best proof sketches, no inductions are given
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 7
Page 23
computer science
saarlanduniversityHistory
TM halting � MPCP SR � PCP
PCP � CFI
At best proof sketches, no inductions are given
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 7
Page 24
computer science
saarlanduniversityHistory
TM halting � MPCP SR � PCP PCP � CFI
At best proof sketches, no inductions are given
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 7
Page 25
computer science
saarlanduniversityHistory
TM halting � MPCP SR � PCP PCP � CFI
At best proof sketches, no inductions are given
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 7
Page 26
computer science
saarlanduniversityContribution
CFI
TM SRH SR MPCP PCP
CFP
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 8
Page 27
computer science
saarlanduniversityContribution
CFI
TM SRH SR MPCP PCP
CFP
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 8
Page 28
computer science
saarlanduniversity
MPCP � PCP
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 8
Page 29
computer science
saarlanduniversityMPCP
C2
LoC2018
xfor FLo
F
d
ord
018inO
inOxf
C2
LoC2018
xfor FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
MPCP (x/y ,P) := ∃A ⊆ x/y :: P. xA1 = yA2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 9
Page 30
computer science
saarlanduniversityMPCP
C2
LoC2018
xfor FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
MPCP (x/y ,P) := ∃A ⊆ x/y :: P. xA1 = yA2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 9
Page 31
computer science
saarlanduniversityMPCP
C2
LoC2018
xfor FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
MPCP (x/y ,P) := ∃A ⊆ x/y :: P. xA1 = yA2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 9
Page 32
computer science
saarlanduniversityMPCP
C2
LoC2018
xfor FLo
F
d
ord
018inO
inOxf
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
MPCP (x/y ,P) := ∃A ⊆ x/y :: P. xA1 = yA2
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 9
Page 33
computer science
saarlanduniversityMPCP � PCP
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
$#F#L#o#C#2#0#1#8#i#n#O#x#f#o#r#d#$
$#F#L#o#C#2#0#1#8#i#n#O#x#f#o#r#d#$
$#F#L#o
$#F#
#C#2
L#o#C#2#0#1#8#
#0#1#8#i#n#O
i#n#O#x#f#
#x#f#o#r #d
o#r#d#
#$
$
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 10
Page 34
computer science
saarlanduniversityMPCP � PCP
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
$#F#L#o#C#2#0#1#8#i#n#O#x#f#o#r#d#$
$#F#L#o#C#2#0#1#8#i#n#O#x#f#o#r#d#$
$#F#L#o
$#F#
#C#2
L#o#C#2#0#1#8#
#0#1#8#i#n#O
i#n#O#x#f#
#x#f#o#r #d
o#r#d#
#$
$
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 10
Page 35
computer science
saarlanduniversityMPCP � PCP
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018inOxford
FLoC2018inOxford
$#F#L#o#C#2#0#1#8#i#n#O#x#f#o#r#d#$
$#F#L#o#C#2#0#1#8#i#n#O#x#f#o#r#d#$
$#F#L#o
$#F#
#C#2
L#o#C#2#0#1#8#
#0#1#8#i#n#O
i#n#O#x#f#
#x#f#o#r #d
o#r#d#
#$
$
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 10
Page 36
computer science
saarlanduniversityMPCP � PCP
$#F#L#o
$#F#
#C#2
L#o#C#2#0#1#8#
#0#1#8#i#n#O
i#n#O#x#f#
#x#f#o#r #d
o#r#d#
#$
#
#ε := ε ε# := ε#(ax) := #a(#x) (ax)# := a#(x#)
We define:
d := $(#x0) / $#(y#0 )
e := #$ / $
P := {d , e}++ {#x / y# | x/y ∈ x0/y0 :: R ∧ (x/y) 6= (ε/ε)}
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 11
Page 37
computer science
saarlanduniversityMPCP � PCP
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 12
Page 38
computer science
saarlanduniversity
SR � MPCP
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 12
Page 39
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 40
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
$
$aab#
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 41
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
$
$aab#
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 42
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
$
$aab#
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 43
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
$aab#
$aab#aba#
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 44
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
$aab#aba#
$aab#aba#baa#
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 45
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
$aab#aba#baa#
$aab#aba#baa#bab#
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 46
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
$aab#aba#baa#bab#$
$aab#aba#baa#bab#$
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 47
computer science
saarlanduniversitySR � MPCP
Let R = [ab/ba︸ ︷︷ ︸1
, aa/ab︸ ︷︷ ︸2
] and aab �∗R bab with
aab �1 aba �1 baa �2 bab
$
$aab#
a
a
ab
ba
#
#
ab
ba
a
a
#
#
b
b
aa
ab
#
#
bab#$
$
$aab#aba#baa#bab#$
$aab#aba#baa#bab#$
copy cards transfer unchanged symbols to the next string
rewrite cards simulate a single rewrite
consecutive strings are separated by #
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 13
Page 48
computer science
saarlanduniversitySR � MPCP
Given R and x0, y0 construct P such that x0 �∗ y0 ↔ PCP(P):
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Theorem
x0 �∗R y0 if and only if there exists a stack A ⊆ P such that d :: A matches.
Lemma
Let x ⊆ Σ and x �∗R y0. Then there exists A ⊆ P such that A1 = x#A2.
Lemma
Let A ⊆ P, A1 = x#yA2, and x , y ⊆ Σ. Then yx �∗R y0.
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 14
Page 49
computer science
saarlanduniversitySR � MPCP
Given R and x0, y0 construct P such that x0 �∗ y0 ↔ PCP(P):
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Theorem
x0 �∗R y0 if and only if there exists a stack A ⊆ P such that d :: A matches.
Lemma
Let x ⊆ Σ and x �∗R y0. Then there exists A ⊆ P such that A1 = x#A2.
Lemma
Let A ⊆ P, A1 = x#yA2, and x , y ⊆ Σ. Then yx �∗R y0.
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 14
Page 50
computer science
saarlanduniversitySR � MPCP
Given R and x0, y0 construct P such that x0 �∗ y0 ↔ PCP(P):
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Theorem
x0 �∗R y0 if and only if there exists a stack A ⊆ P such that d :: A matches.
Lemma
Let x ⊆ Σ and x �∗R y0. Then there exists A ⊆ P such that A1 = x#A2.
Lemma
Let A ⊆ P, A1 = x#yA2, and x , y ⊆ Σ. Then yx �∗R y0.
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 14
Page 51
computer science
saarlanduniversitySR � MPCP
Given R and x0, y0 construct P such that x0 �∗ y0 ↔ PCP(P):
d := $ / $x0#
e := y0#$ / $
P := [d , e] ++R ++ [#/#] ++ [a/a | a ∈ Σ]
Theorem
x0 �∗R y0 if and only if there exists a stack A ⊆ P such that d :: A matches.
Lemma
Let x ⊆ Σ and x �∗R y0. Then there exists A ⊆ P such that A1 = x#A2.
Lemma
Let A ⊆ P, A1 = x#yA2, and x , y ⊆ Σ. Then yx �∗R y0.
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 14
Page 52
computer science
saarlanduniversityPost Correspondence Problems are special CFGs
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
Produce grammars:
G1(P) : N → C2 M C2#LoC2018# G2(P) : N → LoC2018 M C2#LoC2018#
N → xfor M xfor## N → M xfor##
N → nf M nf#d# N → d M nf#d#
N → FLo M FLo#F# N → F M FLo#F#
N → d M d#ord# N → ord M d#ord#
N → 018inO M 018inO#inOxf# N → inOxf M 018inO#inOxf#
M → N | # M → N | #
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
PCP(P)↔ L(G1(P))∩L(G2(P)) 6= ∅
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 15
Page 53
computer science
saarlanduniversityPost Correspondence Problems are special CFGs
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
Produce grammars:
G1(P) : N → C2 M C2#LoC2018# G2(P) : N → LoC2018 M C2#LoC2018#
N → xfor M xfor## N → M xfor##
N → nf M nf#d# N → d M nf#d#
N → FLo M FLo#F# N → F M FLo#F#
N → d M d#ord# N → ord M d#ord#
N → 018inO M 018inO#inOxf# N → inOxf M 018inO#inOxf#
M → N | # M → N | #
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
PCP(P)↔ L(G1(P))∩L(G2(P)) 6= ∅
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 15
Page 54
computer science
saarlanduniversityPost Correspondence Problems are special CFGs
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
Produce grammars:
G1(P) : N → C2 M C2#LoC2018# G2(P) : N → LoC2018 M C2#LoC2018#
N → xfor M xfor## N → M xfor##
N → nf M nf#d# N → d M nf#d#
N → FLo M FLo#F# N → F M FLo#F#
N → d M d#ord# N → ord M d#ord#
N → 018inO M 018inO#inOxf# N → inOxf M 018inO#inOxf#
M → N | # M → N | #
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLo N FLo#F#
F N FLo#F#
PCP(P)↔ L(G1(P))∩L(G2(P)) 6= ∅Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 15
Page 55
computer science
saarlanduniversityPost Correspondence Problems are special CFGs
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
Produce grammars:
G1(P) : N → C2 M C2#LoC2018# G2(P) : N → LoC2018 M C2#LoC2018#
N → xfor M xfor## N → M xfor##
N → nf M nf#d# N → d M nf#d#
N → FLo M FLo#F# N → F M FLo#F#
N → d M d#ord# N → ord M d#ord#
N → 018inO M 018inO#inOxf# N → inOxf M 018inO#inOxf#
M → N | # M → N | #
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2 N C2#LoC2018#FLo#F#
FLoC2018 N C2#LoC2018#FLo#F#
PCP(P)↔ L(G1(P))∩L(G2(P)) 6= ∅Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 15
Page 56
computer science
saarlanduniversityPost Correspondence Problems are special CFGs
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
Produce grammars:
G1(P) : N → C2 M C2#LoC2018# G2(P) : N → LoC2018 M C2#LoC2018#
N → xfor M xfor## N → M xfor##
N → nf M nf#d# N → d M nf#d#
N → FLo M FLo#F# N → F M FLo#F#
N → d M d#ord# N → ord M d#ord#
N → 018inO M 018inO#inOxf# N → inOxf M 018inO#inOxf#
M → N | # M → N | #
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018InO N 018inO#inOxf#C2#LoC2018#FLo#F#
FLoC2018InOxf N 018inO#inOxf#C2#LoC2018#FLo#F#
PCP(P)↔ L(G1(P))∩L(G2(P)) 6= ∅Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 15
Page 57
computer science
saarlanduniversityPost Correspondence Problems are special CFGs
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
Produce grammars:
G1(P) : N → C2 M C2#LoC2018# G2(P) : N → LoC2018 M C2#LoC2018#
N → xfor M xfor## N → M xfor##
N → nf M nf#d# N → d M nf#d#
N → FLo M FLo#F# N → F M FLo#F#
N → d M d#ord# N → ord M d#ord#
N → 018inO M 018inO#inOxf# N → inOxf M 018inO#inOxf#
M → N | # M → N | #
FLo
F
C2
LoC2018
018inO
inOxf
xfor
d
ord
FLoC2018InOxfor N xfor#018inO#inOxf#C2#LoC2018#FLo#F#
FLoC2018InOxf N xfor#018inO#inOxf#C2#LoC2018#FLo#F#
PCP(P)↔ L(G1(P))∩L(G2(P)) 6= ∅Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 15
Page 58
computer science
saarlanduniversityPost Correspondence Problems are special CFGs
C2
LoC2018
xfor nf
d
FLo
F
d
ord
018inO
inOxf
Produce grammars:
G1(P) : N → C2 M C2#LoC2018# G2(P) : N → LoC2018 M C2#LoC2018#
N → xfor M xfor## N → M xfor##
N → nf M nf#d# N → d M nf#d#
N → FLo M FLo#F# N → F M FLo#F#
N → d M d#ord# N → ord M d#ord#
N → 018inO M 018inO#inOxf# N → inOxf M 018inO#inOxf#
M → N | # M → N | #
FLo
F
C2
LoC2018
018inO
inOxf
xfor d
ord
FLoC2018InOxford # d#ord#xfor#018inO#inOxf#C2#LoC2018#FLo#F#
FLoC2018InOxford # d#ord#xfor#018inO#inOxf#C2#LoC2018#FLo#F#
PCP(P)↔ L(G1(P))∩L(G2(P)) 6= ∅Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 15
Page 59
computer science
saarlanduniversityTM halting � SR
We use the TM definition from Asperti, Ricciotti (2015, in Matita)
Turing machines are special forms of rewriting systems:
Huge proof, essentially a big case distinction, no insight
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 16
Page 60
computer science
saarlanduniversityTM halting � SR
We use the TM definition from Asperti, Ricciotti (2015, in Matita)
Turing machines are special forms of rewriting systems:
Huge proof, essentially a big case distinction, no insight
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 16
Page 61
computer science
saarlanduniversityTM halting � SR
We use the TM definition from Asperti, Ricciotti (2015, in Matita)
Turing machines are special forms of rewriting systems:
Huge proof, essentially a big case distinction, no insight
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 16
Page 62
computer science
saarlanduniversityTM halting � SR
We use the TM definition from Asperti, Ricciotti (2015, in Matita)
Turing machines are special forms of rewriting systems:
Huge proof, essentially a big case distinction, no insight
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 16
Page 63
computer science
saarlanduniversityFuture Work
CFP CFI
TM PCP
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 64
computer science
saarlanduniversityFuture Work
CFP CFI ILL
TM PCP BPCP BSM MM eILLForster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 65
computer science
saarlanduniversityFuture Work
FXP FAM
CFP CFI ILL
cbvλ 2SM mTM TM PCP BPCP BSM MM eILL
Larchey-Wendling
Forster, Kunze, SmolkaForster, Wuttke
Forster, Kunze
Forster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 66
computer science
saarlanduniversityFuture Work
FXP FAM
CFP CFI ILL
cbvλ 2SM mTM TM PCP BPCP BSM MM eILL
(i)FOL
Larchey-Wendling
Forster, Kunze, SmolkaForster, Wuttke
Forster, Kunze
Forster, KirstForster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 67
computer science
saarlanduniversityFuture Work
FXP FAM
CFP CFI ILL
cbvλ 2SM mTM TM PCP BPCP BSM MM eILL
(i)FOL
HOL IPC2
Larchey-Wendling
Forster, Kunze, SmolkaForster, Wuttke
Forster, Kunze
Forster, KirstForster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 68
computer science
saarlanduniversityFuture Work
FXP FAM
CFP CFI 3rd-ord. unif ILL
cbvλ 2SM mTM TM PCP BPCP BSM MM eILL
(i)FOL
HOL IPC2
Larchey-Wendling
Forster, Kunze, SmolkaForster, Wuttke
Forster, Kunze
Forster, KirstForster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 69
computer science
saarlanduniversityFuture Work
FXP FAM
CFP CFI 3rd-ord. unif ILL
cbvλ 2SM mTM TM PCP BPCP BSM MM eILL
(i)FOL
HOL IPC2
tiling problems
Larchey-Wendling
Forster, Kunze, SmolkaForster, Wuttke
Forster, Kunze
Forster, KirstForster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 70
computer science
saarlanduniversityFuture Work
FXP FAM
CFP CFI 3rd-ord. unif ILL
cbvλ 2SM mTM TM PCP BPCP BSM MM eILL
(i)FOL
HOL IPC2
tiling problems
System F inhab.
diophantine eqs
Larchey-Wendling
Forster, Kunze, SmolkaForster, Wuttke
Forster, Kunze
Forster, KirstForster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 71
computer science
saarlanduniversityFuture Work
FXP FAM
CFP CFI 3rd-ord. unif ILL
cbvλ 2SM mTM TM PCP BPCP BSM MM eILL
(i)FOL
IMP HOL IPC2
µ rec. functions tiling problems
System F inhab.
diophantine eqs
Larchey-Wendling
Forster, Kunze, SmolkaForster, Wuttke
Forster, Kunze
Forster, KirstForster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 72
computer science
saarlanduniversityFuture Work
FXP FAM
CFP CFI 3rd-ord. unif ILL
cbvλ 2SM mTM TM PCP BPCP BSM MM eILL
(i)FOL
IMP HOL IPC2
µ rec. functions tiling problems
System F inhab.
diophantine eqs
Larchey-Wendling
Forster, Kunze, SmolkaForster, Wuttke
Forster, Kunze
Forster, KirstForster, Larchey-Wendling (LOLA18)
Forster, Kunze: Automated extraction from Coq to cbv λ-calculus yields
computability proofs for all reductions
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 17
Page 73
computer science
saarlanduniversityWrap-up
A novel way to prove undecidability in Coq
Transparent, explainable reduction from TM to PCP
Enabling loads of future work. Add your own undecidable problems!
https://www.ps.uni-saarland.de/extras/PCP/
Yannick Forster, Edith Heiter, Gert Smolka PCP-Related Computational Reductions ITP 2018 – July 12 18