Skip to content

Commit 6dec46c

Browse files
Kleene-Post and Post's theorem (#2)
Co-authored-by: dominik-kirst <[email protected]>
1 parent 3155719 commit 6dec46c

File tree

11 files changed

+1018
-16277
lines changed

11 files changed

+1018
-16277
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,15 @@ This library contains results on synthetic computability theory.
3737
- A definition of oracle computability and Turing reducibility in `TuringReducibility/OracleComputability.v`
3838
- A proof of Post's theorem (`PT`) in `TuringReducibility/SemiDec.v`
3939
- A proof of Post's theorem about the arithmetical hierarchy in `PostsTheorem/PostsTheorem.v`
40+
- A proof of the Kleene-Post theorem in `PostsTheorem/KleenePostTheorem.v`
4041

4142
## Installation
4243

4344
```sh
4445
opam switch create coq-synthetic-computability --packages=ocaml-variants.4.14.0+options,ocaml-option-flambda
4546
eval $(opam env)
4647
opam repo add coq-released https://coq.inria.fr/opam/released
47-
opam install coq.8.17 coq-stdpp.1.8.0
48+
opam install coq.8.17.0 coq-equations.1.3+8.17 coq-stdpp.1.8.0
4849
cd theories
4950
make
5051
make install

theories/ArithmeticHierarchy/ArithmeticalHierarchyEquiv.v

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Section ArithmeticalHierarchyEquiv.
3636
- exfalso. inversion nQ.
3737
Qed.
3838

39+
(** # <a id="isSigmasyn_in_isSigmasem" /> #*)
3940
Lemma isΣnsyn_in_isΣsem:
4041
(forall n k (p: vec nat k -> Prop), isΣsyn n p -> isΣsem n p)
4142
/\ (forall n k (p: vec nat k -> Prop), isΠsyn n p -> isΠsem n p).
@@ -83,8 +84,10 @@ Section ArithmeticalHierarchyEquiv.
8384
(* Rückrichtung annehmen entscheidbar -> Δ1 *)
8485

8586
Definition decΔ1syn := forall k (f: vec nat k -> bool), isΔsyn 1 (fun v => f v = true).
87+
(** # <a id="decSigma1syn" /> #*)
8688
Definition decΣ1syn := forall k (f: vec nat k -> bool), isΣsyn 1 (fun v => f v = true).
8789

90+
(** # <a id="decSigma1syn_decDelta1syn" /> #*)
8891
Lemma decΣ1syn_decΔ1syn : decΣ1syn <-> decΔ1syn.
8992
Proof.
9093
unfold decΣ1syn, decΔ1syn.
@@ -95,6 +98,7 @@ Section ArithmeticalHierarchyEquiv.
9598
- intros H k f. apply H.
9699
Qed.
97100

101+
(** # <a id="decSigma1syn_incl_1" /> #*)
98102
Lemma decΣ1syn_incl_1 :
99103
decΣ1syn <->
100104
(forall k (p : vec nat k -> Prop), isΣsem 1 p -> isΣsyn 1 p)
@@ -118,7 +122,8 @@ Section ArithmeticalHierarchyEquiv.
118122
intros H k f. apply H. apply isΣΠsem0.
119123
}
120124
Qed.
121-
125+
126+
(** # <a id="isSigmasem_in_isSigmasyn" /> #*)
122127
Lemma isΣsem_in_isΣsyn :
123128
decΣ1syn ->
124129
(forall n k (p: vec nat k -> Prop), isΣsem n p -> n <> 0 -> isΣsyn n p)

theories/Axioms/EPF.v

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,19 @@ Proof.
4949
destruct seval; congruence.
5050
Qed.
5151

52+
Import EmbedNatNotations.
53+
5254
Lemma EPF_iff_nonparametric {Part : partiality} :
5355
EPF ↔ EPF_nonparam.
5456
Proof.
5557
split.
5658
- intros [θ H]. exists θ. intros f. destruct (H (fun _ => f)) as [c Hc].
5759
exists (c 0). eapply Hc.
58-
- intros [θ EPF]. exists (fun ic x => let (i, c) := unembed ic in θ c (embed (i, x))). intros f.
59-
destruct (EPF (fun x => let (k, l) := unembed x in f k l)) as [c Hc].
60-
exists (fun i => embed (i, c)). intros i x. rewrite embedP.
61-
rewrite (Hc ⟨i,x⟩). rewrite embedP. reflexivity.
60+
- intros [θ' EPF]. exists (fun! ⟨c, i⟩ => fun x => θ' c (embed (i, x))). intros f.
61+
pose (g := (fun! ⟨i, x⟩ => f i x)).
62+
destruct (EPF g) as [c Hc].
63+
exists (fun i => ⟨c, i⟩). intros i x. rewrite embedP.
64+
subst g. rewrite (Hc ⟨i,x⟩). rewrite embedP. reflexivity.
6265
Qed.
6366

6467
Definition EPF_bool `{partiality} :=

0 commit comments

Comments
 (0)