Ltac double A B A' :=
   assert (mp:= symmetric_point_construction A B);
   elim mp; intros A' ; intro; clear mp.

(* Specifications: *)
Lemma Perp_cases : forall A B C D, Perp A B C D \/ Perp B A C D \/ Perp A B D C \/ Perp B A D C \/ Perp C D A B \/ Perp C D B A \/ Perp D C A B \/ Perp D C B A -> Perp A B C D.
Lemma Perp_perm : forall A B C D, Perp A B C D -> Perp A B C D /\ Perp B A C D /\ Perp A B D C /\ Perp B A D C /\ Perp C D A B /\ Perp C D B A /\ Perp D C A B /\ Perp D C B A.
Lemma Perp_in_cases : forall X A B C D, Perp_at X A B C D \/ Perp_at X B A C D \/ Perp_at X A B D C \/ Perp_at X B A D C \/ Perp_at X C D A B \/ Perp_at X C D B A \/ Perp_at X D C A B \/ Perp_at X D C B A -> Perp_at X A B C D.
Lemma Perp_in_perm : forall X A B C D, Perp_at X A B C D -> Perp_at X A B C D /\ Perp_at X B A C D /\ Perp_at X A B D C /\ Perp_at X B A D C /\ Perp_at X C D A B /\ Perp_at X C D B A /\ Perp_at X D C A B /\ Perp_at X D C B A.
Lemma perp_in_col : forall A B C D X, Perp_at X A B C D -> Col A B X /\ Col C D X.
Lemma perp_perp_in : forall A B C, Perp A B C A -> Perp_at A A B C A.
Lemma perp_per_1 : forall A B C, Perp A B C A -> Per B A C.
Lemma perp_per_2 : forall A B C, Perp A B A C -> Per B A C.
Lemma perp_col : forall A B C D E, A<>E -> Perp A B C D -> Col A B E -> Perp A E C D.
Lemma perp_col2 : forall A B C D X Y, Perp A B X Y -> C <> D -> Col A B C -> Col A B D -> Perp C D X Y.
Lemma perp_not_eq_1 : forall A B C D, Perp A B C D -> A<>B.
Lemma perp_not_eq_2 : forall A B C D, Perp A B C D -> C<>D.
Lemma diff_per_diff : forall A B P R , A <> B -> Cong A P B R -> Per B A P -> Per A B R -> P <> R.
Lemma per_not_colp : forall A B P R, A <> B -> A <> P -> B <> R -> Per B A P -> Per A B R -> ~Col P A R.
Lemma per_not_col : forall A B C, A <> B -> B <> C -> Per A B C -> ~Col A B C.
Lemma perp_not_col2 : forall A B C D, Perp A B C D -> ~ Col A B C \/ ~ Col A B D.
Lemma perp_not_col : forall A B P, Perp A B P A -> ~ Col A B P.
Lemma perp_in_col_perp_in : forall A B C D E P, C <> E -> Col C D E -> Perp_at P A B C D -> Perp_at P A B C E.
Lemma perp_col2_bis : forall A B C D P Q, Perp A B P Q -> Col C D P -> Col C D Q -> C <> D -> Perp A B C D.
Lemma perp_in_perp_bis : forall A B C D X, Perp_at X A B C D -> Perp X B C D \/ Perp A X C D.
Lemma col_per_perp : forall A B C D, A <> B -> B <> C -> D <> B -> D <> C -> Col B C D -> Per A B C -> Perp C D A B.
Lemma per_cong_mid : forall A B C H, B <> C -> Bet A B C -> Cong A H C H -> Per H B C -> Midpoint B A C.
Lemma per_double_cong : forall A B C C', Per A B C -> Midpoint B C C' -> Cong A C A C'.
Lemma cong_perp_or_mid : forall A B M X, A <> B -> Midpoint M A B -> Cong A X B X -> X = M \/ ~Col A B X /\ Perp_at M X M A B.
Lemma col_per2_cases : forall A B C D B', B <> C -> B' <> C -> C <> D -> Col B C D -> Per A B C -> Per A B' C -> B = B' \/ ~Col B' C D.
Lemma l8_16_1 : forall A B C U X, Col A B X -> Col A B U -> Perp A B C X -> ~ Col A B C /\ Per C X U.
Lemma l8_16_2 : forall A B C U X, Col A B X -> Col A B U -> U<>X -> ~ Col A B C -> Per C X U -> Perp A B C X.
Lemma l8_18_uniqueness : forall A B C X Y, ~ Col A B C -> Col A B X -> Perp A B C X -> Col A B Y -> Perp A B C Y -> X=Y.
Lemma midpoint_distinct : forall A B X C C', ~ Col A B C -> Col A B X -> Midpoint X C C' -> C <> C'.
Lemma l8_20_1 : forall A B C C' D P, Per A B C -> Midpoint P C' D -> Midpoint A C' C -> Midpoint B D C -> Per B A P.
Lemma l8_20_2 : forall A B C C' D P, Per A B C -> Midpoint P C' D -> Midpoint A C' C -> Midpoint B D C -> B<>C -> A<>P.
Lemma perp_col1 : forall A B C D X, C <> X -> Perp A B C D -> Col C D X -> Perp A B C X.
Lemma l8_18_existence : forall A B C, ~ Col A B C -> exists X, Col A B X /\ Perp A B C X.
Lemma l8_21_aux : forall A B C, ~ Col A B C -> exists P, exists T, Perp A B P A /\ Col A B T /\ Bet C T P.
Lemma l8_21 : forall A B C, A <> B -> exists P, exists T, Perp A B P A /\ Col A B T /\ Bet C T P.
Lemma per_cong : forall A B P R X , A <> B -> A <> P -> Per B A P -> Per A B R -> Cong A P B R -> Col A B X -> Bet P X R -> Cong A R P B.
Lemma perp_cong : forall A B P R X, A <> B -> A <> P -> Perp A B P A -> Perp A B R B -> Cong A P B R -> Col A B X -> Bet P X R -> Cong A R P B.
Lemma perp_exists : forall O A B, A <> B -> exists X, Perp O X A B.
Lemma perp_vector : forall A B, A <> B -> (exists X, exists Y, Perp A B X Y).
Lemma midpoint_existence_aux : forall A B P Q T, A<>B -> Perp A B Q B -> Perp A B P A -> Col A B T -> Bet Q T P -> Le A P B Q -> exists X : Tpoint, Midpoint X A B.
Lemma midpoint_existence : forall A B, exists X, Midpoint X A B.
Lemma perp_in_id : forall A B C X, Perp_at X A B C A -> X = A.
Lemma l8_22 : forall A B P R X , A <> B -> A <> P -> Per B A P -> Per A B R -> Cong A P B R -> Col A B X -> Bet P X R -> Cong A R P B /\ Midpoint X A B /\ Midpoint X P R.
Lemma l8_22_bis : forall A B P R X, A <> B -> A <> P -> Perp A B P A -> Perp A B R B -> Cong A P B R -> Col A B X -> Bet P X R -> Cong A R P B /\ Midpoint X A B /\ Midpoint X P R.
Lemma perp_in_perp : forall A B C D X, Perp_at X A B C D -> Perp A B C D.
Lemma perp_proj : forall A B C D, Perp A B C D -> ~Col A C D -> exists X, Col A B X /\ Perp A X C D.
Lemma l8_24 : forall A B P Q R T, Perp P A A B -> Perp Q B A B -> Col A B T -> Bet P T Q -> Bet B R Q -> Cong A P B R -> exists X, Midpoint X A B /\ Midpoint X P R.
Lemma col_per2__per : forall A B C P X, A <> B -> Col A B C -> Per A X P -> Per B X P -> Per C X P.
Lemma perp_in_per_1 : forall A B C D X, Perp_at X A B C D -> Per A X C.
Lemma perp_in_per_2 : forall A B C D X, Perp_at X A B C D -> Per A X D.
Lemma perp_in_per_3 : forall A B C D X, Perp_at X A B C D -> Per B X C.
Lemma perp_in_per_4 : forall A B C D X, Perp_at X A B C D -> Per B X D.