pub enum ProofExpr {
Show 22 variants
Predicate {
name: String,
args: Vec<ProofTerm>,
world: Option<String>,
},
Identity(ProofTerm, ProofTerm),
Atom(String),
And(Box<ProofExpr>, Box<ProofExpr>),
Or(Box<ProofExpr>, Box<ProofExpr>),
Implies(Box<ProofExpr>, Box<ProofExpr>),
Iff(Box<ProofExpr>, Box<ProofExpr>),
Not(Box<ProofExpr>),
ForAll {
variable: String,
body: Box<ProofExpr>,
},
Exists {
variable: String,
body: Box<ProofExpr>,
},
Modal {
domain: String,
force: f32,
flavor: String,
body: Box<ProofExpr>,
},
Temporal {
operator: String,
body: Box<ProofExpr>,
},
Lambda {
variable: String,
body: Box<ProofExpr>,
},
App(Box<ProofExpr>, Box<ProofExpr>),
NeoEvent {
event_var: String,
verb: String,
roles: Vec<(String, ProofTerm)>,
},
Ctor {
name: String,
args: Vec<ProofExpr>,
},
Match {
scrutinee: Box<ProofExpr>,
arms: Vec<MatchArm>,
},
Fixpoint {
name: String,
body: Box<ProofExpr>,
},
TypedVar {
name: String,
typename: String,
},
Hole(String),
Term(ProofTerm),
Unsupported(String),
}Expand description
Owned expression representation for proof manipulation.
Supports all LogicExpr variants to enable full language coverage.
This is the “proposition” side of the Curry-Howard correspondence.
§See Also
ProofTerm- Terms embedded within expressions (predicate arguments)unify::unify_exprs- Expression-level unification with alpha-equivalenceunify::beta_reduce- Normalizes lambda applicationscertifier::certify- Converts expressions to kernel typesDerivationTree- Proof trees conclude with aProofExpr
Variants§
Predicate
Atomic predicate: P(t1, t2, …)
Identity(ProofTerm, ProofTerm)
Identity: t1 = t2
Atom(String)
Propositional atom
And(Box<ProofExpr>, Box<ProofExpr>)
Conjunction: P ∧ Q
Or(Box<ProofExpr>, Box<ProofExpr>)
Disjunction: P ∨ Q
Implies(Box<ProofExpr>, Box<ProofExpr>)
Implication: P → Q
Iff(Box<ProofExpr>, Box<ProofExpr>)
Biconditional: P ↔ Q
Not(Box<ProofExpr>)
Negation: ¬P
ForAll
Universal quantification: ∀x P(x)
Exists
Existential quantification: ∃x P(x)
Modal
Modal operator: □P or ◇P (with world semantics)
Temporal
Temporal operator: Past(P) or Future(P)
Lambda
Lambda abstraction: λx.P
App(Box<ProofExpr>, Box<ProofExpr>)
Function application: (f x)
NeoEvent
Neo-Davidsonian event: ∃e(Verb(e) ∧ Agent(e,x) ∧ …)
Ctor
Data Constructor: Zero, Succ(n), Cons(h, t), etc. The building blocks of inductive types.
Match
Pattern Matching: match n { Zero => A, Succ(k) => B } Eliminates inductive types by case analysis.
Fixpoint
Recursive Function (Fixpoint): fix f. λn. … Defines recursive functions over inductive types.
TypedVar
Typed Variable: n : Nat Signals to the prover that induction may be applicable.
Hole(String)
Meta-variable (unification hole) to be solved during proof search. Represents an unknown expression, typically a function or predicate. Example: Hole(“P”) in ?P(x) = Body, to be solved as P = λx.Body
Term(ProofTerm)
Embedded term (lifts ProofTerm into ProofExpr context). Used when a term appears where an expression is expected. Example: App(Hole(“P”), Term(BoundVarRef(“x”)))
Unsupported(String)
Unsupported construct (with description for debugging)