Sidekick_simplifyTerm simplifier
val tst : t -> Sidekick_core.Term.storeval create : Sidekick_core.Term.store -> proof:Sidekick_core.Proof_trace.t -> tCreate a simplifier
val clear : t -> unitReset internal cache, etc.
val proof : t -> Sidekick_core.Proof_trace.tAccess proof
type hook =
t ->
Sidekick_core.Term.t ->
(Sidekick_core.Term.t * Sidekick_core.Proof_step.id Iter.t) optionGiven a Term.t, try to simplify it. Return None if it didn't change.
A simple example could be a hook that takes a Term.t t, and if t is app "+" (const x) (const y) where x and y are number, returns Some (const (x+y)), and None otherwise.
The simplifier will take care of simplifying the resulting Term.t further, caching (so that work is not duplicated in subterms), etc.
val normalize :
t ->
Sidekick_core.Term.t ->
(Sidekick_core.Term.t * Sidekick_core.Proof_step.id) optionNormalize a Term.t using all the hooks. This performs a fixpoint, i.e. it only stops when no hook applies anywhere inside the Term.t.
val normalize_t :
t ->
Sidekick_core.Term.t ->
Sidekick_core.Term.t * Sidekick_core.Proof_step.id optionNormalize a Term.t using all the hooks, along with a proof that the simplification is correct. returns t, ø if no simplification occurred.