Zulip Chat Archive
Stream: general
Topic: lean3 documentation
Daniel Papp (Jan 30 2021 at 23:36):
Hi!
I would like to find the lean 3 equivalent of https://leanprover.github.io/lean4/doc/ The reason for that is I'm using VS Code to work with this and VS Code only has an extension for lean 3. Could someone link me to a similar doc?
Thanks,
Daniel
Daniel Papp (Jan 30 2021 at 23:40):
Or is there a way to make lean 4 work alongside VS Code in a similar way as it works in the Natural Number game? That's the only thing I really worked so far.
Mario Carneiro (Jan 30 2021 at 23:41):
The lean 3 reference manual is probably the nearest equivalent to that page
Mario Carneiro (Jan 30 2021 at 23:43):
but there is a bunch of documentation from various perspectives that you can find here: https://leanprover-community.github.io/learn.html
Mario Carneiro (Jan 30 2021 at 23:44):
Lean 4 is still in alpha stage, most of the learning resources haven't been ported yet
Daniel Papp (Jan 30 2021 at 23:45):
Thanks Mario! I guess the reference manual was the thing I was looking for.
Bryan Gin-ge Chen (Jan 30 2021 at 23:46):
Note that there is a VS Code extension for lean4
, though it's still work in progress: https://github.com/leanprover-community/vscode-lean4
Daniel Papp (Jan 30 2021 at 23:48):
@Bryan Gin-ge Chen Yep I just tried that. The thing is that it doesn't even provide the basic features like showing the current subgoals as of now.
Daniel Papp (Jan 30 2021 at 23:48):
I guess I stick with version 3 for the time being.
Mario Carneiro (Jan 30 2021 at 23:49):
yes, it's not ready for general use yet
Bryan Gin-ge Chen (Jan 30 2021 at 23:49):
Yeah, there's a lot still missing, though for subgoals you sort of use underscores and the error messages.
Daniel Papp (Jan 30 2021 at 23:50):
Is version 4 significantly different? Like does it have non backward compatible changes or just extensions to the language?
Mario Carneiro (Jan 30 2021 at 23:50):
lots of non-backward compatible changes.
Mario Carneiro (Jan 30 2021 at 23:50):
it's a complete rewrite of lean in lean
Daniel Papp (Jan 30 2021 at 23:50):
@Bryan Gin-ge Chen Yep but how do I make it show the error messages? I mean with the lean 4 extension.
Daniel Papp (Jan 30 2021 at 23:51):
@Mario Carneiro Ah I see.
Bryan Gin-ge Chen (Jan 30 2021 at 23:53):
The error messages show up in the Problems panel: Screen-Shot-2021-01-30-at-6.53.34-PM.png
Daniel Papp (Jan 31 2021 at 00:01):
Hmm ok, I was expecting something like this in the info window. Let me give it another try using this.
Daniel Papp (Jan 31 2021 at 00:02):
Btw mathlib is compatible with lean 3 I guess.
Bryan Gin-ge Chen (Jan 31 2021 at 00:02):
Yeah, the Lean 4 extension doesn't have an info window yet.
Bryan Gin-ge Chen (Jan 31 2021 at 00:02):
That's right. mathlib uses Lean 3.
Daniel Papp (Jan 31 2021 at 00:03):
I guess it won't be ported to Lean 4 anytime soon.
Mario Carneiro (Jan 31 2021 at 00:03):
Discussions about that are under way but I wouldn't expect it before the summer at absolute minimum
Daniel Papp (Jan 31 2021 at 00:05):
I see.
Daniel Papp (Jan 31 2021 at 00:06):
Just one more question. Where/How do I download this python script called leanproject
?
Bryan Gin-ge Chen (Jan 31 2021 at 00:07):
You should have gotten it by following your OS-specific instructions on this page: https://leanprover-community.github.io/get_started.html
Daniel Papp (Jan 31 2021 at 00:12):
Thanks! Why do you use this tool called pipx instead of regular pip to install the package that contains the leanproject
command?
Daniel Papp (Jan 31 2021 at 00:13):
Ah ok actually I can install directly from pip. nvm
Julian Berman (Jan 31 2021 at 00:13):
pip is essentially a developer tool for developing a package or library, pipx is generally what you'd use for installing a "full application" such as leanproject these days
Julian Berman (Jan 31 2021 at 00:14):
though at some point I think distributing leanproject as a shiv or zipapp will make things even easier for folks
Daniel Papp (Jan 31 2021 at 00:23):
I don't know what are the advantages of using such custom solutions when you can add a console_scripts
key to entry_points
in setup.py like this -> https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html#the-console-scripts-entry-point
But imho creating a statically linked executable with Golang for each supported OS is probably the cleanest solution. You just download it and it works.
Julian Berman (Jan 31 2021 at 00:25):
pipx is pretty widely used -- what you linked is about specifying how to name binaries (executables) that are installed -- the thing pipx is responsible for is essentially fixing the fact that in Python you should install each application in a separate virtualenv, and doing so manually is tedious when you include making sure the virtualenv's executables are placed on your PATH
Daniel Papp (Jan 31 2021 at 00:27):
Ah yeah that's true. I use pyenv with 3.7.7 and I just dump everything that I need there without selecting a specific venv since it's already a per user python installation.
Julian Berman (Jan 31 2021 at 00:29):
Right, that works fine, until it doesn't :), hence pipx.
Patrick Massot (Jan 31 2021 at 08:40):
Daniel Papp said:
I don't know what are the advantages of using such custom solutions when you can add a
console_scripts
key toentry_points
in setup.py like this -> https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html#the-console-scripts-entry-point
What are you talking about? We do use console scripts entry points. FYI the reason why we started advising people to use pipx is because someone just like you came here without reading any documentation and asking why we were doing everything so stupidly. But it turns out there is nothing we could do to make all those people happy.
Eric Wieser (Jan 31 2021 at 09:23):
From what I could tell the windows instructions do not mention pipx at all
Last updated: Dec 20 2023 at 11:08 UTC