(** This is SSA congruence with a right angle *)

(* Specifications: *)
Lemma cong2_per2__cong_conga2 :
forall A B C A' B' C',
A<>B -> B<>C ->
Per A B C ->
Per A' B' C' ->
Cong A C A' C' ->
Cong B C B' C' ->
Cong B A B' A' /\ CongA B A C B' A' C' /\ CongA B C A B' C' A'.
Lemma cong2_per2__cong :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Cong A C A' C' ->
Cong B C B' C' ->
Cong B A B' A'.
Lemma cong2_per2__cong_3 :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Cong A C A' C' ->
Cong B C B' C' ->
Cong_3 A B C A' B' C'.
Lemma cong_lt_per2__lt :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Cong A B A' B' ->
Lt B C B' C' ->
Lt A C A' C'.
Lemma cong_le_per2__le :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Cong A B A' B' ->
Le B C B' C' ->
Le A C A' C'.
Lemma lt2_per2__lt :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Lt A B A' B' ->
Lt B C B' C' ->
Lt A C A' C'.
Lemma le_lt_per2__lt :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Le A B A' B' ->
Lt B C B' C' ->
Lt A C A' C'.
Lemma le2_per2__le :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Le A B A' B' ->
Le B C B' C' ->
Le A C A' C'.
Lemma cong_lt_per2__lt_1 :
forall A B C A' B' C',
Per A B C ->
Per A' B' C' ->
Lt A B A' B' ->
Cong A C A' C' ->
Lt B' C' B C.
Lemma symmetry_preserves_conga :
forall A B C A' B' C' M, A <> B -> C <> B ->
Midpoint M A A' ->
Midpoint M B B' ->
Midpoint M C C' ->
CongA A B C A' B' C'.
Lemma l11_57 : forall A B C A' B' C',
OS A A' B B' -> Per B A A' -> Per B' A' A ->
OS A A' C C' -> Per C A A' -> Per C' A' A ->
CongA B A C B' A' C'.
Lemma cop3_orth_at__orth_at : forall A B C D E F U V X, ~ Col D E F ->
Coplanar A B C D -> Coplanar A B C E -> Coplanar A B C F -> Orth_at X A B C U V ->
Orth_at X D E F U V.
Lemma col2_orth_at__orth_at : forall A B C P Q U V X, U <> V ->
Col P Q U -> Col P Q V -> Orth_at X A B C P Q -> Orth_at X A B C U V.
Lemma col_orth_at__orth_at : forall A B C U V W X, U <> W ->
Col U V W -> Orth_at X A B C U V -> Orth_at X A B C U W.
Lemma orth_at_symmetry : forall A B C U V X,
Orth_at X A B C U V -> Orth_at X A B C V U.
Lemma orth_at_distincts : forall A B C U V X, Orth_at X A B C U V ->
A <> B /\ B <> C /\ A <> C /\ U <> V.
Lemma orth_at_chara : forall A B C P X, Orth_at X A B C X P <->
~ Col A B C /\ X <> P /\ Coplanar A B C X /\ (forall D, Coplanar A B C D -> Per D X P).
Lemma cop3_orth__orth : forall A B C D E F U V, ~ Col D E F ->
Coplanar A B C D -> Coplanar A B C E -> Coplanar A B C F -> Orth A B C U V ->
Orth D E F U V.
Lemma col2_orth__orth : forall A B C P Q U V, U <> V ->
Col P Q U -> Col P Q V -> Orth A B C P Q -> Orth A B C U V.
Lemma col_orth__orth : forall A B C U V W, U <> W ->
Col U V W -> Orth A B C U V -> Orth A B C U W.
Lemma orth_symmetry : forall A B C U V,
Orth A B C U V -> Orth A B C V U.
Lemma orth_distincts : forall A B C U V, Orth A B C U V ->
A <> B /\ B <> C /\ A <> C /\ U <> V.
Lemma col_cop_orth__orth_at : forall A B C U V X,
Orth A B C U V -> Coplanar A B C X -> Col U V X -> Orth_at X A B C U V.
Lemma l11_60_aux : forall A B C D P Q, ~ Col A B C ->
Cong A P A Q -> Cong B P B Q -> Cong C P C Q -> Coplanar A B C D ->
Cong D P D Q.
Lemma l11_60 : forall A B C D E P, ~ Col A B C ->
Per A D P -> Per B D P -> Per C D P -> Coplanar A B C E ->
Per E D P.
Lemma l11_60_bis : forall A B C D P, ~ Col A B C -> D <> P ->
Coplanar A B C D -> Per A D P -> Per B D P -> Per C D P ->
Orth_at D A B C D P.
Lemma l11_61 : forall A B C A' B' C',
A <> A' -> A <> B -> A <> C ->
Coplanar A A' B B' -> Per B A A' -> Per B' A' A ->
Coplanar A A' C C' -> Per C A A' ->
Per B A C -> Per B' A' C'.
Lemma l11_61_bis : forall A B C D E P Q,
Orth_at D A B C D P -> Perp D E E Q -> Coplanar A B C E -> Coplanar D E P Q ->
Orth_at E A B C E Q.
Lemma l11_62_unicity : forall A B C D D' P,
Coplanar A B C D -> Coplanar A B C D' ->
(forall E, Coplanar A B C E -> Per E D P) ->
(forall E, Coplanar A B C E -> Per E D' P) ->
D = D'.
Lemma l11_62_unicity_bis : forall A B C U X Y,
Orth_at X A B C X U -> Orth_at Y A B C Y U -> X = Y.
Lemma orth_at2__eq : forall A B C U V X Y,
Orth_at X A B C U V -> Orth_at Y A B C U V -> X = Y.
Lemma col_cop_orth_at__eq : forall A B C U V X Y,
Orth_at X A B C U V -> Coplanar A B C Y -> Col U V Y -> X = Y.
Lemma orth_at__ncop1 : forall A B C U V X, U <> X ->
Orth_at X A B C U V -> ~ Coplanar A B C U.
Lemma orth_at__ncop2 : forall A B C U V X, V <> X ->
Orth_at X A B C U V -> ~ Coplanar A B C V.
Lemma orth_at__ncop : forall A B C P X,
Orth_at X A B C X P -> ~ Coplanar A B C P.
Lemma l11_62_existence : forall A B C P, exists D,
Coplanar A B C D /\ forall E, Coplanar A B C E -> Per E D P.
Lemma l11_62_existence_bis : forall A B C P, ~ Coplanar A B C P ->
exists X, Orth_at X A B C X P.
Lemma l11_63_aux : forall A B C D E P,
Coplanar A B C D -> D <> E -> Orth_at E A B C E P ->
exists Q, OS D E P Q /\ Orth A B C D Q.
Lemma l11_63_existence : forall A B C D P,
Coplanar A B C D -> ~ Coplanar A B C P ->
exists Q, Orth A B C D Q.
Lemma l8_21_3 : forall A B C D X, Coplanar A B C D -> ~ Coplanar A B C X ->
exists P T, Orth A B C D P /\ Coplanar A B C T /\ Bet X T P.
Lemma mid2_orth_at2__cong : forall A B C X Y P Q P' Q',
Orth_at X A B C X P -> Orth_at Y A B C Y Q -> Midpoint X P P' -> Midpoint Y Q Q' ->
Cong P Q P' Q'.
Lemma orth_at2_tsp__ts : forall A B C X Y P Q, P <> Q ->
Orth_at P A B C P X -> Orth_at Q A B C Q Y -> TSP A B C X Y -> TS P Q X Y.
Lemma orth_dec : forall A B C U V, Orth A B C U V \/ ~ Orth A B C U V.
Lemma orth_at_dec : forall A B C U V X, Orth_at X A B C U V \/ ~ Orth_at X A B C U V.
Lemma tsp_dec : forall A B C X Y, TSP A B C X Y \/ ~ TSP A B C X Y.
Lemma osp_dec : forall A B C X Y, OSP A B C X Y \/ ~ OSP A B C X Y.
Lemma os_ts__inangle : forall A B C P, TS B P A C -> OS B A C P -> InAngle P A B C.
Lemma os2__inangle : forall A B C P, OS B A C P -> OS B C A P -> InAngle P A B C.
Lemma acute_conga__acute : forall A B C D E F, Acute A B C -> CongA A B C D E F -> Acute D E F.
Lemma acute_out2__acute : forall A B C A' C', Out B A' A -> Out B C' C -> Acute A B C ->
Acute A' B C'.
Lemma conga_obtuse__obtuse : forall A B C D E F, Obtuse A B C -> CongA A B C D E F -> Obtuse D E F.
Lemma obtuse_out2__obtuse : forall A B C A' C', Out B A' A -> Out B C' C -> Obtuse A B C ->
Obtuse A' B C'.
Lemma bet_lea__bet : forall A B C D E F, Bet A B C -> LeA A B C D E F -> Bet D E F.
Lemma out_lea__out : forall A B C D E F, Out E D F -> LeA A B C D E F -> Out B A C.
Lemma bet2_lta__lta : forall A B C D E F A' D',
LtA A B C D E F -> Bet A B A' -> A' <> B -> Bet D E D' -> D' <> E ->
LtA D' E F A' B C.
Lemma lta__lea : forall A B C D E F, LtA A B C D E F -> LeA A B C D E F.
Lemma lea123456_lta__lta : forall A B C D E F G H I, LeA A B C D E F -> LtA D E F G H I ->
LtA A B C G H I.
Lemma lea456789_lta__lta : forall A B C D E F G H I, LtA A B C D E F -> LeA D E F G H I ->
LtA A B C G H I.
Lemma acute_per__lta : forall A B C D E F, Acute A B C -> D <> E -> E <> F -> Per D E F ->
LtA A B C D E F.
Lemma obtuse_per__lta : forall A B C D E F, Obtuse A B C -> D <> E -> E <> F -> Per D E F ->
LtA D E F A B C.
Lemma acute_obtuse__lta : forall A B C D E F, Acute A B C -> Obtuse D E F -> LtA A B C D E F.
Lemma lea_in_angle : forall A B C P, LeA A B P A B C -> OS A B C P ->
InAngle P A B C.
Lemma acute_bet__obtuse : forall A B C A', Bet A B A' -> A' <> B -> Acute A B C -> Obtuse A' B C.
Lemma bet_obtuse__acute : forall A B C A', Bet A B A' -> A' <> B -> Obtuse A B C -> Acute A' B C.
Lemma inangle_dec : forall A B C P, InAngle P A B C \/ ~ InAngle P A B C.
Lemma lea_dec : forall A B C D E F, LeA A B C D E F \/ ~ LeA A B C D E F.
Lemma gea_dec : forall A B C D E F, GeA A B C D E F \/ ~ GeA A B C D E F.
Lemma lta_dec : forall A B C D E F, LtA A B C D E F \/ ~ LtA A B C D E F.
Lemma gta_dec : forall A B C D E F, GtA A B C D E F \/ ~ GtA A B C D E F.
Lemma lea_total : forall A B C D E F, A <> B -> B <> C -> D <> E -> E <> F ->
LeA A B C D E F \/ LeA D E F A B C.
Lemma gea_total : forall A B C D E F, A <> B -> B <> C -> D <> E -> E <> F ->
GeA A B C D E F \/ GeA D E F A B C.
Lemma or_lta_conga_gta : forall A B C D E F,
A <> B -> C <> B -> D <> E -> F <> E ->
LtA A B C D E F \/ GtA A B C D E F \/ CongA A B C D E F.
Lemma angle_partition : forall A B C, A <> B -> B <> C ->
Acute A B C \/ Per A B C \/ Obtuse A B C.
Lemma acute_chara : forall A B C A', Bet A B A' -> B <> A' -> (Acute A B C <-> LtA A B C A' B C).
Lemma obtuse_chara : forall A B C A', Bet A B A' -> B <> A' -> (Obtuse A B C <-> LtA A' B C A B C).
Lemma conga__acute : forall A B C, CongA A B C A C B -> Acute A B C.
Lemma cong__acute : forall A B C, A <> B -> B <> C -> Cong A B A C -> Acute A B C.
Lemma nlta : forall A B C, ~ LtA A B C A B C.
Lemma lea__nlta : forall A B C D E F, LeA A B C D E F -> ~ LtA D E F A B C.
Lemma lta__nlea : forall A B C D E F, LtA A B C D E F -> ~ LeA D E F A B C.
Lemma nlta__lea : forall A B C D E F, ~ LtA A B C D E F -> A <> B -> B <> C -> D <> E -> E <> F ->
LeA D E F A B C.
Lemma nlea__lta : forall A B C D E F, ~ LeA A B C D E F  -> A <> B -> B <> C -> D <> E -> E <> F ->
LtA D E F A B C.