Skip to content

Commit ef9f877

Browse files
Merge remote-tracking branch 'kirst/coq-8.20' into rocq-9.0
merges #9
2 parents 216d534 + 8c60331 commit ef9f877

File tree

14 files changed

+4260
-0
lines changed

14 files changed

+4260
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The FOL library currently extends this core with the following content:
1212
- [Incompleteness](theories/Incompleteness): An abstract and synthetic version of the first incompleteness theorem, instantiated to Robinson's Q, as well as a proof of the first incompleteness theorem and Tarski's theorem via Carnap's diagonal lemma.
1313
- [Tennenbaum](theories/Tennenbaum): Tennenbaum's theorem stating that the natural numbers are the only computable model of PA, constructivised.
1414
- [ArithmeticalHierachy](theories/ArithmeticalHierarchy): Semantic and syntactic characterisations of the arithmetical hierarchy and an equivalence proof.
15+
- [ModelTheory](theories/ModelTheory): Results on model theory, so far focused on the (downwards) Löwenheim-Skolem theorem
1516
- [Proofmode](theories/Proofmode): A tool easing derivations in a deduction system, including a HOAS input language hiding de Bruijn encoded syntax.
1617
- [Reification](theories/Reification): A tactic automating representability proofs of Coq predicates as first-order formulas.
1718
- [Utils](theories/Utils): A collection of additional results needed in various projects.
@@ -24,6 +25,7 @@ The FOL library currently extends this core with the following content:
2425
This library is available in opam. To install it, you can use the following commands:
2526

2627
```
28+
<<<<<<< HEAD
2729
opam switch create coq-library-fol --packages=ocaml-variants.4.14.1+options,ocaml-option-flambda
2830
eval $(opam env)
2931
opam repo add coq-released https://coq.inria.fr/opam/released
@@ -63,6 +65,7 @@ We are open to contributions! To contribute, fork the project on GitHub, add a n
6365
- Gert Smolka
6466
- Dominik Wehr
6567
- Janis Bailitis
68+
- Haoyi Zeng
6669

6770
## Publications
6871

@@ -78,10 +81,14 @@ We are open to contributions! To contribute, fork the project on GitHub, add a n
7881
- An Analysis of Tennenbaum's Theorem in Constructive Type Theory. Marc Hermes, Dominik Kirst. FSCD'22.
7982
- Gödel's Theorem Without Tears: Essential Incompleteness in Synthetic Computability. Dominik Kirst, Benjamin Peters. CSL'23.
8083
- Synthetic Undecidability and Incompleteness of First-Order Axiom Systems in Coq. Dominik Kirst, Marc Hermes. JAR'23.
84+
- The Kleene-Post and Post's Theorem in the Calculus of Inductive Constructions. Yannick Forster, Dominik Kirst, Niklas Mück. CSL'24.
85+
- An Analysis of Tennenbaum's Theorem in Constructive Type Theory (Extended Version). Marc Hermes, Dominik Kirst. LMCS'24.
86+
- The Blurred Drinker Paradox: Constructive Reverse Mathematics of the Downward Löwenheim-Skolem Theorem. Dominik Kirst, Haoyi Zeng. LICS'25.
8187

8288
### Workshop Abstracts
8389

8490
- A Toolbox for Mechanised First-Order Logic. Johannes Hostert, Mark Koch, Dominik Kirst. The Coq Workshop, 2021.
8591
- Synthetic Versions of the Kleene-Post and Post's Theorem. Dominik Kirst, Niklas Mück, Yannick Forster. TYPES, 2022.
8692
- Strong, Synthetic, and Computational Proofs of Gödel's First Incompleteness Theorem. Benjamin Peters, Dominik Kirst. TYPES, 2022.
8793
- A Coq Library for Mechanised First-Order Logic. Dominik Kirst, Johannes Hostert, Andrej Dudenhefner, Yannick Forster, Marc Hermes, Mark Koch, Dominique Larchey-Wendling, Niklas Mück, Benjamin Peters, Gert Smolka, Dominik Wehr. The Coq Workshop, 2022.
94+
- The Blurred Drinker Paradox and Blurred Choice Axioms for the Downward Löwenheim-Skolem Theorem. Dominik Kirst, Haoyi Zeng. TYPES, 2024.

theories/ModelTheory/AnalysisLS.v

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Require Import FOL.ModelTheory.LogicalPrinciples.
2+
Require Import FOL.ModelTheory.HenkinEnv.
3+
Require Import FOL.ModelTheory.ReverseLS.
4+
Require Import FOL.ModelTheory.Core.
5+
6+
(** * Full Decomposition of DLS *)
7+
8+
Section LSiffDC.
9+
10+
Corollary LS_iff_DC_under_CC_nat_LEM:
11+
CC_nat -> LEM -> DLS <-> DC.
12+
Proof.
13+
intros H1 H2; split.
14+
- eapply LS_CC_impl_DC; eauto.
15+
- intros DC. eapply LS_downward_with_DC_LEM; eauto.
16+
Qed.
17+
18+
Corollary LS_iff_DC_BDP_BEP_under_CC_nat:
19+
CC_nat -> DLS <-> DC /\ BDP /\ BEP.
20+
Proof.
21+
intros H1; split.
22+
- intros HLS. repeat split.
23+
now apply LS_CC_impl_DC.
24+
now apply LS_impl_BDP.
25+
now apply LS_impl_BEP.
26+
- intros (h1 & h2 & h3).
27+
now apply LS_downward_with_BDP_BEP_DC.
28+
Qed.
29+
30+
Corollary LS_iff_DDC_BDP_BEP_BCC:
31+
DLS <-> DDC /\ BDP /\ BEP /\ BCC.
32+
Proof.
33+
split.
34+
- intros HLS. repeat split.
35+
assert (OBDC) as HO. now apply LS_impl_OBDC.
36+
assert (BDC2) as H2. intros X x. now apply OBDC_impl_BDC2_on, HO.
37+
now apply BDC2_iff_DDC_BCC.
38+
now apply LS_impl_BDP. now apply LS_impl_BEP.
39+
now eapply BDC_impl_BCC, LS_impl_BDC.
40+
- intros (h1 & h2 & h3 & h4).
41+
now apply LS_downward.
42+
Qed.
43+
44+
Theorem Decomposition1:
45+
DLS -> DDC /\ BDP /\ BEP /\ BCC.
46+
Proof. now rewrite LS_iff_DDC_BDP_BEP_BCC. Qed.
47+
48+
Theorem Decomposition2:
49+
DDC /\ BDP /\ BEP /\ BCC -> BDP /\ BEP /\ BDC2.
50+
Proof.
51+
intros (h1 & h2 & h3 & h4). repeat split; eauto; now apply res_BDC2.
52+
Qed.
53+
54+
Theorem Decomposition3:
55+
BDC2 /\ BDP /\ BEP -> OBDC.
56+
Proof.
57+
intros (h1 & h2 & h3).
58+
assert DDC as h4 by (now apply BDC2_impl_DDC).
59+
assert BCC. apply BDC_impl_BCC. now apply BDC2_impl_BDC.
60+
assert DLS by now rewrite LS_iff_DDC_BDP_BEP_BCC.
61+
now apply LS_impl_OBDC.
62+
Qed.
63+
64+
Theorem Decomposition4:
65+
OBDC <-> DLS.
66+
Proof.
67+
split; [intro H; now apply LS_downward'|].
68+
apply LS_impl_OBDC.
69+
Qed.
70+
71+
End LSiffDC.

theories/ModelTheory/ClassicalDC.v

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
Require Export Undecidability.FOL.Syntax.Theories.
2+
Require Import Undecidability.FOL.Syntax.BinSig.
3+
Require Import FOL.ModelTheory.Core.
4+
Require Import FOL.ModelTheory.DCPre.
5+
6+
(** * Reverse Analysis: DC-Delta *)
7+
8+
Section DC.
9+
10+
Existing Instance sig_empty.
11+
Existing Instance sig_binary.
12+
13+
Fact Σ_countable: countable_sig.
14+
Proof.
15+
repeat split.
16+
- exists (fun _ => None). intros [].
17+
- exists (fun _ => Some tt). intros []. exists 42; eauto.
18+
- intros []. - intros [] []; firstorder.
19+
Qed.
20+
21+
Variable A: Type.
22+
Variable a: A.
23+
Variable R: A -> A -> Prop.
24+
25+
Instance interp__A : interp A :=
26+
{
27+
i_func := fun F v => match F return A with end;
28+
i_atom := fun P v => R (hd v) (last v)
29+
}.
30+
31+
Definition Model__A: model :=
32+
{|
33+
domain := A;
34+
interp' := interp__A
35+
|}.
36+
37+
Definition total_form :=
38+
∀ (∃ (atom _ _ _ _ tt (cons _ ($1) _ (cons _ ($0) _ (nil _))))).
39+
Definition forfor_form :=
40+
(atom _ _ _ _ tt (cons _ ($1) _ (cons _ ($0) _ (nil _)))).
41+
42+
Lemma total_sat:
43+
forall h, (forall x, exists y, R x y) -> Model__A ⊨[h] total_form.
44+
Proof.
45+
cbn; intros.
46+
destruct (H d) as [e P].
47+
now exists e.
48+
Qed.
49+
50+
Definition p {N} (α β: N): env N :=
51+
fun n => match n with
52+
| 0 => β
53+
| _ => α end.
54+
55+
Lemma forfor_sat {N} (h: N -> A) (α β: N):
56+
R (h α) (h β) <-> Model__A ⊨[(p α β) >> h] forfor_form.
57+
Proof.
58+
unfold ">>"; now cbn.
59+
Qed.
60+
61+
Lemma exists_next:
62+
forall B (R': B -> B -> Prop), coutable_model B ->
63+
(forall x, exists y, R' x y) -> exists f: nat -> B,
64+
forall b, exists n, R' b (f n).
65+
Proof.
66+
intros B R' (f & h & sur) total.
67+
exists f. intro b.
68+
destruct (total b) as [c Rbc].
69+
exists (h c). now rewrite sur.
70+
Qed.
71+
72+
Section dec__R_full.
73+
74+
Definition dec_R := forall x y, dec (R x y).
75+
76+
Lemma LS_impl_DC: DLS -> dec_R -> DC_on' R.
77+
Proof using a.
78+
intros LS DecR total.
79+
destruct (LS sig_empty sig_binary Σ_countable Model__A a) as [N [(h & g & Hh) [f HN]]].
80+
specialize (@total_sat ((fun _ => (h 42)) >> f) total ) as total'.
81+
apply HN in total'.
82+
assert (exists R', (forall x: N, (exists y: N, R' x y)) /\ (forall α β, R' α β <-> R (f α) (f β))).
83+
exists (fun x y => tt ₚ[ N] cons N x 1 (cons N y 0 (nil N))).
84+
split. intro x. now specialize(total' x).
85+
intros α β; rewrite forfor_sat.
86+
now unfold elementary_homomorphism in HN; rewrite <- HN.
87+
destruct H as [R' [P1 P2]].
88+
assert (forall x y, dec (R' x y)) as dec__R'.
89+
{ intros x y. destruct (DecR (f x) (f y)); firstorder. }
90+
assert (forall n : N, exists m : nat, h m = n) as Ht.
91+
{ intro n. exists (g n). now rewrite Hh. }
92+
destruct (@DC_ω _ _ h Ht dec__R' P1 (h 42)) as [g' [case0 Choice]].
93+
exists (g' >> f); unfold ">>".
94+
intro n'; now rewrite <- (P2 (g' n') (g' (S n'))).
95+
Qed.
96+
97+
End dec__R_full.
98+
99+
End DC.
100+
101+
Section DCRes.
102+
103+
Theorem LS_impl_DC_delta: DLS -> DC__Δ .
104+
Proof.
105+
intros H X R dec_R x tot_R.
106+
apply LS_impl_DC; eauto.
107+
Qed.
108+
109+
End DCRes.
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
127+

0 commit comments

Comments
 (0)