proposition: Lemma proper_3 : Proper (S.Equal ==> SS.Equal ==> eq ==> eqopp) pick_varieties_aux.
proof: Proof. intros x1 y1 HXY1. intros x2 y2 HXY2. intros x3 y3 HXY3. unfold pick_varieties_aux. rewrite HXY3. assert (eqop (exists_witness (fun s2 : SS.elt => pick_variety (S.inter x1 s2) y3) x2) (exists_witness (fun s2 : SS.elt => pick_variety (S.inter y1 s2) y3) y2)). apply proper_2. apply proper_1. apply proper_1. intro; apply proper_0; try reflexivity. apply SWP.inter_equal_1; assumption. assumption. case_eq (exists_witness (fun s2 : SS.elt => pick_variety (S.inter y1 s2) y3) y2); case_eq (exists_witness (fun s2 : SS.elt => pick_variety (S.inter x1 s2) y3) x2). simpl; intuition. intros HCN e HCS. simpl in *. rewrite HCS in H; rewrite HCN in H. simpl in *. intuition. intros e HCS HCN. simpl in *. rewrite HCS in H; rewrite HCN in H. simpl in *. intuition. intuition. Qed.
imports: Recdef NArith Sorting GeoCoq.Tactics.Coinc.Permutations GeoCoq.Utils.general_tactics GeoCoq.Utils.sets