(* Add an element in a tuple  [i1 i2 ?] i3 *)
Definition mk_tupler i1 i2 i3 :=
match tvcompare i2 i3 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 i1 i3 i2)
| Gt => ( S1, Tuple i3 i1 i2)
end
end.

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