let mk_num =
let table = Mpa.Q.Hash.create 53 in
let _ = Tools.add_at_reset (fun () -> Mpa.Q.Hash.clear table) in
fun q ->
try
Mpa.Q.Hash.find table q
with
Not_found ->
let c = Term.App.mk_const (Sym.Arith.mk_num q) in
Mpa.Q.Hash.add table q c; c