let mk_num =
let table = Mpa.Q.Hash.create 17 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 = (Arith(Num(q)), genidx()) in
Mpa.Q.Hash.add table q c; c