pub struct EnvironmentCertificate {
pub schema: String,
pub prelude_version: String,
pub base: EnvironmentBase,
pub conversion: ConversionDiscipline,
pub nodes: Vec<TermNode>,
pub entries: Vec<EnvironmentEntry>,
pub target: String,
pub binder_kinds: BTreeMap<String, Vec<BinderKind>>,
}Expand description
A proof together with the complete environment it needs, rebuilt and re-checked from nothing but the declared base.
Fields§
§schema: StringENVIRONMENT_SCHEMA for original entry kinds, or OPAQUE_ENVIRONMENT_SCHEMA with opaque declarations.
prelude_version: StringThe prelude/kernel version this certificate was minted against.
base: EnvironmentBase§conversion: ConversionDiscipline§nodes: Vec<TermNode>The term table, children before parents.
entries: Vec<EnvironmentEntry>The declarations, in dependency order: every name an entry cites is the base’s or an earlier entry’s.
target: StringThe name of the definition or theorem this certificate proves.
binder_kinds: BTreeMap<String, Vec<BinderKind>>Source binder annotations of declarations’ leading telescopes, by name. Presentation metadata: it changes no judgement, and a reader of the LOGOS document is told which annotations the fully explicit kernel terms do not write.
Implementations§
Source§impl EnvironmentCertificate
impl EnvironmentCertificate
Sourcepub fn admitted_depth(
&self,
limits: &EnvironmentLimits,
) -> Result<usize, EnvironmentError>
pub fn admitted_depth( &self, limits: &EnvironmentLimits, ) -> Result<usize, EnvironmentError>
The deepest term in the certificate, after admission. A caller sizes the stack of the
thread that runs EnvironmentCertificate::rebuild from it.
Sourcepub fn rebuild(
&self,
limits: &EnvironmentLimits,
) -> Result<RebuiltEnvironment, EnvironmentError>
pub fn rebuild( &self, limits: &EnvironmentLimits, ) -> Result<RebuiltEnvironment, EnvironmentError>
Rebuild the environment from the declared base, kernel-checking every entry, and return the checked context with the target’s statement and proof.
Runs on the caller’s thread; a caller holding a deep certificate sizes that thread’s stack
with EnvironmentCertificate::admitted_depth and
crate::term_store::stack_bytes_for_depth first.
Source§impl EnvironmentCertificate
impl EnvironmentCertificate
Sourcepub fn capture(
request: &CaptureRequest<'_>,
) -> Result<EnvironmentCertificate, EnvironmentError>
pub fn capture( request: &CaptureRequest<'_>, ) -> Result<EnvironmentCertificate, EnvironmentError>
Capture the target’s complete dependency closure from a checked context, in dependency
order. Every captured declaration is exactly what the context checked; capture decides
nothing, and EnvironmentCertificate::rebuild re-decides everything.
Trait Implementations§
Source§impl Clone for EnvironmentCertificate
impl Clone for EnvironmentCertificate
Source§fn clone(&self) -> EnvironmentCertificate
fn clone(&self) -> EnvironmentCertificate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more