reading surface
Formal systems
- words
- 2,831
- sections
- 21
- references
- 14
- compendium links
- 45
Theorem proving uses formal logic and computation to check whether claims follow from assumptions. It ranges from fully automated search to human-guided proof development in proof assistants. The practical value is simple: a machine-checked proof can make mathematical, software, hardware, and protocol claims much harder to misunderstand.
This page connects type theory, category theory, semantics, mathematics, topology, number theory, linear algebra, philosophy, Python, Rust, standards, software libraries, data sources, GitHub, and professional societies. It is the compendium page for turning important claims into checkable artifacts.
Working Definition
Permalink to Working DefinitionTheorem proving is the practice of representing definitions, assumptions, and claims in a formal language, then using a machine to check that a proof is valid. The machine may search for the proof automatically, check a proof written by a human, call a solver for a specific theory, or combine several proof engines behind one workflow.
The important distinction is between truth in the world and derivability inside a formal model. A prover can check that a theorem follows from stated assumptions. It does not prove that the assumptions captured every real-world requirement, that the implementation used the verified artifact correctly, or that the surrounding system remained inside the model boundary.
That boundary is not a weakness. It is the discipline. Good formal work says what was modeled, what was assumed, what was checked, which toolchain checked it, and what remains outside the proof.
Proof Artifact Anatomy
Permalink to Proof Artifact AnatomyA useful theorem-proving project is more than the final theorem. It usually contains:
- definitions that name the objects in play;
- assumptions that describe the allowed world;
- lemmas that break a difficult claim into reusable smaller claims;
- proof terms, tactics, or certificates that connect the steps;
- imports that identify the library context;
- extraction or verification boundaries that explain what the checked proof does and does not cover.
The hard part is often not the logic itself but the modeling boundary. A verified sorting function proves something about a particular implementation and specification; it does not prove that the surrounding product used the right comparator, preserved user intent, or handled every input pipeline correctly. Good formal work makes those boundaries explicit.
That modeling boundary is where theorem proving returns to philosophy: a checked derivation can answer whether a statement follows, but humans still have to decide whether the statement names the right world.
Trust Boundary
Permalink to Trust BoundaryEvery proof stack has a trusted computing base. That base may include the kernel of a proof assistant, a parser, a tactic engine, an SMT solver, a proof certificate checker, imported axioms, extraction code, compiler assumptions, and sometimes the operating system or build pipeline.
For interactive proof assistants, the trusted kernel is intentionally small compared with the automation that helps users build proofs. For SMT-heavy workflows, the solver is often part of the trust boundary unless it emits checkable certificates. For extracted code, the boundary includes the translation from proof terms to executable artifacts.
A serious proof record should say which parts were checked by a small kernel, which parts were trusted, which axioms were imported, and which generated artifacts were produced. Without that record, "formally verified" can become a slogan instead of an auditable claim.
Main Approaches
Permalink to Main ApproachesTheorem proving is a family of techniques, not one tool.
Automated theorem proving searches for proofs with little or no human guidance. Automated provers use resolution, tableaux, superposition, rewriting, unification, and other proof-search techniques. They are powerful when the problem can be encoded cleanly and the search space is manageable.
Interactive theorem proving lets a human state definitions and guide the proof while the machine checks each step. This makes it suitable for large bodies of mathematics, verified programs, compiler proofs, and formalized specifications.
SAT solving reasons about Boolean formulas. SMT solving extends that style of automation to theories such as integers, reals, arrays, bit-vectors, datatypes, strings, and uninterpreted functions. SMT solvers are widely used in software verification, hardware verification, symbolic execution, program analysis, and constraint solving.
Equality saturation uses e-graphs to represent many equivalent expressions at once. It is useful for rewrite-heavy domains such as compiler optimization, algebraic simplification, synthesis, and program transformation.
Proof Assistants
Permalink to Proof AssistantsProof assistants such as Lean, Rocq/Coq, Isabelle, Agda, HOL-family systems, and others provide environments for defining objects and checking proofs. Their strength is library growth. Once definitions and lemmas are built, later proofs can reuse them.
The proof assistant workflow rewards naming, modularity, and patience. Definitions should be stable. Lemmas should be reusable. Tactics should be legible enough that a future maintainer can repair a proof after a library upgrade. A proof file is code, but it is also a mathematical text with a machine-checkable spine.
Type theory is central here because many proof assistants treat propositions as types and proofs as terms. That bridge makes proofs inspectable as structured artifacts instead of detached prose.
Automated Provers
Permalink to Automated ProversAutomated theorem provers excel when a problem can be represented in a fragment they understand well. They can discharge first-order goals, search large spaces, find contradictions, and support interactive systems as back-end automation.
The practical challenge is encoding. A statement that is obvious to a human may be hard for a prover if the definitions are too abstract, the search space is too wide, or the relevant lemma is unavailable. Conversely, a solver may find a proof or counterexample that exposes a hidden modeling assumption the human missed.
This makes automated proving valuable as a companion to data sources and software libraries: proof output should be stored with enough input, version, benchmark, and certificate context to be reproduced.
SAT And SMT Solvers
Permalink to SAT And SMT SolversSAT solvers answer satisfiability questions for Boolean formulas. SMT solvers extend satisfiability solving with background theories. A verification tool might encode a program path into bit-vectors and arrays, then ask whether a safety property can be violated. If the solver returns a model, it may be a counterexample. If it returns unsat, the property holds for the encoded condition.
The phrase "for the encoded condition" matters. The solver result is only as strong as the translation, theory choice, bounds, and assumptions. A bounded proof, an unbounded invariant, and a solver timeout are different kinds of evidence. They should not be collapsed in the knowledge graph.
Standards matter because SMT-LIB, benchmark formats, solver options, and reproducible result conventions make solver work comparable across tools.
Equality Saturation
Permalink to Equality SaturationEquality saturation represents equivalent expressions compactly in an e-graph. Instead of choosing one rewrite path early, the system can apply many rewrite rules, keep many alternatives, and later extract the cheapest or most useful expression according to a cost model.
This is not the same as ordinary theorem proving, but it sits nearby. Equality saturation can help optimize programs, simplify algebraic expressions, discover rewrite opportunities, and support proof-producing transformations when combined with certificates or trusted checkers.
For linear algebra, compiler work, and symbolic systems, e-graphs are useful because equivalent expressions often have different numerical, performance, or readability properties.
Formal Mathematics
Permalink to Formal MathematicsFormal mathematics turns definitions, theorems, and proofs into machine-checkable libraries. The work is slow, but the payoff is cumulative: a theorem about topology can reuse algebraic foundations, a number-theory proof can reuse arithmetic libraries, and a verified algorithm can reuse lemmas about orders, lists, matrices, or finite sets.
Topology, number theory, category theory, and linear algebra all benefit from this reuse. Formalization forces hidden assumptions into the open: compactness, continuity, equality, decidability, computability, and representation choices have to be named.
The goal is not to replace mathematical prose. The goal is to create a second artifact that a machine can check and a human can audit.
Software Verification
Permalink to Software VerificationSoftware verification uses formal methods to connect programs with specifications. The target might be memory safety, compiler correctness, protocol invariants, serialization behavior, cryptographic properties, consensus transitions, hardware circuits, or safety-controller logic.
For Rust, theorem proving is adjacent to the language's safety story but not identical to it. Rust prevents many classes of memory errors, yet unsafe code, FFI, concurrency, cryptography, and protocol logic can still need additional proof, model checking, fuzzing, or review.
For GitHub, a formal proof belongs next to the implementation evidence: commit history, build logs, tests, fuzzing corpus, benchmark notes, issue discussions, and release tags. A proof that cannot be connected to the version of code it claims to verify loses much of its practical force.
When To Formalize
Permalink to When To FormalizeFormal proof is expensive enough that it should be aimed at leverage points. A protocol invariant, compiler optimization, serialization format, consensus transition, cryptographic primitive, safety controller, proof library, or core dependency can justify the effort because many downstream systems depend on it. A rapidly changing UI flow usually needs tests, logging, and review before it needs a proof assistant.
The practical gradient is:
- write examples to find obvious misunderstandings;
- write properties to explore larger input spaces;
- encode invariants when the domain has crisp rules;
- use solver checks when the theory fits;
- formalize the core when failure is costly and the specification is stable.
The graph should preserve that gradient. A page should not imply that every claim needs a proof assistant. It should show where machine checking adds real leverage.
Proof Workflow
Permalink to Proof WorkflowA healthy formal workflow usually starts informally. Write the intended statement in ordinary language, collect examples and counterexamples, define the objects, formalize the smallest useful lemma, and only then grow the library. Reusable definitions matter more than heroic single proofs.
Naming conventions, comments, module structure, and links to papers or standards keep the proof library usable after the original author forgets the details. Proof libraries are software libraries with unusually explicit contracts: imported theories, tactic packages, solver versions, extraction boundaries, and compatibility with the proof assistant all affect what can be checked and reused.
For implementation-heavy projects, pair the proof with ordinary engineering evidence: tests, fuzzers, build logs, benchmark notes, and threat models. Machine checking answers one class of question. It does not replace runtime observability or release discipline.
Specifications, Theorems, And Certificates
Permalink to Specifications, Theorems, And CertificatesThe proof object is only useful if the specification is legible. A formal specification says what the system is supposed to satisfy. A theorem states a claim inside that specification. A proof term, tactic script, solver result, or certificate records why the theorem was accepted. A checker or kernel decides which parts are trusted.
Those roles should remain separate in the compendium graph. A SAT result, SMT query, Lean theorem, Rocq development, Isabelle session, TPTP benchmark, and hand-written proof sketch are different evidence objects. Some are independently checkable. Some depend on solver trust. Some are bounded counterexample searches. Some discharge a specific lemma but leave the system model outside the proof.
Proof Record Contract
Permalink to Proof Record ContractA theorem-proving record should preserve:
- statement and informal intent;
- formal theorem name;
- proof assistant or solver;
- tool version and library revision;
- imported axioms or trusted assumptions;
- source files and repository commit;
- proof status: checked, admitted, timed out, bounded, counterexample, or trusted;
- generated certificates or extracted code;
- related implementation version;
- references to standards, papers, or benchmark suites.
These fields make a proof graphable. They let the site distinguish a theorem, a tactic, a solver query, a benchmark, a proof library, an implementation, and a claim about a deployed system.
Status Labels
Permalink to Status LabelsThe most useful theorem-proving metadata is often a status label:
- checked means the current toolchain accepted the proof;
- admitted means a gap was trusted by the environment;
- axiomatized means the claim depends on an explicit assumption;
- counterexample means a model or input refuted the candidate statement;
- bounded means the result only covers a finite search space or size;
- timeout means no proof or refutation was obtained in the allotted resources;
- extracted means code was generated from a formal artifact, with a separate runtime boundary.
These labels make proof pages more honest for data sources, standards, and GitHub. They prevent a proof-adjacent repository from looking equivalent to a machine-checked theorem.
Proof Provenance And Rechecking
Permalink to Proof Provenance And RecheckingThe strongest theorem-proving entry is recheckable. It should say which command was run, which source revision supplied the proof files, which library revision was imported, which solver or proof assistant accepted the artifact, and which assumptions remained trusted. Without that provenance, a proof can decay into a historical claim: "this was checked once" rather than "this is checkable from these inputs."
Rechecking matters because formal systems evolve. A tactic script may break after a proof-assistant upgrade. A solver may change heuristics and no longer find the same proof within the same timeout. A library theorem may be renamed, generalized, or moved. A project may introduce an axiom temporarily and forget to remove it. The graph should therefore distinguish a durable theorem from a successful run, a CI badge, a generated certificate, and a human claim about the checked result.
For pages connected to software libraries, Rust, or Python, the proof record should also name the implementation boundary. Was code extracted from the proof? Was an implementation proved against a model? Was a solver query generated by the codebase? Was a property checked only for bounded inputs? Each answer points to a different maintenance obligation.
Another useful split is between a reusable theorem and a discharged obligation. A theorem may belong to a formal library because other proofs depend on it. An obligation may exist only to satisfy a protocol requirement, migration invariant, compiler optimization, or release gate. Both can be checked, but they should be displayed differently: reusable mathematical infrastructure wants definitions and dependency context, while an obligation wants requirement identifiers, build evidence, and the system version it protects.
The most useful display pattern is a small status capsule beside the prose: formal system, theorem name, status label, source link, checked revision, imported assumptions, and the human intent of the theorem. Readers can then decide whether they are looking at teaching material, mathematical infrastructure, protocol assurance, optimization evidence, or an open formalization target.
Knowledge Graph Role
Permalink to Knowledge Graph RoleTheorem proving gives the knowledge graph a vocabulary for authority. Not every statement should be treated equally. A hand-written note, a citation, a test result, an SMT query, a proof assistant theorem, and a formally verified implementation all support different kinds of claims.
Useful graph nodes include theorem, definition, lemma, axiom, proof artifact, proof assistant, solver, benchmark, formal library, source file, repository, standard, paper, and implementation. Useful edges include defines, proves, assumes, imports, checks, discharges, extracts_to, verifies_version, contradicts, and depends_on.
This is one of the places where semantic web ideas become practical even without full RDF: stable identifiers and typed edges can keep proof claims from becoming vague badges.
A proof node should also remember what human question caused it to exist. Some proofs are teaching artifacts, some discharge safety requirements, some preserve mathematical knowledge, some shrink a trusted base, and some document that a solver could not find a counterexample under bounded conditions. The purpose changes how the proof should be displayed and maintained.
Failure Modes
Permalink to Failure ModesCommon theorem-proving failures include:
- proving the wrong statement precisely;
- importing axioms without making them visible;
- treating solver timeouts as weak successes;
- ignoring the gap between a model and the deployed system;
- losing the repository commit that was verified;
- relying on tactics that become unmaintainable after upgrades;
- presenting a bounded check as an unbounded proof;
- extracting code without validating the compiler and runtime boundary;
- using formal language to conceal uncertainty instead of exposing it.
Learning Path
Permalink to Learning PathStart with logic and small proofs, then choose a tool. Lean is approachable for formal mathematics and has an active library ecosystem. Rocq/Coq has deep teaching material and a long proof-assistant history. Isabelle has strong automation and mature formal-methods use. SMT solvers such as Z3 and cvc5 are excellent when the problem fits their theories. Equality-saturation tools are worth learning when rewrite search is the real bottleneck.
The best first project is not a grand theorem. It is a small statement whose informal proof you understand, formalized with enough comments that the proof file explains the modeling choices.
Reference Sources
Permalink to Reference Sources- Lean language (opens in new tab)
- Lean community and mathlib (opens in new tab)
- Rocq Prover (opens in new tab)
- Isabelle (opens in new tab)
- Microsoft Z3 Guide (opens in new tab)
- cvc5 project repository (opens in new tab)
- SMT-LIB (opens in new tab)
- TPTP problem library (opens in new tab)
- E-graphs good guide (opens in new tab)
- Equality saturation paper (opens in new tab)
- Software Foundations (opens in new tab)
- Theorem Proving in Lean 4 (opens in new tab)
- Certified Programming with Dependent Types (opens in new tab)
- The QED Manifesto (opens in new tab)
Related Compendium Threads
Permalink to Related Compendium Threads- Mathematics for proof culture and abstract structure.
- Type Theory for dependent types and constructive reasoning.
- Category Theory for structure-preserving maps and compositional semantics.
- Topology for formalized spaces, paths, continuity, compactness, and homology.
- Number Theory for arithmetic claims, cryptography, and formalized examples.
- Linear Algebra for exact algebraic statements and numerical proof boundaries.
- Rust for verified-adjacent systems implementation.
- Standards for protocol specifications and solver formats.
- Software Libraries for proof libraries, tactics, and formal verification tools.
- Professional Societies for conferences, proceedings, and formal-methods communities.