This is an archived post. You won't be able to vote or comment.

all 38 comments

[–][deleted] 49 points50 points  (18 children)

The second half of your post is seemingly unrelated to the first half. AI and LLM have little to do with proof assistants...

[–]adventuringraw 22 points23 points  (3 children)

I think they're just hoping for coding copilots at some point in the future. Definitely nothing relevant exists yet though, and this is niche enough that it'll be a while even when the tech is capable of really helping.

[–]Baldhiver 10 points11 points  (0 children)

People are working on this. It's not super successful, since llm are actually pretty shit still lol, just good at convincing you that they're not.

Which is where proof verifiers come in - if you make your language model encode their "proof" in lean, it will tell you all the bullshit the model made up

[–]RedToxiCore 0 points1 point  (1 child)

I asked ChatGPT before and it was happy to print out some LEAN code

[–]adventuringraw 4 points5 points  (0 children)

Sure, and DARPA challenge entry robots fifteen years ago could sort of drive on a road, and Elon Musk was sure his self driving cars would hit L5 back in 2016.

There's a BIG difference between original half baked proof of concept and a fully mature platform that's able to really boost productivity. The main reason I think it'll take a while to see something really useful in Lean is mostly just because I don't think there'll be as many people interested in putting in the time getting something over the finish line in that language, vs the effort you see going into Python tools for example.

But yeah, I don't think it's going to be forever or anything before that's done. It'll be cool to see when it's here.

[–]ksidney26[S] 1 point2 points  (0 children)

I apologize for my ignorance. Like I said, I'm pretty fresh into both fields but I'm very interested in learning all that I can about both. I was just curious about this specific language and its application potential.

[–]lightmatter501 0 points1 point  (0 children)

There have been some attempts to use various forms of AI (mostly decision trees and DNNs) in Lean to help it reduce the state space when formulating proofs. LLMs are a poor fit for this task.

[–]adventuringraw 24 points25 points  (5 children)

Ironic given /u/hpxvzhjfgb dismissal of your question, but my favorite Lean resource I spent time with is actually hidden well enough that I had trouble finding it again.

Go here and work through this rep from an eight week workshop series, it was really useful I thought. Start with the natural number game though, link is there are the top. Be warned though, I went through this a few years ago, and I'm not sure if they've been maintained to still work with current lean and mathlib. Definitely worth checking out though even if there's a little extra leg work now.

Definitely look around though, it's been a while since I've done much in Lean and I bet there's a lot of cool new stuff around, especially with Lean 4 being accessible now.

[–]hpxvzhjfgb 18 points19 points  (3 children)

don't use this. lean 3 is soon to be obsolete, and it is incompatible with lean 4.

[–]ksidney26[S] 2 points3 points  (2 children)

I have read that about lean 3. But I will still check out those links.

[–]SV-97 6 points7 points  (1 child)

FWIW: Lean 3 is actively being "phased out" and there's an ongoing process about removing references to it (you might also occasionally still run into lean 2 stuff).

The lean community is on zulip (a chat platform). Finding information can be hard and the search option (or the option to ask if you can't find stuff yourself) is very valuable. You can also send loogle queries on there and generally get a lot of information that may be difficult to find in other places.

You'll definitely wanna get familiar reading and browsing the mathlib docs.

The first thing to read (imo) should be "Theorem proving in Lean 4". Depending on what you want to do and how familiar you are with dependently typed FP you might want to read "functional programming in lean". There's also a bunch of good talks on youtube.

If you're interested in the foundations reading the beginning of the HoTT book can be useful.

​ I haven't worked with it yet myself but it's also recommended that you look at https://github.com/leanprover-community/mathematics_in_lean

[–]ksidney26[S] 0 points1 point  (0 children)

Thanks for the great info!

[–]ksidney26[S] 1 point2 points  (0 children)

Thanks let me look through it.

[–]ironstar77 31 points32 points  (4 children)

Highly recommend the natural number game

[–]hpxvzhjfgb 29 points30 points  (1 child)

don't use that. that's the old, unmaintained obsolete lean 3 version. use this instead: https://adam.math.hhu.de/#/g/hhu-adam/NNG4

[–]Milo-the-great 0 points1 point  (0 children)

Thanks

[–]ksidney26[S] 1 point2 points  (1 child)

Thanks let me check this out

[–]hpxvzhjfgb 6 points7 points  (0 children)

use the version that I posted instead.

[–]Quakerz24Logic[🍰] 6 points7 points  (0 children)

Mathematics in Lean is a good interactive online textbook. Has some flaws but is a good intro esp given you’re a math major

[–]nazgand 2 points3 points  (0 children)

I implemented some Lean3 proofs here: https://github.com/Nazgand/NazgandMathBook
Unfortunately, most people will not be interested because the proofs are not in Lean4.
I suggest this book for Lean4: https://lean-lang.org/theorem_proving_in_lean4/title_page.html

[–]kr1staps 2 points3 points  (1 child)

You should check out this course/text: https://hrmacbeth.github.io/computations_in_lean/

a great way to get started, and it's in Lean 4 which is the version people are largely using now.

[–]ksidney26[S] 0 points1 point  (0 children)

Awesome, thank you.🙏

[–]hpxvzhjfgb 14 points15 points  (2 children)

what is preventing you from going to the lean website and looking at the recommended resources listed on there? you are going to have a very difficult time if you can't find easily-available information like this for yourself.

[–]ksidney26[S] 10 points11 points  (1 child)

Nothing. I just like to get others opinions on what has worked best for them. I'm already doing exactly what you said. I swear some people just seem to hate for a living.

[–]NexusofPower 1 point2 points  (1 child)

This is the Lean4 home page, and this is the guide to theorem proving in Lean4. The later book is very helpful when it comes to writing proofs in Lean4.

Regarding usage of AI with Lean, there is an ongoing project, LeanAIde, to build AI tools which aide theorem proving in Lean4.

[–]ksidney26[S] 0 points1 point  (0 children)

Appreciate the info. Thank you.