Notation "{v[ x ]}" := (interv x).Notation "{k[ x ]}" := (interk x).Notation "{c[ x ]}" := (interc x).(* We want to reduce expression *)
Inductive tuple := Tuple (_ _ _: tvar).(* We want to reduce expression *)
Inductive tuple := Tuple (_ _ _: tvar).Notation "{t[ x ]}" := (intert x).Notation "{l[ x ]}" := (interl x).Notation "{e[ x ]}" := (intere x).Notation "{e1[ x ]}" := (intere1 x).(* Sign *)
Inductive sign := Sm1 | S0 | S1.(* Sign *)
Inductive sign := Sm1 | S0 | S1.(* Sign *)
Inductive sign := Sm1 | S0 | S1.(* Sign *)
Inductive sign := Sm1 | S0 | S1.Definition sopp s := match s with Sm1 => S1 | S0 => S0 | S1 => Sm1 end.Definition smult s1 s2 := 
  match s1 with S0 => S0 | S1 => s2 | Sm1 => sopp s2 end.Definition smult3 s1 s2 s3 := 
  match s1 with S0 => S0 
 | S1 => smult s2 s3
 | Sm1 => sopp (smult s2 s3) end.(* Membership *)
Definition tin i (t : tuple) :=
  let (j1,j2,j3) := t in
  match tvcompare i j1 with Eq => true 
  | _ =>   match tvcompare i j2 with Eq => true 
  | _ =>   match tvcompare i j3 with Eq => true 
  | _ =>  false end end end.

(* Specifications: *)
Lemma tin_correct i1 i j k : if tin i1 (Tuple i j k) then i1=i \/ i1 = j \/ i1 = k else i1<>i /\ i1 <> j /\ i1 <> k.