Notation "{m[ x ]}" := (interm x).
Definition term_add (t1 t2 : term) :=
let (z1,l) := t1 in
let (z2,_) := t2 in ((z1 + z2)%Z, l).
Definition term_cmp (t1 t2 : term) :=
let (_,l1) := t1 in
let (_,l2) := t2 in list_compare _ natc l1 l2.

(* Specifications: *)
Lemma term_add_c t1 t2 :
match term_cmp t1 t2 with
| Eq => {m[term_add t1 t2]} = ({m[t1]} + {m[t2]})%f
| _ => True
end.