forked from uds-psl/coq-library-undecidability
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUndecidability.v
More file actions
56 lines (47 loc) · 2.16 KB
/
Copy pathUndecidability.v
File metadata and controls
56 lines (47 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Require Export Undecidability.Synthetic.Definitions.
Require Import Undecidability.Synthetic.DecidabilityFacts.
Require Import Undecidability.Synthetic.ReducibilityFacts.
Require Import Undecidability.TM.SBTM.
(*
p is undecidable if decidability of p implies co-enumerability of Turing machine halting.
Since Turing machine halting is enumerable, its co-enumerability would imply its decidability.
Instead of Turing machine halting, any other many-one equivalent problem suffices.
For example (cf. [2]):
Post correspondence problem (cf. [1, Lemma 2.26]),
binary stack machine halting,
two-counter machine halting,
Diophantine constraint solvability, ...
References:
[1] Yannick Forster, Dominik Kirst, and Gert Smolka.
"On synthetic undecidability in Coq, with an application to the Entscheidungsproblem."
Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs. 2019.
[2] Yannick Forster.
"Computability in Constructive Type Theory."
PhD Thesis. Faculty of Mathematics and Computer Science of Saarland University. 2021.
https://www.ps.uni-saarland.de/~forster/thesis.php
*)
Definition undecidable {X} (p : X -> Prop) :=
decidable p -> enumerable (complement SBTM_HALT).
Lemma undecidability_from_reducibility {X} {p : X -> Prop} {Y} {q : Y -> Prop} :
undecidable p -> p ⪯ q -> undecidable q.
Proof.
unfold undecidable, decidable, decider, reduces, reduction, reflects.
intros H [f Hf] [d Hd]. eapply H. exists (fun x => d (f x)). intros x. rewrite Hf. eapply Hd.
Qed.
Lemma undecidability_from_complement {X} {p : X -> Prop} :
undecidable (complement p) -> undecidable p.
Proof.
intros H Hp. now apply H, dec_compl.
Qed.
Lemma undecidability_to_complement {X} {p : X -> Prop} :
undecidable (complement p) -> undecidable (complement (complement p)).
Proof.
intros H Hp. now apply H, dec_compl'.
Qed.
Module UndecidabilityNotations.
Import ReductionChainNotations.
Tactic Notation "undec" "from" constr(H) :=
apply (undecidability_from_reducibility H).
Tactic Notation "undec" "from" constr(U) "using" "chain" constr(C) :=
undec from U; reduce with chain C.
End UndecidabilityNotations.