← 返回技术雷达
Hacker News tech

Anatomy of a Lean proof for software engineers

Hacker News 热议:Anatomy of a Lean proof for software engineers(50 赞 / 1 评论,来源 agostbiro.net)

原文开头节选

I recently worked through a problem from a theory of computation textbook that asked me to prove a property of a language using finite automata. The informal proof is a simple constructive proof where you build an automaton and show that it recognizes the language. This is kind of similar to program verification, so I thought it’d be interesting to see what it takes to formalize the proof. Lean is a good choice for this, because its Mathlib has all the theorems for the problem.

After finishing the formal proof, I decided to write it up, because I think it provides software engineers with good insight into what it takes to formally prove properties of a system.

I tried to make this post accessible. If you’re comfortable with a modern statically typed programming language (such as TypeScript or Rust), binary arithmetic, basic propositional logic, and inductive proofs, you should be able to follow along.

Feel free to skip to the next section if you’re comfortable with DFAs and regular languages.

(以上为原文节选,完整内容见下方”原文来源”)

这条动态今日登上 Hacker News 首页(50 赞 / 1 评论,来源 agostbiro.net)。技术雷达每日自动聚合 AI 工程、后端架构、DevOps 方向的前沿动态;相关工程落地可浏览下方的相关服务与延伸阅读,或直接与我们团队交流。

原文来源: Hacker News

相关服务