-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainResult.v
34 lines (28 loc) · 1.06 KB
/
MainResult.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
Load Common.
Require Import Soundness.
Require Import Completeness.
(*
given set "ds" of constraints (representing a diophantine equation),
we have that "ds" is solvable (there is a satisfying valuation)
iff
"triangle" is derivable in the environment ΓI ds ++ [U one; P one one one]
in the intuitionistic second-order propositional logic (IPC2)
the reduction assumes normalization (cf. Derivations.v) of system F (corresponds to IPC2 by the Curry-Howard-isomorphism)
and the Hilbert's epsilon combinator (cf. Coq.Logic.Epsilon)
*)
Theorem correctness : forall (ds : list diophantine), Diophantine.solvable ds <->
derivation (ΓI ds ++ [U one; P one one one]) triangle.
Proof.
move => ds.
constructor.
apply : completeness.
have : [U one; P one one one] = [U one] ++ [] ++ [P one one one] by done.
move => ->.
move /normal_derivation_completeness => [? HD].
apply : soundness; try eassumption.
all: move => s; case => //; move => <-.
exists 1; auto.
exists one, one, one; split; first auto.
exists 1, 1, 1. auto using interpretation_one.
Qed.
Print Assumptions correctness.