4 comments

  • nyrikki1 hour ago
    &gt; Prop vs Decidable - I vaguely understand the distinction, but can use more examples. Also would like to know does this relate to the noncomputable property.<p>My path to this subject was tortured, so sorry if I don’t account for Polysemy etc.<p>With Prop, I think what you need to dig into is ‘non-computational’ not ‘non-computable’.<p>Mere propositions is probably best viewed with Homotopy Type Theory[0]<p>Two proofs (t1,t2) of the same proposition (p:Prop) which are definitionally equal are proof irrelevant, meaning that all they carry is the proof p is true.<p>This paper [1] may be helpful but the difference between groupoids and subsingletons with classical mathematics is challenging for many of us.<p>Hopefully this helps in your journey.<p>Also remember that with classical set theory the internal and external proposition truths are different, the Curry–Howard correspondence is to constructivist from lambda calculus, you don’t have PEM etc…<p>Remember DGM[2] shows that finite indexing or projection is PEM<p>Good luck and I hope you continue to share your journey.<p>[0] <a href="https:&#x2F;&#x2F;homotopytypetheory.org&#x2F;wp-content&#x2F;uploads&#x2F;2013&#x2F;03&#x2F;hott-online-323-g28e4374.pdf" rel="nofollow">https:&#x2F;&#x2F;homotopytypetheory.org&#x2F;wp-content&#x2F;uploads&#x2F;2013&#x2F;03&#x2F;ho...</a><p>[1] <a href="https:&#x2F;&#x2F;jesper.sikanda.be&#x2F;files&#x2F;definitional-proof-irrelevance-without-K.pdf" rel="nofollow">https:&#x2F;&#x2F;jesper.sikanda.be&#x2F;files&#x2F;definitional-proof-irrelevan...</a><p>[2] <a href="https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;Diaconescu-Goodman-Myhill+theorem" rel="nofollow">https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;Diaconescu-Goodman-Myhill+theo...</a>
  • jojomodding2 hours ago
    While I don&#x27;t know the specifics of Lean, I know Rocq and will attempt to answer some of the remaining questions. I look forward to someone else telling me that my intuition from Rocq is completely wrong, so take this all with a grain of salt and read the comments replying to this one.<p>1) rfl vs doing a proof:<p>It depends on how your things are defined. For example, consider the function that appends two lists, a classic in functional programming (Here&#x27;s a refresher: <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;35442915&#x2F;2694054" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;a&#x2F;35442915&#x2F;2694054</a> )This is usually defined by recursion. But the details matter: The example in the link is defined by recursion on the first argument. That is, for a concrete first argument, it can evaluate. So it can e.g. evaluate `append [] ys` to `ys` just by unfolding the definition and resolving matches. But for `append xs []` you can not evaluate the `xs` any further because the remaining behavior depends on its concrete shape. So to prove that `append xs [] = xs` you need a proof (by induction).<p>2) Prop vs Decidable<p>Prop is a mathematical proposition. For example, the Riemann Hypothesis is a Prop. But a decidable Proposition is one for which you can write a program that knows if it is true or false. And you need to actually write this program, and prove it correct. So currently the Riemann Hypothesis is not decidable, because no one figured out how to write that program yet. (It will be a simple `return true` or `return false`, but which??) This mostly shows up for something like `forall x y, decidable (x = y)` which allows you to say that for any two numbers you can decide if they are equal or not. You can then use this when you actually do functional programming in Lean and actually want to run the program on concrete inputs.<p>The remaining two questions are more specific to Lean&#x27;s engineering so I won&#x27;t even attempt to answer that.
  • awesomeMilou2 hours ago
    It&#x27;s interesting to see the notes of someone tackling lean who&#x27;s primary occupation is SWE but has a strong background in mathematics.
    • nextos1 hour ago
      Lean is great, but if someone&#x27;s primary interest is SWE, I think there are better choices. The Lean community is primarily focused on formalizing mathematics right now. This might change in the future. Lean is nice to learn theorem proving, but once you learn the basics, you&#x27;ll hit a roadblock when trying to move to software verification applications.<p>For SWE, the most mature option is probably Isabelle. It&#x27;s also a classical theorem prover, and it&#x27;s perhaps easier to start with something that doesn&#x27;t have dependent types. A cool thing is that the canonical Isabelle book [1] has been rewritten in Lean [2].<p>[1] <a href="http:&#x2F;&#x2F;concrete-semantics.org" rel="nofollow">http:&#x2F;&#x2F;concrete-semantics.org</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;lean-forward&#x2F;logical_verification_2025" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lean-forward&#x2F;logical_verification_2025</a>
  • latenightcoding1 hour ago
    I never hijack non-ai threads to talk about AI, but can anybody share their experience using LLMs to code in Coq, Lean, etc.
    • lambdas15 minutes ago
      I’ve never used them first hand, but crackpots sure do love claiming to solve Riemann hypothesis, P vs NP, Collatz conjecture etc and then peddle out some huge slop. My experience has solely been curiously following what the LLM’s have been generating.<p>You have to be very, VERY careful. With how predisposed they are to helping, they’ll turn to “dishonesty” rather than just shut down and refuse. What I tend to see is they get backed into a corner, and they’ll do something like prove something different under the guise of another:<p>They’ll create long pattern matching chains as to create labyrinths of state machines.<p>They’ll keep naming functions, values and comments to seem plausible, but you have to follow these to make sure they are what they say. A sneaky little trick is to drop important parameters in functions, they appear in the call but not in the actual body.<p>They’ll do something like taking a Complex value, but only working with the real projection, rounding a number, creatively making negatives not appear by abs etc etc<p>So even when it compiles, you’ve got the burden of verifying everything is above board which is a pretty huge task.<p>And when it doesn’t work, introducing an error or two in formal proof systems often means you’re getting exponentially further away from solving your problem.<p>I’ve not seen a convincing use that tactics or goals in the proof assistant themselves don’t already provide