Module Monome.Focus
Focus on a specific term
val focus_term : 'a monome -> term -> 'a t optionFocus on the given term, if it is one of the members of the given monome.
val focus_term_exn : 'a monome -> term -> 'a tSame as
focus_term, but- raises Failure
 on failure
val coeff : 'a t -> 'aval term : 'a t -> termval rest : 'a t -> 'a monomeval sum : 'a t -> 'a monome -> 'a tval difference : 'a t -> 'a monome -> 'a tval uminus : 'a t -> 'a tval product : 'a t -> 'a -> 'a t- raises Invalid_argument
 if the number is 0
val map : ?term:(term -> term) -> ?coeff:('a -> 'a) -> ?rest:('a monome -> 'a monome) -> 'a t -> 'a tval scale : 'a t -> 'a t -> 'a t * 'a tScale to the same coefficient
val is_max : ord:Ordering.t -> _ t -> boolIs the focused term maximal in the monome?
val fold_m : pos:Position.t -> 'a monome -> 'b -> ('b -> 'a t -> Position.t -> 'b) -> 'bFold on terms of the given monome, focusing on them one by one, along with the position of the focused term
val apply_subst : Subst.Renaming.t -> Subst.t -> 'a t Scoped.t -> 'a tApply a substitution. This can modify the set of terms in
restbecause some of them may become equal to the focused term.
val unify_ff : ?subst:Unif_subst.t -> 'a t Scoped.t -> 'a t Scoped.t -> ('a t * 'a t * Unif_subst.t) Sequence.tUnify two focused monomes. All returned unifiers are unifiers of the focused terms, but maybe also of other unfocused terms; Focused monomes are modified by unification because several terms might merge with the focused term, so the new ones are returned with the unifier itself
val unify_mm : ?subst:Unif_subst.t -> 'a monome Scoped.t -> 'a monome Scoped.t -> ('a t * 'a t * Unif_subst.t) Sequence.tUnify parts of two monomes
m1andm2. For each such unifier we return the versions ofm1andm2where the unified terms are focused.
val unify_self : ?subst:Unif_subst.t -> 'a t Scoped.t -> ('a t * Unif_subst.t) Sequence.tExtend the substitution to other terms within the focused monome, if possible. For instance it might return
2f(x)+a, {x=y}for the monomef(x)+f(y)+awheref(x)is focused.
val unify_self_monome : ?subst:Unif_subst.t -> 'a monome Scoped.t -> ('a t * Unif_subst.t) Sequence.tUnify at least two terms of the monome together
val pp : _ t CCFormat.printer