Andrew N. Aguib has launched a project to formalize Alfred North Whitehead and Bertrand Russell's Principia Mathematica within the Lean theorem prover. This ambitious undertaking aims to translate the foundational work of mathematical logic, known for its dense symbolism and intricate proofs, into a computer-verifiable format. The project leverages Lean's powerful type theory and automated proof assistance to rigorously check the Principia's theorems and definitions, offering a modern perspective on this historical text and potentially revealing new insights. The project is ongoing and currently covers a portion of the first volume. The code and progress are available on GitHub.
Clean is a new domain-specific language (DSL) built in Lean 4 for formally verifying zero-knowledge circuits. It aims to bridge the gap between circuit development and formal verification by offering a high-level, functional programming style for defining circuits, along with automated proofs of correctness within Lean's powerful theorem prover. Clean compiles to the intermediate representation used by the Circom zk-SNARK toolkit, enabling practical deployment of verified circuits. This approach allows developers to write circuits in a clear, maintainable way, and rigorously prove that these circuits correctly implement the desired logic, enhancing security and trust in zero-knowledge applications. The DSL includes features like higher-order functions and algebraic data types, enabling more expressive and composable circuit design than existing tools.
Several Hacker News commenters praise Clean's innovative approach to verifying zero-knowledge circuits, appreciating its use of Lean4 for formal proofs and its potential to improve the security and reliability of ZK systems. Some express excitement about Lean4's dependent types and metaprogramming capabilities, and how they might benefit the project. Others raise practical concerns, questioning the performance implications of using a theorem prover for this purpose, and the potential difficulty of debugging generated circuits. One commenter questions the comparison to other frameworks like Noir and Arkworks, requesting clarification on the specific advantages of Clean. Another points out the relative nascency of formal verification in the ZK space, emphasizing the need for further development and exploration. A few users also inquire about the tooling and developer experience, wondering about the availability of IDE support and debugging tools for Clean.
This paper explores using first-order logic (FOL) to detect logical fallacies in natural language arguments. The authors propose a novel approach that translates natural language arguments into FOL representations, leveraging semantic role labeling and a defined set of predicates to capture argument structure. This structured representation allows for the application of automated theorem provers to evaluate the validity of the arguments, thus identifying potential fallacies. The research demonstrates improved performance compared to existing methods, particularly in identifying fallacies related to invalid argument structure, while acknowledging limitations in handling complex linguistic phenomena and the need for further refinement in the translation process. The proposed system provides a promising foundation for automated fallacy detection and contributes to the broader field of argument mining.
Hacker News users discussed the potential and limitations of using first-order logic (FOL) for fallacy detection as described in the linked paper. Some praised the approach for its rigor and potential to improve reasoning in AI, while also acknowledging the inherent difficulty of translating natural language to FOL perfectly. Others questioned the practical applicability, citing the complexity and ambiguity of natural language as major obstacles, and suggesting that statistical/probabilistic methods might be more robust. The difficulty of scoping the domain knowledge necessary for FOL translation was also brought up, with some pointing out the need for extensive, context-specific knowledge bases. Finally, several commenters highlighted the limitations of focusing solely on logical fallacies for detecting flawed reasoning, suggesting that other rhetorical tactics and nuances should also be considered.
This paper introduces Crusade, a formally verified translation from a subset of C to safe Rust. Crusade targets a memory-safe dialect of C, excluding features like arbitrary pointer arithmetic and casts. It leverages the Coq proof assistant to formally verify the translation's correctness, ensuring that the generated Rust code behaves identically to the original C, modulo non-determinism inherent in C. This rigorous approach aims to facilitate safe integration of legacy C code into Rust projects without sacrificing confidence in memory safety, a critical aspect of modern systems programming. The translation handles a substantial subset of C, including structs, unions, and functions, and demonstrates its practical applicability by successfully converting real-world C libraries.
HN commenters discuss the challenges and nuances of formally verifying the C to Rust transpiler, Cracked. Some express skepticism about the practicality of fully verifying such a complex tool, citing the potential for errors in the formal proofs themselves and the inherent difficulty of capturing all undefined C behavior. Others question the performance impact of the generated Rust code. However, many commend the project's ambition and see it as a significant step towards safer systems programming. The discussion also touches upon the trade-offs between a fully verified transpiler and a more pragmatic approach focusing on common C patterns, with some suggesting that prioritizing practical safety improvements could be more beneficial in the short term. There's also interest in the project's handling of concurrency and the potential for integrating Cracked with existing Rust tooling.
Summary of Comments ( 32 )
https://news.ycombinator.com/item?id=43797256
Hacker News users discussed the impressive feat of formalizing parts of Principia Mathematica in Lean, praising the project for its ambition and clarity. Several commenters highlighted the accessibility of the formalized proofs compared to the original text, making the dense mathematical reasoning easier to follow. Some discussed the potential educational benefits, while others pointed out the limitations of formalization, particularly regarding the philosophical foundations of mathematics addressed in Principia. The project's use of Lean 4 also sparked a brief discussion on the theorem prover itself, with some commenters noting its relative novelty and expressing interest in learning more. A few users referenced similar formalization efforts, emphasizing the growing trend of using proof assistants to verify complex mathematical work.
The Hacker News post titled "Show HN: Formalizing Principia Mathematica using Lean" (https://news.ycombinator.com/item?id=43797256) has generated a modest number of comments, primarily focusing on the complexities and nuances of formalizing mathematical proofs, particularly within the context of Principia Mathematica.
One commenter highlights the historical context of Principia, emphasizing its significance as a pre-computer-era attempt to formalize mathematics. They point out the inherent challenges in such an endeavor, particularly the book's verbose and intricate symbolic notation. This comment also touches on the evolution of logical systems and proof assistants, contrasting Principia's methods with more modern approaches.
Another commenter questions the practical applications of formalizing Principia. They acknowledge the intellectual value of the project but wonder about its relevance to modern mathematics, particularly given the availability of more efficient and powerful proof assistants. This sparks a discussion about the differences between simply verifying existing proofs and actually creating new ones within a formal system.
A subsequent comment clarifies the distinction between verifying and formalizing a proof. They explain that formalization involves encoding the entire logical structure of a proof within a computer system, allowing for automated checking of each individual step. This is contrasted with mere verification, which might involve a human checking the overall logic of a proof without necessarily breaking down every minute detail.
Another thread delves into the specifics of Lean, the proof assistant used in this project. Commenters discuss its strengths and weaknesses, comparing it to other systems like Coq and Isabelle. The discussion touches upon the tradeoffs between the accessibility and expressiveness of different proof assistants. One commenter mentions the potential of using Lean for educational purposes, given its relatively user-friendly interface.
Finally, a comment praises the project for its ambition and potential to contribute to the field of automated theorem proving. They acknowledge the limitations of current technology but express optimism about the future of formal mathematics and the role projects like this can play in advancing the field.
In summary, the comments on this Hacker News post reflect a nuanced understanding of the challenges and opportunities associated with formalizing mathematical proofs. They range from discussions about the historical significance of Principia Mathematica to the practicalities of using modern proof assistants like Lean. The overall tone is one of cautious optimism, acknowledging the limitations of current technology while recognizing the potential for future advancements.