TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The deep link equating math proofs and computer programs

249 pointsby digital55over 1 year ago

18 comments

codekillaover 1 year ago
Bob Harper wrote a really good blog entry that expounds on this as Computational Trinitarianism [1].<p>Michael Shulman also wrote about the extension to Homotopical Trinitarianism [2]<p>For a good summary with links there is [3]<p>[1] Computational Trinitarinism, <a href="https:&#x2F;&#x2F;existentialtype.wordpress.com&#x2F;2011&#x2F;03&#x2F;27&#x2F;the-holy-trinity&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;existentialtype.wordpress.com&#x2F;2011&#x2F;03&#x2F;27&#x2F;the-holy-tr...</a><p>[2] Homotopical Trinitarinism, <a href="http:&#x2F;&#x2F;home.sandiego.edu&#x2F;~shulman&#x2F;papers&#x2F;trinity.pdf" rel="nofollow noreferrer">http:&#x2F;&#x2F;home.sandiego.edu&#x2F;~shulman&#x2F;papers&#x2F;trinity.pdf</a>]<p>[3] nCatLab, <a href="https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;computational+trilogy" rel="nofollow noreferrer">https:&#x2F;&#x2F;ncatlab.org&#x2F;nlab&#x2F;show&#x2F;computational+trilogy</a>
评论 #37849186 未加载
评论 #37848059 未加载
ewuhicover 1 year ago
Could anyone suggest a happy path (&quot;zero to hero&quot;) book on formal verification, which also does the ecosystem review for the formal verification languages, and then focuses on one, as well as provides the reasoning and mentions tradeoffs for such a choice?
评论 #37848420 未加载
评论 #37853121 未加载
评论 #37852483 未加载
评论 #37851330 未加载
评论 #37849952 未加载
评论 #37854104 未加载
评论 #37850531 未加载
boxfireover 1 year ago
Programming in dependent types with univalence (Homotopy Type Theory) is an awesome way to see this realized.<p>The typing statement has to be proven by realizing the isomorphism demanded by substitution. You are more than anything directly proving what you claim in the type. Since proof is isomorphism here, the computation in terms of lowering the body of the definition to a concrete set of instructions is execution of your proof! (possibly machine code or just abstract in a virtual machine like STG). The constructive world is really nice. I hope the future builds here and dependent types with univalence is made easier and more efficient.
评论 #37847050 未加载
strogonoffover 1 year ago
Lamport’s <i>Computation and State Machines</i>[0] is an interesting take on relating mathematics to computer programming. Lamport appears to treat programs as state machines, making it possible to reason about those with pure mathematics (in a way independent of programming language syntactic constructs).<p>[0] <a href="https:&#x2F;&#x2F;research.microsoft.com&#x2F;en-us&#x2F;um&#x2F;people&#x2F;lamport&#x2F;pubs&#x2F;state-machine.pdf&amp;type=exact" rel="nofollow noreferrer">https:&#x2F;&#x2F;research.microsoft.com&#x2F;en-us&#x2F;um&#x2F;people&#x2F;lamport&#x2F;pubs&#x2F;...</a>
评论 #37849318 未加载
评论 #37849114 未加载
qsortover 1 year ago
If you want to see how the Curry-Howard isomorphism works in practice, this is a very accessible introduction: <a href="https:&#x2F;&#x2F;groups.seas.harvard.edu&#x2F;courses&#x2F;cs152&#x2F;2021sp&#x2F;lectures&#x2F;lec15-curryhoward.pdf" rel="nofollow noreferrer">https:&#x2F;&#x2F;groups.seas.harvard.edu&#x2F;courses&#x2F;cs152&#x2F;2021sp&#x2F;lecture...</a>
评论 #37847466 未加载
评论 #37852382 未加载
gorgoilerover 1 year ago
Not just formally but also stylistically. Composable lemma and composable functions are two leaves of the same book. The construction of a proof is to convince the reader of the correctness of the logic and this is exactly the same goal of a mathematical author as it is of a computer programmer.<p>Business really interferes with the goal of the mathematical programmer — proofs of concept, hacks to get MVPs over the line, throwaway demos to investors etc. — but after a certain point the value of the codebase becomes entrenched into the value of the business and that’s when you need to bring in the mathematical coders to constantly refine and prune your codebase into something that will survive and bear out the earnings per share values.
SilasXover 1 year ago
Okay. Today I&#x27;ll be the idiot.<p>I don&#x27;t get it. Or rather, I don&#x27;t get the significance of the Curry-Howard Isomorphism. Questions:<p>1) Is there an example of a proof and its corresponding program that makes you say &quot;whoa, trippy, I didn&#x27;t expect those to be related&quot;? Like, yeah, an Int -&gt; Boolean function &quot;proves&quot; you can construct a Boolean from an integer, but ... so what? What would a non-trivial proof (say, on the order of the Pons Asinorum) look like as a program?<p>2) Are the &quot;programs&quot; referred to here to merely pure functions (i.e. side effect-free, global state-free ones)? It <i>sounds</i> like it is based on lines like this:<p>&gt;When a computer program runs, each line is “evaluated” to yield a single output.<p>That ... seems to cram &quot;computer programs&quot; into some kind of Procrustean bed <i>unless</i> we&#x27;re taking about pure functions. But then it also talks about how CHI has applications in verifiable programs, which, I&#x27;m told, <i>can</i> reason about side effects.<p>Feel free to call me an idiot, as long as you can also inspire an aha-moment.
评论 #37849888 未加载
评论 #37847820 未加载
评论 #37851283 未加载
评论 #37848731 未加载
评论 #37848617 未加载
评论 #37848797 未加载
评论 #37847780 未加载
评论 #37850397 未加载
评论 #37848258 未加载
评论 #37848650 未加载
athrowaway3zover 1 year ago
On a tangent. I think its worth it to push typed mathematics waaaaay down into highschool. While students are learning multiplication, the teaching tools&#x2F;question&#x2F;answers need to teach how that changes the result&#x27;s units (types). Highschool physics especially needs to have &#x27;proper units at every stage of calculation&#x27; as part of the test.<p>ps. and our calculators (&amp; excel) needs better support for it
评论 #37849194 未加载
评论 #37846678 未加载
评论 #37846658 未加载
评论 #37849802 未加载
评论 #37848715 未加载
评论 #37859617 未加载
samirillianover 1 year ago
I don&#x27;t know that much about it, but the impression I got from studying TLA+ was that machine-executable code was distinctly <i>not</i> mathematics, and that programs are never provable. Am I wrong? Or is this just the kind of sensational snake-oil that HN readers are susceptible to buying.
评论 #37848558 未加载
评论 #37848177 未加载
评论 #37848839 未加载
评论 #37848642 未加载
评论 #37848200 未加载
评论 #37848028 未加载
f1shyover 1 year ago
A link between equations and programs is show in this video: <a href="https:&#x2F;&#x2F;m.youtube.com&#x2F;watch?v=aAlR3cezPJg&amp;pp=ygUHU2ljcCA3YQ%3D%3D">https:&#x2F;&#x2F;m.youtube.com&#x2F;watch?v=aAlR3cezPJg&amp;pp=ygUHU2ljcCA3YQ%...</a><p>I assume mostly known in this site.
ewuhicover 1 year ago
In addition to my other comment here, is there any application of formal verification for complex ETL (Data) pipelines, from the standpoint of enumerating transformations, workflow steps, and states, with less emphasis on temporal soundness?
评论 #37855551 未加载
bigmattystylesover 1 year ago
Don’t languages like ADA take this literally and require that your instructions be mathematical correct &#x2F; complete?
评论 #37851182 未加载
throwthrow5643over 1 year ago
How to formally verify a single page web application?
评论 #37859580 未加载
评论 #37860610 未加载
thyrsusover 1 year ago
The barber was a woman.
caycepover 1 year ago
was this something to do with Djykstra&#x27;s work?
评论 #37846360 未加载
评论 #37847548 未加载
评论 #37850146 未加载
评论 #37847544 未加载
评论 #37849616 未加载
auggieroseover 1 year ago
Most overrated correspondence ever.<p>You don&#x27;t need curry-howard for software verification, you don&#x27;t need it for mathematics, and you don&#x27;t need it for logic.<p>You only really need it to j*rk off hard over types.
jqpabc123over 1 year ago
Yes, of course there is a link.<p>At the lowest machine level, a computer program is simply base 2 math --- the simplest possible number system --- aka binary logic.<p>Aside from moving mathematical data around in storage, math is really about the *only* thing a computer processor does.
worikover 1 year ago
This is very old.<p>Yes, programming is a super set of theorem proving.<p>It is true, but not generally useful.<p>Building useful programmes is, IMO, best described as a craft. It is learnt from other crafters, and improves with practice<p>Formal methods can be helpful in specific cases but generally speaking writing correct formal specifications is just as hard, or harder, than writing useful, reliable, computer programs
评论 #37849113 未加载