let rec add ai1 ai2 = match ai1, ai2 with
      | AIcnst i1, _ -> add_cnst ai2 i1
      | _, AIcnst i2 -> add_cnst ai1 i2
      | AIadd (t1, i1), AIadd (t2, i2) when compute ->
          add_cnst (add t1 t2) (Int64.add i1 i2)
      | _, _ -> (* TODO: develop other cases ? *)
          let t1 = to_term ai1 in
          let t2 = to_term ai2 in
            AIterm (term_of_add t1 t2)