let mult ai1 ai2 = match ai1, ai2 with
| AIcnst i1, _ -> cnst_mult i1 ai2
| _, AIcnst i2 -> cnst_mult i2 ai1
| AImult (i1, t1), AImult (i2, t2) when compute ->
cnst_mult (Int64.mul i1 i2) (AIterm (term_of_mult t1 t2))
| _, _ -> (* TODO: develop other cases ? *)
let t1 = to_term ai1 in
let t2 = to_term ai2 in
AIterm (term_of_mult t1 t2)