Module Logtk.Skolem
Skolem symbols
type type_= TypedSTerm.ttype term= TypedSTerm.ttype form= TypedSTerm.ttype ctxContext needed to create new symbols
val create : ?prefix:string -> ?prop_prefix:string -> ?on_new:(ID.t -> type_ -> unit) -> unit -> ctxNew skolem contex. A prefix can be provided, which will be added to all newly created skolem symbols.
- parameter prefix
used to name skolem functions/constants
- parameter prop_prefix
used to name sub-formulas during CNF
- parameter on_id
function called whenever a Skolem symbol is created
val fresh_skolem : ctx:ctx -> ty:type_ -> vars_count:int -> ID.tJust obtain a fresh skolem symbol. It is also declared in the inner signature.
val fresh_skolem_prefix : ctx:ctx -> ty:type_ -> vars_count:int -> string -> ID.tFresh symbol with a different name
val pop_new_skolem_symbols : ctx:ctx -> (ID.t * type_) listRemove and return the list of newly created Skolem symbols
val counter : ctx -> intMonotonic counter, increased at every definition
Skolemization
val skolem_form : ctx:ctx -> (type_, term) Var.Subst.t -> type_ Var.t -> form -> termskolem_form ~ctx subst var freturns a termtmade of a new symbol applied to the free variables offthat do not occur insubst. This term should replace the variablevar, occurring free inf.For instance,
skolem_form ~ctx ø Y p(a, b, Y, X)will yield something likesk42(X).
Definitions of Formulas
val pp_polarity : polarity CCFormat.printer
type form_definition= private{form : form;proxy_id : ID.t;proxy : term;proxy_ty : type_;rw_rules : bool;polarity : polarity;proof : Proof.step;as_stmt : Statement.input_t list lazy_t;}
val pp_form_definition : form_definition CCFormat.printerval define_form : ?pattern:string -> ctx:ctx -> rw_rules:bool -> polarity:polarity -> parents:Proof.Parent.t list -> form -> form_definitiondefine ~ctx freturns a new predicate forf, with the free variables offas arguments.- returns
the atomic formula that stands for
f.
type term_definition= private{td_id : ID.t;td_ty : type_;td_rules : (form, term, type_) Statement.def_rule list;td_as_def : (form, term, type_) Statement.def;td_proof : Proof.step;td_stmt : Statement.input_t list lazy_t;}
val define_term : ?pattern:string -> ctx:ctx -> parents:Proof.Parent.t list -> (term list * term) list -> term_definitiondefine_term lintroduces a new function symbolfthat is defined by:- for each
args, rhsinl,f args = rhs
- parameter pattern
used to name the new function in an informative way
- for each
type definition=|Def_form of form_definition|Def_term of term_definition
val pp_definition : definition CCFormat.printerval new_definitions : ctx:ctx -> definition listReturn the new definitions, without side effects
val pop_new_definitions : ctx:ctx -> definition listList of new definitions, that were introduced since the last call to
new_definitions. The list can be obtained only once, after which those definitions are not "new" anymore.Will call
remove_defso there is no risk of re-using a definition with a new polarity.
val def_as_stmt : definition -> Statement.input_t listProject the definition into a list of statements