pub struct ProofCertificate {
pub id: ProofCertId,
pub decl_name: String,
pub type_hash: u64,
pub proof_hash: u64,
pub reduction_steps: Vec<ProofStep>,
pub verified_at: u64,
}Expand description
A compact verification record for a single declaration.
Certificates record the structural hashes of the type and proof term, together with the sequence of reduction steps performed during kernel type-checking. They can be stored externally and replayed cheaply via hash verification.
Fields§
§id: ProofCertIdUnique certificate identifier (derived from content at creation time).
decl_name: StringName of the declaration this certificate vouches for.
type_hash: u64FNV-1a structural hash of the declaration’s type expression.
proof_hash: u64FNV-1a structural hash of the proof term expression.
reduction_steps: Vec<ProofStep>Ordered sequence of reduction steps taken during type-checking.
verified_at: u64Unix timestamp (seconds) at which the certificate was created.
Implementations§
Source§impl ProofCertificate
impl ProofCertificate
Sourcepub fn step_count(&self) -> usize
pub fn step_count(&self) -> usize
Return the number of reduction steps recorded.
Sourcepub fn is_trivial(&self) -> bool
pub fn is_trivial(&self) -> bool
Return true if this certificate records no reduction steps.
Trait Implementations§
Source§impl Clone for ProofCertificate
impl Clone for ProofCertificate
Source§fn clone(&self) -> ProofCertificate
fn clone(&self) -> ProofCertificate
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProofCertificate
impl Debug for ProofCertificate
Source§impl Display for ProofCertificate
impl Display for ProofCertificate
Source§impl PartialEq for ProofCertificate
impl PartialEq for ProofCertificate
impl Eq for ProofCertificate
impl StructuralPartialEq for ProofCertificate
Auto Trait Implementations§
impl Freeze for ProofCertificate
impl RefUnwindSafe for ProofCertificate
impl Send for ProofCertificate
impl Sync for ProofCertificate
impl Unpin for ProofCertificate
impl UnsafeUnpin for ProofCertificate
impl UnwindSafe for ProofCertificate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more