type number = [ `NCst of num (** numeric constant *) | `Ninf (** positive infinity *) | `Neginf (** negative infinity *) ] type variable = [ `EVar of string (** (existential) variable *) | `UVar of string (** constant (universal variable) *) ] type num_coef = [ `Mult of num * variable (** constant coefficient *) ] type numeric = [ number | num_coef | `Add of num_coef list * number (** linear combination *) ] ;; type construct = [ `TCons of string * typ list | `Fun of proper_typ * proper_typ ] and proper_typ = [variable | construct] and typ = [proper_typ | numeric] ;;