Zulip Chat Archive

Stream: new members

Topic: starting a new project


Conrad (Jul 06 2023 at 12:23):

hey guys,in lean4 how could i start a project?

Scott Morrison (Jul 06 2023 at 12:28):

Have you installed Lean 4 per https://leanprover-community.github.io/get_started.html?

Filippo A. E. Nuccio (Jul 06 2023 at 12:28):

@Conrad Perhaps your question should be posted in this stream. At any rate, have you tried looking here?

Scott Morrison (Jul 06 2023 at 12:28):

After that, you should look at https://leanprover-community.github.io/install/project.html, which will tell you how to create a new project.

Notification Bot (Jul 06 2023 at 12:28):

4 messages were moved here from #general > two github questions by Scott Morrison.

Filippo A. E. Nuccio (Jul 06 2023 at 12:29):

(deleted)

Filippo A. E. Nuccio (Jul 06 2023 at 12:29):

Ops, my answer overlapped with Scott's, sorry!

Conrad (Jul 06 2023 at 13:12):

@Filippo A. E. Nuccio thank you ,i just can't find the instructions for lean4

Conrad (Jul 06 2023 at 13:13):

do you have more information about it?

Filippo A. E. Nuccio (Jul 06 2023 at 13:13):

Do you mean the instructions to install it or to use it (like "how can I state in lean4 that 1+1 = 2 and prove this "theorem")?

Conrad (Jul 06 2023 at 13:15):

i have install lean4,but i can't follow the instruction aboutsth like,Getting mathlib oleans,
Upgrading mathlib

Conrad (Jul 06 2023 at 13:17):

i mean in this part
image.png

Filippo A. E. Nuccio (Jul 06 2023 at 13:17):

Oh, but this is lean3!

Conrad (Jul 06 2023 at 13:17):

@Filippo A. E. Nuccio

Riccardo Brasca (Jul 06 2023 at 13:17):

leanproject is for lean 3

Johan Commelin (Jul 06 2023 at 13:17):

There's a massive blue warning box at the top of that page

Filippo A. E. Nuccio (Jul 06 2023 at 13:18):

The way lean3 and lean4 work are very different.

Filippo A. E. Nuccio (Jul 06 2023 at 13:18):

Well, at least the way you install them...

Johan Commelin (Jul 06 2023 at 13:18):

Scott Morrison said:

After that, you should look at https://leanprover-community.github.io/install/project.html, which will tell you how to create a new project.

You should try this link instead

Conrad (Jul 06 2023 at 13:19):

yes, so what is lean4's sustitution to it.

Riccardo Brasca (Jul 06 2023 at 13:19):

It's called lake. You find some basic documentation here

Conrad (Jul 06 2023 at 13:22):

oh, so what are you usually using,either lean or lean4?

Filippo A. E. Nuccio (Jul 06 2023 at 13:22):

Defnitely lean4

Filippo A. E. Nuccio (Jul 06 2023 at 13:23):

There is not such a thing as lean, actually: there are/were lean1-lean2, then we played a lot with lean3, now there is lean4. This is the one we all currently use, basically, and it is the one you should focus on.

Conrad (Jul 06 2023 at 13:23):

Wow, thanks guys!

Conrad (Jul 06 2023 at 13:25):

And another question,you said "post questions in this stream",where is it in the interface of zulipchat? @Filippo A. E. Nuccio

Filippo A. E. Nuccio (Jul 06 2023 at 13:26):

If you have a GitPod account, you can have a look at the section To use this repository with Gitpod in this page. This would allow you to play a bit with lean4 without installing it. Getting such an account is free and easy.

Filippo A. E. Nuccio (Jul 06 2023 at 13:27):

Conrad said:

And another question,you said "post questions in this stream",where is it in the interface of zulipchat? Filippo A. E. Nuccio

Some magic happened and now we are in the stream I was speaking of, you can ignore that message of mine and keep asking your questions in this strem :magic:

Conrad (Jul 06 2023 at 13:28):

ok

Conrad (Jul 06 2023 at 14:28):

hi,i wonder how to build a lake(a kind of project)@Filippo A. E. Nuccio
image.png
image.png

Conrad (Jul 06 2023 at 14:29):

in vs code ,it is the same
image.png

Bulhwi Cha (Jul 06 2023 at 14:56):

@Conrad Do you really want to build Lake from the source?

Conrad (Jul 06 2023 at 14:57):

yes

Conrad (Jul 06 2023 at 14:57):

Maybe i shall ask another question first(i don't know ,i am confused):i follow this guide:https://leanprover-community.github.io/install/project.html . But i met trouble here:
image.png
image.png

Bulhwi Cha (Jul 06 2023 at 14:58):

Did you install Lean 4?

Conrad (Jul 06 2023 at 14:59):

yes,in vs code

Bulhwi Cha (Jul 06 2023 at 15:02):

Did you install Git for Windows?

Conrad (Jul 06 2023 at 15:02):

yes

Conrad (Jul 06 2023 at 15:02):

i mean i already have downloded it,i am Creating a Lean project

Bulhwi Cha (Jul 06 2023 at 15:05):

Do you know how to run Git Bash on VS Code?

Conrad (Jul 06 2023 at 15:07):

i don't know

Bulhwi Cha (Jul 06 2023 at 15:08):

Hang on—I'm switching from Linux to Windows.

Conrad (Jul 06 2023 at 15:09):

however,git bash can run well in windows as an app

Bulhwi Cha (Jul 06 2023 at 15:14):

Do you want to create a Lean project that depends on Mathlib?

Bulhwi Cha (Jul 06 2023 at 15:16):

If so, run lake new your_project_name math on Git Bash.

Conrad (Jul 06 2023 at 15:21):

yes

Conrad (Jul 06 2023 at 15:28):

what's wrong with it:
image.png

Conrad (Jul 06 2023 at 15:28):

how to fix it?

Conrad (Jul 06 2023 at 15:32):

And the cache and lake_package is dimming:
image.png

Bulhwi Cha (Jul 06 2023 at 17:01):

On Git Bash, use cd to change your working directory to your project's directory. For example, if your project playground is in ~/lean-projects, run cd ~/lean-projects/playground. (~ is your home directory.)

Bulhwi Cha (Jul 06 2023 at 17:10):

On VS Code, open your project using "File > Open Folder..." (Ctrl+K Ctrl+O).

Conrad (Jul 07 2023 at 03:26):

hi bro ,can you help me ,i wanna create a new project on lean4,but "unknown package 'Mathlib'" happens. How to deal with it
image.png

Notification Bot (Jul 07 2023 at 04:19):

Scott Morrison has marked this topic as unresolved.

Notification Bot (Jul 07 2023 at 04:19):

A message was moved here from #new members > ✔ get-mathlib-cache on Lean 4? by Scott Morrison.

Scott Morrison (Jul 07 2023 at 04:20):

@Conrad, I've moved your message here. If you've already started a topic, please try to write follow-up messages in the same topic, rather than in unrelated other topics.

Scott Morrison (Jul 07 2023 at 04:20):

Can you show us the contents of your lakefile.lean?

Scott Morrison (Jul 07 2023 at 04:21):

(Also, I see you posted duplicate messages in multiple topics. Please do not do this!)

Conrad (Jul 08 2023 at 03:57):

oh ,i am really sorry,i don't know how this chatroom works

Conrad (Jul 08 2023 at 03:57):

image.png
@Scott Morrison

Kevin Buzzard (Jul 08 2023 at 06:23):

You need to open the root directory of your project using VS Code's open folder functionality. In your screenshot you have opened a folder called 0 instead.


Last updated: Dec 20 2023 at 11:08 UTC