pub struct TheoremCompileResult {
pub name: String,
pub premises: Vec<ProofExpr>,
pub goal: Option<ProofExpr>,
pub goal_string: Option<String>,
pub derivation: Option<DerivationTree>,
pub verified: bool,
pub verification_error: Option<String>,
pub answer: Option<Vec<String>>,
pub grid: Option<SolvedGrid>,
pub error: Option<String>,
pub discharged: usize,
}Expand description
Result of compiling and verifying a theorem block.
Contains the parsed theorem structure (name, premises, goal) along with the proof derivation tree if automatic proof search succeeded.
Fields§
§name: StringThe theorem’s declared name.
premises: Vec<ProofExpr>Compiled premise expressions (axioms).
goal: Option<ProofExpr>The goal expression to prove, or None on parse error.
goal_string: Option<String>Simplified FOL string of the goal for display.
derivation: Option<DerivationTree>Derivation tree from backward chaining, if proof found.
verified: boolTrue iff the derivation was certified AND kernel type-checked.
A derivation alone (derivation.is_some()) never implies this.
verification_error: Option<String>Where verification broke (certification or type-check), if it did.
answer: Option<Vec<String>>For a wh-question goal (“Who is in Florida?”), the certified witness(es); None
when the goal is a closed proposition.
grid: Option<SolvedGrid>For a recognized finite-domain grid, the cells the certified prover could fill — attached whenever the premises take the grid form, no flag required.
error: Option<String>Error message if compilation or proof failed.
discharged: usizeHow many obligations the DECLARED method left open and the automation closed.
0 means the author’s own proof was complete — and also that there was no proof at
all: a count is a fact about a certificate, so an unverified theorem reports 0, exactly
as the prose door annotates only its certified arm. The TEXT door
(logicaffeine_language::compile_theorem) has always said this in prose — “Proved!
[kernel-verified] (2 residual obligations discharged by automation)” — and this door
silently dropped it, so two Surface A doors reported the same verified: true with
different amounts of disclosure. A Proof: line that declares a METHOD and closes
nothing (By induction on n. on a goal needing no induction) reaches verified: true
here, and this is the field that says the machine, not the author, did the work.
It is disclosure, never trust: every swept obligation is assembled into the SAME
derivation and certified through qed → check_derivation → the kernel, so
verified means exactly what it meant before.
Trait Implementations§
Source§impl Clone for TheoremCompileResult
impl Clone for TheoremCompileResult
Source§fn clone(&self) -> TheoremCompileResult
fn clone(&self) -> TheoremCompileResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for TheoremCompileResult
impl RefUnwindSafe for TheoremCompileResult
impl Send for TheoremCompileResult
impl Sync for TheoremCompileResult
impl Unpin for TheoremCompileResult
impl UnsafeUnpin for TheoremCompileResult
impl UnwindSafe for TheoremCompileResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.