(* Add an element in a tuple  i1 [? i2 i3] *)
Definition mk_tuplel i1 i2 i3 :=
match tvcompare i1 i2 with
| Eq => (S0, Tuple i1 i2 i3)
| Lt => (S1, Tuple i1 i2 i3)
| Gt =>
match tvcompare i1 i3 with
| Eq => ( S0, Tuple i1 i2 i3)
| Lt => (Sm1, Tuple i2 i1 i3)
| Gt => ( S1, Tuple i2 i3 i1)
end
end.

(* Specifications: *)
Lemma mk_tuplel_c i1 i2 i3 :
let (s,t1) := mk_tuplel i1 i2 i3 in
{t[Tuple i1 i2 i3]} = (s2k s * {t[t1]})%f.