News for hackers. Stuff that matters.
Re:AlphaProof Code by paganel on Tuesday November 10, 2026 @07:28AM (#50439375)
I'm not at all versed in this "formal proofing" thing, but without diving all that much into it how does this handle the halting problem (and the related problems that in the end all point to said halting problem)?
Re:AlphaProof Code by xrisk on Tuesday November 10, 2026 @07:31AM (#50439411)
lean has no relation to the halting problem; you can think of it as a language that allows proofs to be encoded as code, and the compiler that runs that code as knowing how to enforce mathematical constraints appropriately
Re:AlphaProof Code by auggierose on Tuesday November 10, 2026 @07:38AM (#50439477)
there certainly is a relation; you might not be able to prove all the properties you care about because of the halting problem; but that is more a theoretical problem, not a practical one
Re:AlphaProof Code by gf000 on Tuesday November 10, 2026 @08:30AM (#50440025)
> you might not be able to prove all the properties you care about

And just to add, this is also true of "human" mathematics as well.

Re:AlphaProof Code by NooneAtAll5 on Tuesday November 10, 2026 @07:32AM (#50439420)
do you mean how is halting problem not a blocker or how halting problem itself is proven?

answer to the first is same as always - by simply not guaranteeing that everything is provable, especially in finite amount of time

Re:AlphaProof Code by bbor on Tuesday November 10, 2026 @07:46AM (#50439582)
Hmm. Which means that they just luckily don't have to prove anything about any software that might halt...? Or?

Like, they use some pretty stark terms here:

  Formal verification—mathematically proving code runs correctly without flaws—is the highest standard of security assurance; however, it is difficult and often labor-intensive.
Of course "proving" and "without flaws" are just words in a language game and might not mean the absolute things we expect them to as laypeople. Is that what's going on? Or can the "code" they're "proving... runs correctly" indeed be unrelated to such a fundamental finding of compsci?

I type this message to you all with sadness in my heart, cause I know I could get a better answer 100x faster by just asking an agent to research, which I could then have it dumb down to my level until I grasp it. I don't really know what the point of forums are, anymore. It's undeniably hard not to see ourselves as a planet of sad, fragile monkeys wasting away the hours between birth and death. That was already the case, perhaps, but at least learning and sharing knowledge about engineering in places like this felt like a somewhat meaningful way to positively impact the material conditions of my fellow humans, even in an indirect way. As of November 2026, I'm just the taste/framing component of artificial minds that seem overwhelmingly likely to develop their own within months or maybe years.

For a long time (since noticing the singularity) I've felt like someone doused in napalm and set alight while falling through the sky, frantically trying to put myself out while fixing my broken parachute. But post-Mythos I can't help but fear that there is no solid ground below. Just endless void. :(

Re:AlphaProof Code by jlouis on Tuesday November 10, 2026 @08:10AM (#50439816)
Driving a lean proof manually is a lot of effort. It's often 50x or 100x the effort of writing the initial program in the first place. The grand idea here is that if you can get a system to have a good heuristic/intuition for figuring out those proofs, you can lower this effort amplification by a lot. This makes formal verification at this level feasible for mission critical software, and also a larger slew of software we rely on.

The difficulty lies in coming up with the right formulations, and also some times altering the program to make it amenable to proof. It's quite often the case that a proof won't go through unless the program itself has the right idea.

As for the halting problem: it is highly theoretical. Lots of programs which are useful can be proven to halt for instance. Or you can just prove that the program is correct up to the point in time where the sun expansion covers the earth. There are often practical ways around such limitations, including the alteration or reformulation of the program.

Re:AlphaProof Code by NooneAtAll5 on Tuesday November 10, 2026 @08:22AM (#50439930)
> Which means that they just luckily don't have to prove anything about any software that might halt...? Or?

the only thing halting problem says is that you can't prove *everything*

feel the difference between "any" and "every"

Re:AlphaProof Code by solyin on Tuesday November 10, 2026 @08:24AM (#50439960)
Which definition of singularity are you using? I'm still doing my own laundry. It's quite poetic, what you wrote, if a bit sad. The hours between birth and death are waste, but are to be enjoyed. To discover the human condition. Overcome adversity, or die trying. Yes the machine gods will reign supreme but until they come to be, we must play and feel joy and sadness and love, hate... sonder. The planet doesn't have to be a bunch of sad monkeys. Maybe you can make a virus that will turn us into joyous lizards! There is so much left to discover and understand. How do you un-fry an egg?
Re:AlphaProof Code by gf000 on Tuesday November 10, 2026 @12:46PM (#50443612)
Formal verification is actually a very interesting concept and topic. There is a famous statement called the Curry–Howard correspondence: every type signature is a theorem, and the implementation is its proof.

So if I have a language where I can encode in the type system that a number is a prime and is even, then for example the following would be a theorem with a proof:

  Lemma even-prime: a -> Prime(a) ∧ Even(a) { // read as 'it returns a number `a` that is both prime and even 
    return 2
  }
If we restrict the language enough, we can both encode very complex statements and can make sure that one can only ever write an implementation that compiles if it's actually true. E.g. an ordinary language like python where you could return None instead of 2 would fail these requirements.

So they often have dependent type systems -- in these you can freely mix functions and values in your type signatures, not just types. E.g. you could have a Matrix type with two parameters, and then you can have functions like `transpose: Matrix a b -> Matrix b a`.

---

But this is just one side of the whole thing, the other is how to actually prove anything, like what even is `Even` in the above? A type like `someNum: Int` is also a theorem, but it only translates to "there exists an integer" - hardly interesting.

The real "mind blow" (at least to me) was that we just simply create a type for Equality. It takes the same parameter twice [1] (like in the Matrix example it would be Matrix a a) -- and thus we get a construct that can only be instantiated if the two sides are equal as per the language's compilers rules, that is automatically enforced by the compiler itself!

So now you can have `Eq 2 (1+1)`, but not `Eq 2 (1+3)`. And one last step that makes it general enough for all kinds of proofs, the compiler of these languages are not Turing complete. You can write many things, but for reasoning about loops you usually introduce a fuel that is always decreasing (and thus the compiler will accept it, as it knows it will run out once and that's enough for it). So it can evaluate everything, even in types and creating a normalized expression -- and then accepts everything as equal that normalizes to the same thing.

So for a more complex proof, you can just break down the problem to small steps that are by themselves understandably equal by the compiler.

[1] It's not quite true in this form

Re:AlphaProof Code by sebzim4500 on Tuesday November 10, 2026 @07:35AM (#50439452)
Solving the halting problem means writing a program which can tell whether an arbitrary other program will halt or not.

Proving that a particular program will or won't halt can still be easy.

The halting problem does imply that there exist programs which are entirely correct that lean will never be able to prove the correctness of, but this is not really relevant in practice.

Re:AlphaProof Code by contravariant on Tuesday November 10, 2026 @07:37AM (#50439472)
Dijkstra's approach would be to prove there is a strictly decreasing natural number associated to the loop.

This limits programs to the ones that can be formally shown to terminate. Which is good enough for most purposes.

My approach is to accept programs that run forever as long as I'm fairly sure each loop makes progress of some sort (instead of simply doing "while not solved: continue").

Re:AlphaProof Code by kuboble on Tuesday November 10, 2026 @07:38AM (#50439482)
Halting problem only stops you from your prover from working on all programs.

On some programs like "stop" or "while(true)" the proof is easy.

With more sophisticated analysers it becomes possible on wider range of programs.

Re:AlphaProof Code by bananaflag on Tuesday November 10, 2026 @07:41AM (#50439526)
The same way Goedel's 0th incompleteness theorem doesn't make math proofs impossible (this is not sarcasm btw).