pub struct TheoremCertificate {
pub theorem: String,
pub proof_term: Term,
pub claimed_type: Term,
pub declarations: Vec<CertDeclaration>,
pub definitions: Vec<CertDefinition>,
pub prelude_version: String,
}Expand description
A self-contained, re-checkable certificate for a theorem proved FROM premises.
proof_term is claimed to have type claimed_type in the standard prelude
EXTENDED by the disclosed declarations (assumptions) and definitions
(transparent). The re-checker rebuilds the prelude itself and replays only this
disclosed delta, then type-checks — it never trusts, or even sees, how the proof
was found.
Fields§
§theorem: StringThe theorem’s identity (its ## Theorem: Name), for provenance in reports.
proof_term: TermThe proof (a lambda-calculus term).
claimed_type: TermThe proposition the proof claims to establish (a type) — the theorem’s goal.
declarations: Vec<CertDeclaration>The disclosed premise hypotheses + declared vocabulary the proof assumes. Every assumption the theorem rests on is enumerated here, in the open.
definitions: Vec<CertDefinition>The disclosed transparent definitions the proof unfolds.
prelude_version: StringThe axiom-set version this certificate was produced against.
Implementations§
Source§impl TheoremCertificate
impl TheoremCertificate
Sourcepub fn axioms_used(&self) -> AxiomUsage
pub fn axioms_used(&self) -> AxiomUsage
The axioms this certificate’s proof actually rests on, re-computed against the trusted base it would be re-checked in — NOT against whatever the minting side chose to disclose.
Over the proof term AND the claimed goal, for the same reason Certificate::axioms_used
is: the statement is half of what a certificate asserts, and an assumption it names is one
the reader is being asked to accept. A report that walked only the proof term would say a
theorem ABOUT Classical_choice rests on nothing, and axiom_dependencies_of — the door
the REPL comes in by — already answers the same question the other way, so the two doors
would disagree about one graph.
Source§impl TheoremCertificate
impl TheoremCertificate
Sourcepub fn new(
theorem: impl Into<String>,
proof_term: Term,
claimed_type: Term,
declarations: Vec<CertDeclaration>,
definitions: Vec<CertDefinition>,
) -> Self
pub fn new( theorem: impl Into<String>, proof_term: Term, claimed_type: Term, declarations: Vec<CertDeclaration>, definitions: Vec<CertDefinition>, ) -> Self
Bundle a proof term, its goal, and the disclosed environment delta.
Trait Implementations§
Source§impl Clone for TheoremCertificate
impl Clone for TheoremCertificate
Source§fn clone(&self) -> TheoremCertificate
fn clone(&self) -> TheoremCertificate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more