S.SMTLifts the semiring into SMT expressions via Smtml.
Two distinct abstract types, sym and exp, keep decision variables (symbols introduced by mk) separate from general expressions (which may be constants or compound terms). exp_of_s injects a symbol into the expression type when an expression is required.
The SMT logic that is sound and complete for this semiring. Used to instantiate the solver with the tightest possible theory, e.g. QF_BV for Boolean / bounded tropical (bitvector encoding), QF_LIA for tropical / bottleneck, QF_NIA for Nat / Rat / Prob.
eval model sym reads the value assigned to sym in a satisfying model and converts it back to a concrete semiring element.
val mk : Base.string -> sym * Smtml.Expr.t Base.listmk label allocates a fresh SMT decision variable named label and returns it together with any domain-restriction constraints required to keep the variable within the semiring's carrier set. For example, Nat's mk emits sym >= 0 (and sym <= bound when bounded); Rat's mk emits den > 0; Tropical/Bottleneck emit range guards for the sentinel infinity value.
SMT-level semiring addition: add e1 e2 returns an expression computing e1 ⊕ e2 symbolically.
SMT-level semiring multiplication: mul e1 e2 returns an expression computing e1 ⊗ e2 symbolically.
ge e1 e2 produces the SMT constraint e1 ≥ e2 in the order induced by the semiring (not used in the core encoding, available for auxiliary constraints).