pub enum Term<'a> {
Constant(Symbol),
Variable(Symbol),
Function(Symbol, &'a [Term<'a>]),
Group(&'a [Term<'a>]),
Possessed {
possessor: &'a Term<'a>,
possessed: Symbol,
},
Sigma(Symbol),
Intension(Symbol),
Proposition(&'a LogicExpr<'a>),
Value {
kind: NumberKind,
unit: Option<Symbol>,
dimension: Option<Dimension>,
},
}Expand description
First-order logic term representing entities or values.
Terms denote individuals, groups, or computed values in the domain of discourse. They serve as arguments to predicates.
Variants§
Constant(Symbol)
Named individual constant (e.g., john, paris).
Variable(Symbol)
Bound or free variable (e.g., x, y).
Function(Symbol, &'a [Term<'a>])
Function application: f(t1, t2, ...) (e.g., mother(john)).
Group(&'a [Term<'a>])
Plural group for collective readings (e.g., john ⊕ mary).
Possessed
Possessive construction: john's book → Poss(john, book).
Sigma(Symbol)
Definite description σ-term: σx.P(x) (“the unique x such that P”).
Intension(Symbol)
Intensional term (Montague up-arrow ^P) for de dicto readings.
Proposition(&'a LogicExpr<'a>)
Sentential complement (embedded clause as propositional argument).
Value
Numeric value with optional unit and dimension.
Implementations§
Source§impl<'a> Term<'a>
impl<'a> Term<'a>
Sourcepub fn write_to<W: Write>(
&self,
w: &mut W,
registry: &mut SymbolRegistry,
interner: &Interner,
) -> Result
pub fn write_to<W: Write>( &self, w: &mut W, registry: &mut SymbolRegistry, interner: &Interner, ) -> Result
Writes the term to a writer using abbreviated symbols.
Sourcepub fn write_to_full<W: Write>(
&self,
w: &mut W,
registry: &mut SymbolRegistry,
interner: &Interner,
) -> Result
pub fn write_to_full<W: Write>( &self, w: &mut W, registry: &mut SymbolRegistry, interner: &Interner, ) -> Result
Writes the term to a writer using full (unabbreviated) symbols.
Sourcepub fn write_to_raw<W: Write>(&self, w: &mut W, interner: &Interner) -> Result
pub fn write_to_raw<W: Write>(&self, w: &mut W, interner: &Interner) -> Result
Writes the term preserving original case (for code generation).
Sourcepub fn transpile(
&self,
registry: &mut SymbolRegistry,
interner: &Interner,
) -> String
pub fn transpile( &self, registry: &mut SymbolRegistry, interner: &Interner, ) -> String
Transpiles the term to a logic formula string.