Lean, Coq and other proof assistants: Visualising proofs as trees
158 points| lakesare | 2 years ago |lakesare.brick.do
If you're aware of any tools I might have missed, please @ me in the comments. I aimed to cover every one I could find.
158 points| lakesare | 2 years ago |lakesare.brick.do
If you're aware of any tools I might have missed, please @ me in the comments. I aimed to cover every one I could find.
isaacfrond|2 years ago
What I found out was, that after diligently doing all the tutorials, and making all the exercises, there is still a huge gap between my skills and what is needed for real work. Note even that, you cannot even follow proofs of real theorems. Even with the reference manual in hand, trying to follow along word by word, there is a lot outright missing. From what I could gather, those that had successfully learned it did so at the hand of a master who explains the arcane incantations needed to get from proof state to proof state.
I'd still love to learn a formal theorem proving language, any one really, and be able to do formal proofs, but i'm not sure how. Coq seems even more arcane than Hol/Isabelle. I'm not sure about Lean, but I'm skeptical about learning it without having an expert on call.
robinzfc|2 years ago
6534278|2 years ago
> still a huge gap between my skills and what is needed for real work
That's kind of inevitable, you've passed your driving test but that doesn't mean you're ready to compete in Formula One race.
> Note even that, you cannot even follow proofs of real theorems
This may not be relevant to your experience or it may, but decades ago I did a tool-guided transformation of a very simple specification into a very simple program. This was done as a study for teaching people. I carefully explained every step as best I could, but the interesting thing was as my memory of doing it faded, the explanations became mainly useless – why I did a particular transformational step became lost, and my prior written explanations just didn't help. It's not like commenting code!
Now, maybe with extra experience I could do better these days, but quite possibly not. There is a certain kind of 'zone' you go into which has no parallel with programming. It may be that theorem proving at that level may only be something you can do, and do with practice, but can't follow afterwards; a state of mind. I don't know. FYI anyway.
practal|2 years ago
Still, even for me, dealing with various issues in Isabelle is frustrating (I will not even touch stuff like Coq or Lean, these are just insults on my mathematical senses). I know how this all can be made more accessible and natural and practical, and I am working on it. I, too, want to be using such a tool for real stuff. In particular, integrating LLMs with theorem provers is very promising, and I think the new logic I am developing is especially suited for it. You could argue, but well, a natural language interface is just the surface, and the complexity remains just under this surface. I would not argue against that in principle, but my new logic hopefully also takes care of a lot of unnecessary complexity and complications under the hood.
jksk61|2 years ago
Coq is well designed/easy to understand but it is missing a core mathlib like Lean. Moreover, most proofs are designed to "compile" quickly and not to be human readable.
tunesmith|2 years ago
One site I've been working on uses graphs to generate arguments in that fashion:
http://concludia.org/
lakesare|2 years ago
Reubend|2 years ago
I didn't see any broad explanation of what the tree structure means here. I can see that disjunctions split a branch into 2 branches, but I'm still pretty confused overall.
colanderman|2 years ago
Sometimes the trees are upside down from this, for reasons I haven't been able to divine. Some logics also permit multiple (alternative) conclusions in a judgment, which is then properly called a sequent.
Nearly the same notation is used for type judgements in type theory as well, with "assumptions ⊢ conclusion" being replaced by "environment ⊢ type assignments". [2]
[1] https://en.wikipedia.org/wiki/Sequent_calculus#The_system_LK (The preceding section introduces the notation but uses the upside-down variant, for unclear reasons -- I've rarely seen it elsewhere.)
[2] https://en.wikipedia.org/wiki/Type_theory#Technical_details
lakesare|2 years ago
cobbal|2 years ago
nathell|2 years ago
https://lamport.azurewebsites.net/pubs/lamport-how-to-write....
zozbot234|2 years ago
lakesare|2 years ago
I don't know of any software that allows for manual writing of such proofs yet, I'm drawing proof trees on paper at the moment. I would like paperproof to allow for this eventually. We want to enable ml-generation of tactics with ReProver, which will require the interface for the manual creation of goals and hypotheses. Hopefully after that it will be more clear what fully-manually-written proof interface could look like.
colanderman|2 years ago
[1] https://tla.msr-inria.inria.fr/tlaps/content/Documentation/T...
[2] https://chris.pacejo.net/stuff/tla-tips#proof-step-quick-ref...
throwaway2562|2 years ago
https://community.wolfram.com/groups/-/m/t/1135271
butokai|2 years ago
NBJack|2 years ago
That said, are there any good resources that can teach me how to reason through proofs better? Preferably for someone who has a weak mathmatical background? Aside from the Pidgeon Hole theorem, they never clicked with me.
NooneAtAll3|2 years ago
Does their default proof explorer[1] not count?
[1] - https://us.metamath.org/mpeuni/mmtheorems.html
SkyMarshal|2 years ago
https://pastebin.com/bYXWj7w6
unknown|2 years ago
[deleted]
mjfl|2 years ago
nequo|2 years ago
> And of course Coq is phallic both in English and the original French.
Is it phallic in French too? I am not a French speaker. According to the French Wiktionary, "coq" means rooster, male chicken, cooked rooster, male partridge, a self-important person, a rooster on top of a church bell tower, a loose coin, a tool used for ironing, a kind of fish, a part used in watchmaking, or a cook working on a ship.[1] None of these sound phallic to me.
I have not seen evidence that this was intended as an English pun. Rather, it seems to have been a double pun in French, for the calculus of constructions (CoC) which Coq is based on, and Thierry Coquand who developed CoC.[2] So I just assume that it wasn't meant to be phallic and remind myself that some people speak French and they name their software French names.
[1] https://fr.wiktionary.org/w/index.php?title=coq&oldid=325194...
[2] https://github.com/coq/coq/wiki/Alternative-names
nanolith|2 years ago
Relevant example: my current toy proof engine and language is called lesc. There are lots of things called "lesc", but none of them to my knowledge stand for Less Elegant Space Cowboy.
hcta|2 years ago
lakesare|2 years ago
unknown|2 years ago
[deleted]
ahhfgshando6698|2 years ago
[deleted]
unknown|2 years ago
[deleted]