Function identify_lines (ss : SS.t) (sp : SP.t) {measure SS.cardinal ss}
                        : SS.t :=
  let lines := pick_lines ss sp in
    match lines with
      |None => ss
      |Some (s1,s2) => let auxsetofsets := SS.remove s2 (SS.remove s1 ss) in
                       let auxset := S.union s1 s2 in
                       let newss := SS.add auxset auxsetofsets in
                         identify_lines newss sp
    end.Definition test_col (ss : SS.t) (sp : SP.t) p1 p2 p3 : bool :=
  let newss := identify_lines ss sp  in
    SS.exists_ (fun s => S.mem p1 s && S.mem p2 s && S.mem p3 s) newss.

(* Specifications: *)
Lemma CTcol_permutation_5 : forall A B C : COLTpoint, CTCol A B C -> CTCol A C B.
Lemma CTcol_permutation_2 : forall A B C : COLTpoint, CTCol A B C -> CTCol C A B.
Lemma CTcol_permutation_3 : forall A B C : COLTpoint, CTCol A B C -> CTCol C B A.
Lemma CTcol_permutation_4 : forall A B C : COLTpoint, CTCol A B C -> CTCol B A C.
Lemma CTcol_trivial_1 : forall A B : COLTpoint, CTCol A A B.
Lemma CTcol_trivial_2 : forall A B : COLTpoint, CTCol A B B.