Ltac not_exist_hyp_perm_par A B C D := not_exist_hyp (Par A B C D); not_exist_hyp (Par A B D C);
                                       not_exist_hyp (Par B A C D); not_exist_hyp (Par B A D C);
                                       not_exist_hyp (Par C D A B); not_exist_hyp (Par C D B A);
                                       not_exist_hyp (Par D C A B); not_exist_hyp (Par D C B A).Ltac not_exist_hyp_perm_pars A B C D := not_exist_hyp (Par_strict A B C D); not_exist_hyp (Par_strict A B D C);
                                        not_exist_hyp (Par_strict B A C D); not_exist_hyp (Par_strict B A D C);
                                        not_exist_hyp (Par_strict C D A B); not_exist_hyp (Par_strict C D B A);
                                        not_exist_hyp (Par_strict D C A B); not_exist_hyp (Par_strict D C B A).Ltac assert_pars_1 :=
 repeat
 match goal with
      | H:Par_strict ?X1 ?X2 ?X3 ?X4 |- _ =>
      let h := fresh in
      not_exist_hyp_perm_par X1 X2 X3 X4;
      assert (h := par_strict_par X1 X2 X3 X4 H)

      | H:Par ?X1 ?X2 ?X3 ?X4, H2:Col ?X1 ?X2 ?X5, H3:(~Col ?X3 ?X4 ?X5) |- _ =>
      let h := fresh in
      not_exist_hyp_perm_pars X1 X2 X3 X4;
      assert (h := par_not_col_strict X1 X2 X3 X4 X5 H H2 H3)

      | H: ?X1 <> ?X2, H2:?X2 <> ?X3, H3:Parallelogram ?X1 ?X2 ?X3 ?X4 |- _ =>
      let h := fresh in
      not_exist_hyp_perm_par X1 X2 X3 X4;
      assert (h := plg_par_1 X1 X2 X3 X4 H H2 H3)

      | H:Parallelogram_strict ?X1 ?X2 ?X3 ?X4 |- _ =>
      let h := fresh in
      not_exist_hyp_perm_pars X1 X2 X3 X4;
      assert (h := plgs_pars_1 X1 X2 X3 X4 H)
  end.Ltac assert_pars_2 :=
 repeat
 match goal with
      | H: ?X1 <> ?X2, H2:?X2 <> ?X3, H3:Parallelogram ?X1 ?X2 ?X3 ?X4 |- _ =>
      let h := fresh in
      not_exist_hyp_perm_par X1 X4 X2 X3;
      assert (h := plg_par_2 X1 X2 X3 X4 H H2 H3)

      | H:Parallelogram_strict ?X1 ?X2 ?X3 ?X4 |- _ =>
      let h := fresh in
      not_exist_hyp_perm_pars X1 X4 X2 X3;
      assert (h := plgs_pars_2 X1 X2 X3 X4 H)
  end.Ltac assert_pars_perm := permutation_intro_in_hyps; assert_pars_1; assert_pars_2; clean_reap_hyps.

(* Specifications: *)
Lemma par_cong_cong : forall A B C D, Par A B C D -> Cong A B C D -> Cong A C B D \/ Cong A D B C.
Lemma col_cong_cong : forall A B C D, Col A B C -> Col A B D -> Cong A B C D -> Cong A C B D \/ Cong A D B C.
Lemma par_cong_cop : forall A B C D, Par A B C D -> Cong A B C D -> Coplanar A B C D.
Lemma par_cong_plg : forall A B C D, Par A B C D -> Cong A B C D -> Plg A B C D \/ Plg A B D C.
Lemma par_cong_plg_2 : forall A B C D, Par A B C D -> Cong A B C D -> Parallelogram A B C D \/ Parallelogram A B D C.
Lemma par_cong3_rect : forall A B C D, A <> C \/ B <> D -> Par A B C D -> Cong A B C D -> Cong A D B C -> Cong A C B D -> Rectangle A B C D \/ Rectangle A B D C.
Lemma pars_par_pars : forall A B C D, Par_strict A B C D -> Par A D B C -> Par_strict A D B C.
Lemma pars_par_plg : forall A B C D, Par_strict A B C D -> Par A D B C -> Plg A B C D.
Lemma not_par_pars_not_cong : forall O A B A' B', Out O A B -> Out O A' B' -> Par_strict A A' B B' -> ~Cong A A' B B'.
Lemma plg_uniqueness : forall A B C D D', Parallelogram A B C D -> Parallelogram A B C D' -> D = D'.
Lemma plgs_trans_trivial : forall A B C D B', Parallelogram_strict A B C D -> Parallelogram_strict C D A B' -> Parallelogram A B B' A.
Lemma par_strict_trans : forall A B C D E F, Par_strict A B C D -> Par_strict C D E F -> Par A B E F.
Lemma plgs_pseudo_trans : forall A B C D E F, Parallelogram_strict A B C D -> Parallelogram_strict C D E F -> Parallelogram A B F E.
Lemma plgf_plgs_trans : forall A B C D E F, A <> B -> Parallelogram_flat A B C D -> Parallelogram_strict C D E F -> Parallelogram_strict A B F E.
Lemma plgf_plgf_plgf: forall A B C D E F, A <> B -> Parallelogram_flat A B C D -> Parallelogram_flat C D E F -> Parallelogram_flat A B F E.
Lemma plg_pseudo_trans : forall A B C D E F, Parallelogram A B C D -> Parallelogram C D E F -> Parallelogram A B F E \/ (A = B /\ C = D /\ E = F /\ A = E).
Lemma Square_Rhombus : forall A B C D, Square A B C D -> Rhombus A B C D.
Lemma plgs_in_angle : forall A B C D, Parallelogram_strict A B C D -> InAngle D A B C.
Lemma par_par_cong_cong_parallelogram : forall A B C D, B<>D -> Cong A B C D -> Cong B C D A -> Par B C A D -> Par A B C D -> Parallelogram A B C D.
Lemma degenerated_rect_eq : forall A B C, Rectangle A B B C -> A = C.
Lemma rect_2_rect : forall A B C1 C2 D1 D2, A <> B -> Rectangle A B C1 D1 -> Rectangle A B C2 D2 -> Rectangle C1 D1 D2 C2.
Lemma ncol123_plg__plgs : forall A B C D, ~ Col A B C -> Parallelogram A B C D -> Parallelogram_strict A B C D.
Lemma ncol124_plg__plgs : forall A B C D, ~ Col A B D -> Parallelogram A B C D -> Parallelogram_strict A B C D.
Lemma ncol134_plg__plgs : forall A B C D, ~ Col A C D -> Parallelogram A B C D -> Parallelogram_strict A B C D.
Lemma ncol234_plg__plgs : forall A B C D, ~ Col B C D -> Parallelogram A B C D -> Parallelogram_strict A B C D.
Lemma ncol123_plg__pars1234 : forall A B C D, ~ Col A B C -> Parallelogram A B C D -> Par_strict A B C D.
Lemma ncol124_plg__pars1234 : forall A B C D, ~ Col A B D -> Parallelogram A B C D -> Par_strict A B C D.
Lemma ncol134_plg__pars1234 : forall A B C D, ~ Col A C D -> Parallelogram A B C D -> Par_strict A B C D.
Lemma ncol234_plg__pars1234 : forall A B C D, ~ Col B C D -> Parallelogram A B C D -> Par_strict A B C D.
Lemma ncol123_plg__pars1423 : forall A B C D, ~ Col A B C -> Parallelogram A B C D -> Par_strict A D B C.
Lemma ncol124_plg__pars1423 : forall A B C D, ~ Col A B D -> Parallelogram A B C D -> Par_strict A D B C.
Lemma ncol134_plg__pars1423 : forall A B C D, ~ Col A C D -> Parallelogram A B C D -> Par_strict A D B C.
Lemma ncol234_plg__pars1423 : forall A B C D, ~ Col B C D -> Parallelogram A B C D -> Par_strict A D B C.
Lemma sac_plg : forall A B C D, Saccheri A B C D -> Parallelogram A B C D.
Lemma sac_rectangle : forall A B C D, Saccheri A B C D -> Rectangle A B C D.
Lemma exists_square : forall A B, A<>B -> exists C D, Square A B C D.
Lemma perp3__perp : forall A B C D, Perp A B B C -> Perp B C C D -> Perp C D D A -> Perp D A A B.
Lemma perp3__rect : forall A B C D, Perp A B B C -> Perp B C C D -> Perp C D D A -> Rectangle A B C D.