Skip to content

Conversation

@Janis-Bai
Copy link

As part of this pull request, the Rocq development of Janis Bailitis' Bachelor's thesis at the programming systems lab shall be contributed to the Rocq Library of First-Order Logic. This contribution consists of two parts: Firstly, A mechanisation of Hilbert systems for FO alongside equivalence proof to ND (in theories/HilbertSystem). Secondly, a mechanisation of Gödel's first incompleteness theorem and Tarski's theorem via Carnap's diagonal lemma (added to previous development in theories/Incompleteness). This part of the mechanisation also contains a generalisation of $\mathsf{CT}_\mathsf{Q}$ (see theories/Incompleteness/ctq.v) to functions taking multiple arguments, contained in the file theories/Incompleteness/multivariate_ctq.v.

It may be the case that the files do not match guidelines with respect to code formatting. If so, please point this out.

Inductive aand (P Q R : Prop) :=
cconj : P -> Q -> R -> aand P Q R.

Lemma form_inv {Σ_funcs : funcs_signature} {Σ_preds : preds_signature} {ops : operators} {flag : falsity_flag} phi1 phi2 :
Copy link
Collaborator

@JoJoDeveloping JoJoDeveloping Jun 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not necessary (see below)

Existing Instance falsity_on.

Instance eqdec_funcs : EqDec PA_funcs_signature.
Proof. intros x y; decide equality. Qed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to self: we need to organize these instances somewhere. We can't have each file redefine them, that leads to a bunch of duplicated instances in files downstream of both.

Copy link
Collaborator

@JoJoDeveloping JoJoDeveloping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your PR, and sorry for not reacting to this earlier. I have some slight nits in some parts of the proof, but overall it looks good enough.

Just to be sure I understand correctly, the Hilbert System definition currently is not used anywhere else, is it?

@Janis-Bai
Copy link
Author

Janis-Bai commented Jun 8, 2025

Thank you very much for reviewing the PR, @JoJoDeveloping.

Just to be sure I understand correctly, the Hilbert System definition currently is not used anywhere else, is it?

It's not used elsewhere (apart from the proof that the Hilbert System is equivalent to natural deduction). It will come in handy when the mechanisation is extended by internal provability predicates (something we expect to be working on in the future). And also it's nice to have Hilbert Systems in a logic-related library.

I will come back to the other points in due course, but I'm quite busy right now.

@Janis-Bai
Copy link
Author

Apologies for the extremely late reply, but I finally had the time to have a look at your suggestions; see the comments above.

@JoJoDeveloping
Copy link
Collaborator

LGTM. Thanks a lot for addressing the reviews 🎉

@JoJoDeveloping JoJoDeveloping merged commit 8655bdd into uds-psl:coq-8.20 Nov 5, 2025
1 check passed
@Janis-Bai
Copy link
Author

Janis-Bai commented Nov 5, 2025

Great, thanks for merging and reviewing the code!

JoJoDeveloping added a commit that referenced this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants