-
Notifications
You must be signed in to change notification settings - Fork 0
/
summary.v
222 lines (174 loc) · 6.25 KB
/
summary.v
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
(**************************************************************)
(* Copyright Dominique Larchey-Wendling [*] *)
(* Yannick Forster [+] *)
(* *)
(* [*] Affiliation LORIA -- CNRS *)
(* [+] Affiliation Saarland Univ. *)
(**************************************************************)
(* This file is distributed under the terms of the *)
(* CeCILL v2 FREE SOFTWARE LICENSE AGREEMENT *)
(**************************************************************)
(* Summary file for "Hilbert's tenth problem in Coq"
by D. Larchey-Wendling and Y. Forster *)
Require Import Arith ZArith List.
From Undecidability.Shared.Libs.DLW
Require Import utils_tac pos vec sss.
From Undecidability.Synthetic Require Import Undecidability.
Require Import Undecidability.TM.TM.
From Undecidability.PCP
Require Import PCP PCP_undec HaltTM_1_to_PCPb.
From Undecidability.MinskyMachines
Require Import MM PCPb_to_MM MUREC_MM.
From Undecidability.FRACTRAN
Require Import FRACTRAN FRACTRAN_undec MM_FRACTRAN.
From Undecidability.H10
Require Import H10 FRACTRAN_DIO H10_undec H10Z H10Z_undec.
From Undecidability.H10.Dio
Require Import dio_logic dio_elem dio_single.
From Undecidability.MuRec
Require Import recalg H10_to_MUREC_HALTING.
Import ReductionChainNotations UndecidabilityNotations.
Set Implicit Arguments.
Local Infix "∈" := In (at level 70).
(* This summary file gives pointers to the main definitions
necessary to understand the reduction chain described
in Theorem "Hilberts_Tenth_entire_chain" below as
well as the extra reduction H10 ⪯ H10Z
Some definitions of problems are easy and short:
- PCP, more precisely the Post correspondence problem for Boolean strings
- FRACTRAN, more precisely, termination for FRACTRAN programs
- H10(Z), solvability of a single Diophantine equation
over nat (or Z)
Some definitions of problems are easy but long:
- Satisfaction for Diophantine logic
- Satisfiability for lists of elementary Diophantine constraints
Some definitions of problems are more complicated:
- Halting for single tape Turing machines
- Halting for Minsky machines
- Termination for µ-recursive algorithms
*)
(* Definition of many one reductions in the synthetic approach *)
About "⪯".
Print reduction.
Print reduces.
(* HaltTM n is halting for Turing machines with n tapes
Beware that the definition of Turing machines is NOT
straightforward. *)
Print HaltTM.
Print HaltsTM.
Print eval.
(* The Post correspondance problem for Boolean strings
This inductive definition is very straightforward *)
Print dPCPb.
Print dPCP.
Print stack.
Print card.
Print derivable.
(* The halting problem for n-counters Minsky machines
The definition is not straightforward *)
Print mm_instr.
Print MM_PROBLEM.
Print mm_sss.
Print sss_output.
Print sss_terminates.
Print MM_HALTING.
(* The halting problem for FRACTRAN programs
The definition is quite straightforward *)
Print FRACTRAN_PROBLEM.
Print fractran_step. (* with l /F/ x → y *)
Print fractran_steps.
Print fractran_compute.
Print fractran_stop.
Print fractran_terminates. (* with notation l /F/ x ↓ *)
Print FRACTRAN_HALTING.
(* The satisfaction problem for Diophantine logic
formulas. A long but relativelly straightforward
definition *)
Print dio_op.
Print dio_formula.
Print de_op_sem.
Print df_op_sem.
Print df_pred.
Print DIO_LOGIC_SAT.
(* The satisfiability problem for list of elementary
Diophantine constraints. A quite simple definition *)
Print dio_op.
Print dio_elem_expr.
Print dio_constraint.
Print DIO_ELEM_PROBLEM.
Print de_op_sem.
Print dee_eval.
Print dc_eval.
Print DIO_ELEM_SAT.
(* The solvability of a single diophantine equation
with parameters. A quite direct definition. *)
Print dio_polynomial.
Print dio_single.
Print DIO_SINGLE_PROBLEM.
Print dp_eval.
Print dio_single_pred.
Print DIO_SINGLE_SAT.
(* The solvability of a single diophantine equation
with 0 parameters. A direct definition for the
case of natural numbers, see below for relative integers *)
Print dio_polynomial.
Print pos. (* The type of indices/positions from 0 to n-1 *)
Print Fin.t.
Print H10_PROBLEM. (* pos 0 is an empty type *)
Print dp_eval.
Print dio_single_pred.
Print H10.
(* The termination problem for µ-recursive algorithm.
A not so trivial definition with a complex dependent
inductive type for µ-rec algos with an empty vector
of parameters. *)
Print recalg. (* µ-rec algos with n parameters *)
Print ra_rel. (* the computes relation *)
Print MUREC_PROBLEM.
Print MUREC_HALTING.
(* The notation ⎩ ... ⪯ₘ ... ⪯ₘ ... ⎭ helps
at typing reduction chains but is immediately
unfolded *)
Theorem Hilberts_Tenth_entire_chain :
⎩ HaltTM 1 ⪯ₘ
dPCPb ⪯ₘ
MM_HALTING ⪯ₘ
FRACTRAN_HALTING ⪯ₘ
DIO_LOGIC_SAT ⪯ₘ
DIO_ELEM_SAT ⪯ₘ
DIO_SINGLE_SAT ⪯ₘ
H10 ⪯ₘ
MUREC_HALTING ⪯ₘ
MM_HALTING ⎭.
Proof.
msplit 8.
+ apply reduces_transitive with (1 := HaltTM_1_to_PCPb).
exists id; exact PCPb_iff_dPCPb.PCPb_iff_dPCPb.
+ apply reduces_transitive with (2 := PCPb_MM_HALTING).
exists id; intro; symmetry; apply PCPb_iff_dPCPb.PCPb_iff_dPCPb.
+ apply MM_FRACTRAN_HALTING.
+ apply FRACTRAN_HALTING_DIO_LOGIC_SAT.
+ apply DIO_LOGIC_ELEM_SAT.
+ apply DIO_ELEM_SINGLE_SAT.
+ apply DIO_SINGLE_SAT_H10.
+ apply H10_MUREC_HALTING.
+ apply MUREC_MM_HALTING.
Qed.
Check Hilberts_Tenth_entire_chain.
(* We check no axioms are hidden in the proof, this takes quite some time *)
Print Assumptions Hilberts_Tenth_entire_chain.
Theorem Hilberts_Tenth_from_PCP : dPCPb ⪯ H10.
Proof.
do 6 (eapply reduces_transitive; [ apply Hilberts_Tenth_entire_chain | ]).
apply reduces_reflexive.
Qed.
(* The solvability of a single diophantine equation
with 0 parameters. A direct definition for the
case of relative integers *)
Print H10Z.dio_polynomial.
Print H10Z_PROBLEM. (* pos 0 is an empty type *)
Print H10Z.dp_eval.
Print H10Z.
Check H10_H10Z.
(* We check no axioms are hidden in the proof, this takes quite some time *)
Print Assumptions H10_H10Z.