Zulip Chat Archive

Stream: lean4

Topic: Open Documentation View


Alistair Tucker (May 29 2022 at 00:10):

Hi I asked about this in the new members stream but got no reply. Basically I can't find how to open TPIL4 in VS Code. Any ideas?

Edward Ayers (May 29 2022 at 00:20):

I'm not completely sure this is what you want, but you can clone the source repository at https://github.com/leanprover/theorem_proving_in_lean4. There are no lean files per se, instead the lean is in the markdown files. The readme gives some instructions for testing all of the lean code blocks in the command line. If you are after the 'try it!' functionality where you can quickly run code blocks in Lean I think that is still tbd.

Alistair Tucker (May 29 2022 at 00:23):

Thanks! I'll try that. I read about "Try it!" in the introduction and thought it was already working

Edward Ayers (May 29 2022 at 00:34):

If your goal is to learn about Lean 4 then your best bet is to read TPIL4 online and the lean 4 manual. All the learning resources for Lean 4 are WIP.

Edward Ayers (May 29 2022 at 00:36):

The learning resources for Lean 3 are mature so if you are learning about theorem proving for the first time it might be better to use Lean 3.

Wojciech Nawrocki (May 29 2022 at 00:36):

Oh, that's a bug in the extension. I filed it at leanprover/vscode-lean4#185.

Edward Ayers (May 29 2022 at 00:50):

Ahh sorry my bad I assumed it wasn't working yet.

Chris Lovett (Jun 02 2022 at 18:55):

it's fixed now in Lean extension 0.0.77:
image.png

Yuri de Wit (Jun 02 2022 at 22:27):

This is quite helpful, thank you!

@Chris Lovett this caught my attention:

Note: Packages have to be opened using "File > Open Folder..." for imports to work. Saved changes are visible in other files after running "Lean 4: Refresh File Dependencies" (Ctrl+Shift+X).

What is meant by a package here? A external project or an internal module in a sub-folder? I ask because I was seeing a strange error trying to import a module in a sub-folder in my lake-based project. I will see if I can reproduce the same error message.

Chris Lovett (Jun 02 2022 at 23:35):

Ah, it means Lake packages - folders initialized using Lake init :

lake init --help
Create a Lean package in the current directory

USAGE:
  lake init <name>

This command creates a new Lean package with the given name in
the current directory.

but the quickstart doc page should also say that vscode workspaces also works.

Yuri de Wit (Jun 03 2022 at 19:43):

Gosh, just realized I replied in the wrong thread ...


Last updated: Dec 20 2023 at 11:08 UTC