Zulip Chat Archive
Stream: general
Topic: channel for formalizing classical logic
Paige Thomas (Jan 26 2025 at 04:27):
Would it be possible to have a channel devoted to formalizing classical logic in Lean?
Shreyas Srinivas (Jan 29 2025 at 13:53):
Isn’t there a huge repo with godel’s incompleteness theorems already on its way up to mathlib?
Matt Diamond (Jan 29 2025 at 17:37):
Yes and no... there is a huge logic formalization repo:
https://github.com/FormalizedFormalLogic/Foundation
However, it appears that there are currently no plans to port it to Mathlib:
https://github.com/orgs/FormalizedFormalLogic/discussions/159
Junyan Xu (Jan 29 2025 at 17:50):
See also
Paige Thomas (Jan 30 2025 at 02:58):
I was mostly thinking of just a place to organize the questions I run into studying and formalizing classical logic. It's not really intended to go into Mathlib. Currently I've started working my way through "Handbook of Practical Logic and Automated Reasoning" by John Harrison and formalizing parts from it. One eventual goal is to have a proof assistant for classical logic with a core checker formalized in Lean, which @Mario Carneiro has helped me achieve a great deal of progress on. But I just meant the channel as a place to organize questions about classical logic in general and, or formalizing it in Lean. It might not get a lot of use, I don't know, no problem if nobody wants it.
Paige Thomas (Jan 30 2025 at 03:01):
(deleted)
Luigi Massacci (Jan 30 2025 at 16:13):
I think you’ll just be better off with using #new members, as well as #lean4 and #metaprogramming / tactics for that
Luigi Massacci (Jan 30 2025 at 16:23):
also, if you like the syntactic side of logic and are looking for a project, I was amazed to discover that tauto
just uses solve_by_elim
, and is practically begging to be rewritten into a proper decision procedure (whether using the LJT calculus so it can be more straightforwardly lifted from Coq, or one of the more modern sequent calculi)
Mario Carneiro (Jan 31 2025 at 07:03):
@Luigi Massacci tauto
via LJT is already implemented, that's itauto
Mario Carneiro (Jan 31 2025 at 07:05):
we could probably replace tauto
with itauto!
and maybe no one will notice? There is the issue that itauto
is more strict about only solving propositional logic goals, while tauto
is okay with some light predicate logic as well
Luigi Massacci (Jan 31 2025 at 07:34):
I see I should have scrolled further up the documentation :man_facepalming: Maybe instead of replacing tauto
with itauto!
, it could call the latter if the current approach fails? I would imagine the brute force-ish strategy is precisely what helps with the predicate stuff.
Vasilii Nesterov (Feb 22 2025 at 21:21):
Luigi Massacci said:
also, if you like the syntactic side of logic and are looking for a project, I was amazed to discover that
tauto
just usessolve_by_elim
, and is practically begging to be rewritten into a proper decision procedure (whether using the LJT calculus so it can be more straightforwardly lifted from Coq, or one of the more modern sequent calculi)
I'm probably late to the party, but what's wrong with the current tauto
implementation? It looks like a decision procedure for propositional logic to me.
Vasilii Nesterov (Feb 22 2025 at 21:23):
(except that it can be very slow, which is rare in practice)
Luigi Massacci (Feb 24 2025 at 13:48):
The "proper" was meant in the moral sense of the word ; ) I guess it should be complete since solve_by_elim
does IDDFS, but it applies lemmas greedily, which is really sub-optimal
Last updated: May 02 2025 at 03:31 UTC