Module Logtk.Literal
Literals
type term= Term.ttype t= private|True|False|Equation of term * term * bool|Int of Int_lit.t|Rat of Rat_lit.ta literal, that is, a signed atomic formula
val hash : t -> inthashing of literal
val weight : t -> intweight of the lit (sum of weights of terms)
val ho_weight : t -> intweight of the lit (sum of weights of terms)
ho weight of the lit (sum of weights of terms, ignoring applied variables and lambda prefixes
val heuristic_weight : (term -> int) -> t -> intho weight of the lit (sum of weights of terms, ignoring applied variables and lambda prefixes
heuristic difficulty to eliminate lit
val depth : t -> intdepth of literal
val is_pos : t -> boolis the literal positive?
val is_neg : t -> boolis the literal negative?
val is_eqn : t -> boolis the literal a proper (in)equation or prop?
val is_prop : t -> boolis the literal a boolean proposition?
val is_eq : t -> boolis the literal of the form a = b?
val is_neq : t -> boolis the literal of the form a != b?
val is_essentially_prop : t -> boolis the literal of the form a != b?
is the literal non-equational literal of type Prop
val is_arith_less : t -> boolval is_arith_lesseq : t -> boolval is_arith_divides : t -> boolval is_rat : t -> boolval is_rat_eq : t -> boolval is_rat_less : t -> boolval mk_eq : term -> term -> tbuild literals. If sides so not have the same sort, a SortError will be raised. An ordering must be provided
val mk_neq : term -> term -> tval mk_lit : term -> term -> bool -> tval mk_prop : term -> bool -> tproposition
val mk_tauto : ttautological literal
val mk_absurd : tabsurd literal, like ~ true
val mk_arith : Int_lit.t -> tval mk_arith_op : Int_lit.op -> Z.t Monome.t -> Z.t Monome.t -> tval mk_arith_eq : Z.t Monome.t -> Z.t Monome.t -> tval mk_arith_neq : Z.t Monome.t -> Z.t Monome.t -> tval mk_arith_less : Z.t Monome.t -> Z.t Monome.t -> tval mk_arith_lesseq : Z.t Monome.t -> Z.t Monome.t -> tval mk_divides : ?sign:bool -> Z.t -> power:int -> Z.t Monome.t -> tval mk_not_divides : Z.t -> power:int -> Z.t Monome.t -> tval mk_rat : Rat_lit.t -> tval mk_rat_op : Rat_lit.op -> Q.t Monome.t -> Q.t Monome.t -> tval mk_rat_eq : Q.t Monome.t -> Q.t Monome.t -> tval mk_rat_less : Q.t Monome.t -> Q.t Monome.t -> tval no_prop_invariant : t -> boolval mk_constraint : term -> term -> tmk_constraint t umakes a disequation or a HO constraint depending on howtandulook.
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, yieldssubstsuch thatsubst(lit_a) => lit_b.
val variant : ?subst:Subst.t -> t Scoped.t -> t Scoped.t -> (Subst.t * Builtin.Tag.t list) Iter.tval unify : ?subst:Unif_subst.t -> t Scoped.t -> t Scoped.t -> (Unif_subst.t * Builtin.Tag.t list) Iter.tval are_variant : t -> t -> boolval apply_subst : Subst.Renaming.t -> Subst.t -> t Scoped.t -> tval apply_subst_no_simp : Subst.Renaming.t -> Subst.t -> t Scoped.t -> tval apply_subst_list : Subst.Renaming.t -> Subst.t -> t list Scoped.t -> t list
val is_constraint : t -> boolIs the literal a constraint?
val is_ho_constraint : t -> boolval of_unif_subst : Subst.Renaming.t -> Unif_subst.t -> t listMake a list of (negative) literals out of the unification constraints contained in this substitution.
val var_occurs : Type.t HVar.t -> t -> boolval is_ground : t -> boolval symbols : ?include_types:bool -> t -> Logtk.ID.Set.tval root_terms : t -> term listall the terms immediatly under the lit
val as_ho_predicate : t -> (Term.var * term * term list * bool) optionView on literals
F t1…tnand¬ (F t1…tn)
val is_ho_predicate : t -> boolDoes
as_ho_predicatereturn Some?
Basic semantic checks
val is_trivial : t -> boolval is_absurd : t -> boolval is_absurd_tags : t -> Proof.tag listif
is_absurd lit, return why
val is_app_var_eq : t -> boolif
is_absurd lit, return why
val is_type_pred : t -> boolval is_typex_pred : t -> boolval is_propositional : t -> boolval as_inj_def : t -> (ID.t * (Term.var * Term.var) list) optionval is_pure_var : t -> boolval as_pos_pure_var : t -> (Term.var * Term.var) optionval 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
varsisfalse.varsdecides whether variables are iterated on too (defaultfalse)var_argsdecides whether arguments of applied variables are iterated on toofun_bodiesdecides whether bodies of lambda-expressions are iterated on tooty_argsdecides whether type arguments are iterated on toosubtermsdecides whether strict subterms, not only terms that occur directly under the literal, are explored.whichis used to decide which terms to visit:- if
whichis`Max, only the maximal terms are explored - if
whichis`All, all root terms are explored
- if
module Comp : sig ... end
module Seq : sig ... endmodule Pos : sig ... end
val replace : t -> old:term -> by:term -> treplace lit ~old ~bysyntactically replaces all occurrences ofoldinlitby the termby.
module View : sig ... end
module Conv : sig ... end
IO
type print_hook= CCFormat.t -> t -> boolmight print the literal on the given buffer.
- returns
true if it printed, false otherwise
val add_default_hook : print_hook -> unitval pp_debug : ?hooks:print_hook list -> t CCFormat.printerval pp : t CCFormat.printerval pp_zf : t CCFormat.printerval pp_tstp : t CCFormat.printerval to_string : t -> string