r/concatenative • u/Hypercubed • 13d ago
Using LEAN to prove your language
Wondering if anyone has used LEAN (or similar) to validate their stack language?
2
Upvotes
r/concatenative • u/Hypercubed • 13d ago
Wondering if anyone has used LEAN (or similar) to validate their stack language?
1
u/Hypercubed 12d ago edited 12d ago
Inspired by https://bend-lang.com/ I think it would be very easy to generate LEAN proofs from stack effect comments in stack languages. Much easier than non-stack languages (applicative languages?).
Examples:
could generate:
(untested, LLM generated).
A more complex definition could define multiple
@effects:I haven't done anything like this but think it's a really interesting idea.
1
u/Hypercubed 8d ago
Is anyone interested in updates on this? I bascially had an AI agent build out a LEAN interpetor for my toy language (that I have been builind for something like 25 years); that was the easy part. The next step is proving that the stdandard library definitions do what I say that do. I'm having some trouble with this. I'm very interested in seeing if anyone else is doing anything similar.