Logtk.LiteralSourceLiterals are the representation of atomic formulas in the clausal world of resolution/superposition provers.
A literal is an atomic formula (equality or predicate), paired with a sign that carries negation.
We also have special arithmetic literals that have the intuitive meaning, see Int_lit and Rat_lit for more details.
a literal, that is, a signed atomic formula
include Interfaces.HASH with type t := tweight of the lit (sum of weights of terms)
ho weight of the lit (sum of weights of terms, ignoring applied variables and lambda prefixes
ho weight of the lit (sum of weights of terms, ignoring applied variables and lambda prefixes
heuristic difficulty to eliminate lit
is the literal of the form a != b?
is the literal non-equational literal of type Prop
build literals. If sides so not have the same sort, a SortError will be raised. An ordering must be provided
mk_constraint t u makes a disequation or a HO constraint depending on how t and u look.
val matching :
?subst:Subst.t ->
pattern:t Scoped.t ->
t Scoped.t ->
(Subst.t * Builtin.Tag.t list) Iter.tchecks whether subst(lit_a) matches lit_b. Returns alternative substitutions s such that s(lit_a) = lit_b and s contains subst.
val subsumes :
?subst:Subst.t ->
t Scoped.t ->
t Scoped.t ->
(Subst.t * Builtin.Tag.t list) Iter.tMore general version of matching, yields subst such that subst(lit_a) => lit_b.
val unify :
?subst:Unif_subst.t ->
t Scoped.t ->
t Scoped.t ->
(Unif_subst.t * Builtin.Tag.t list) Iter.tMake a list of (negative) literals out of the unification constraints contained in this substitution.
View on literals F t1…tn and ¬ (F t1…tn)
Does as_ho_predicate return Some?
val fold_terms :
?position:Position.t ->
?vars:bool ->
?var_args:bool ->
?fun_bodies:bool ->
?ty_args:bool ->
which:[< `Max | `All ] ->
?ord:Ordering.t ->
subterms:bool ->
t ->
term Position.With.t Iter.tIterate on terms, maybe subterms, of the literal. Variables are ignored if vars is false.
vars decides whether variables are iterated on too (default false) var_args decides whether arguments of applied variables are iterated on too fun_bodies decides whether bodies of lambda-expressions are iterated on too ty_args decides whether type arguments are iterated on too subterms decides whether strict subterms, not only terms that occur directly under the literal, are explored.
which is used to decide which terms to visit:
which is `Max, only the maximal terms are exploredwhich is `All, all root terms are exploredreplace lit ~old ~by syntactically replaces all occurrences of old in lit by the term by.
might print the literal on the given buffer.