Require Export GeoCoq.Meta_theory.Parallel_postulates.SPP_ID.
Require Export GeoCoq.Meta_theory.Parallel_postulates.TCP_tarski.
Require Export GeoCoq.Meta_theory.Parallel_postulates.alternate_interior_angles_proclus.
Require Export GeoCoq.Meta_theory.Continuity.angle_archimedes.
Require Export GeoCoq.Meta_theory.Continuity.archimedes.
Require Export GeoCoq.Meta_theory.Continuity.aristotle.
Require Export GeoCoq.Meta_theory.Parallel_postulates.euclid_5_original_euclid.
Require Export GeoCoq.Meta_theory.Parallel_postulates.existential_triangle_rah.
Require Export GeoCoq.Meta_theory.Parallel_postulates.par_perp_perp_TCP.
Require Export GeoCoq.Meta_theory.Parallel_postulates.playfair_alternate_interior_angles.
Require Export GeoCoq.Meta_theory.Parallel_postulates.playfair_bis_playfair.
Require Export GeoCoq.Meta_theory.Parallel_postulates.playfair_universal_posidonius_postulate.
Require Export GeoCoq.Meta_theory.Parallel_postulates.proclus_SPP.
Require Export GeoCoq.Meta_theory.Parallel_postulates.rah_triangle.
Require Export GeoCoq.Meta_theory.Parallel_postulates.tarski_euclid.
Require Export GeoCoq.Meta_theory.Parallel_postulates.triangle_playfair_bis.
Require Export GeoCoq.Meta_theory.Parallel_postulates.triangle_existential_triangle.
Require Export GeoCoq.Meta_theory.Parallel_postulates.universal_posidonius_postulate_par_perp_perp.
Require Export GeoCoq.Tarski_dev.Annexes.defect.
Section Legendre.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.

(* Specifications: *)
Theorem stronger_legendre_s_first_theorem :
aristotle_s_axiom ->
forall A B C D E F,
SumA C A B A B C D E F ->
SAMS D E F B C A.
Theorem legendre_s_first_theorem :
archimedes_axiom ->
forall A B C D E F,
SumA C A B A B C D E F ->
SAMS D E F B C A.
Theorem legendre_s_second_theorem :
postulate_of_existence_of_a_triangle_whose_angles_sum_to_two_rights ->
triangle_postulate.
Lemma legendre_s_third_theorem_aux :
aristotle_s_axiom ->
triangle_postulate ->
euclid_s_parallel_postulate.
Theorem legendre_s_third_theorem :
archimedes_axiom ->
triangle_postulate ->
euclid_s_parallel_postulate.
Lemma legendre_aux :
~ hypothesis_of_obtuse_saccheri_quadrilaterals ->
forall A B C D B1 C1 P Q R S T U V W X,
~ Col A B C -> CongA A C B C B D ->
Cong A C B D -> TS B C A D -> Out A B B1 -> Out A C C1 -> Bet B1 D C1 ->
Defect A B C P Q R -> Defect A B1 C1 S T U -> SumA P Q R P Q R V W X ->
SAMS P Q R P Q R /\ LeA V W X S T U.
Lemma legendre_aux1 : forall A B C B' C',
~ Col A B C -> Out A B B' -> Out A C C' ->
exists D', InAngle D' B A C /\ CongA A C' B' C' B' D' /\
Cong A C' B' D' /\ TS B' C' A D'.
Lemma legendre_aux2 :
~ hypothesis_of_obtuse_saccheri_quadrilaterals ->
forall A B C,
~ Col A B C ->  Acute B A C ->
(forall T,
InAngle T B A C ->
exists X Y : Tpoint, Out A B X /\ Out A C Y /\ Bet X T Y) ->
forall P Q R S T U,
Defect A B C P Q R -> GradAExp P Q R S T U ->
exists B' C' P' Q' R',
(Out A B B' /\ Out A C C' /\
Defect A B' C' P' Q' R' /\ LeA S T U P' Q' R').
Lemma legendre_s_fourth_theorem_aux :
archimedes_axiom ->
legendre_s_parallel_postulate ->
postulate_of_right_saccheri_quadrilaterals.
Theorem legendre_s_fourth_theorem :
archimedes_axiom ->
legendre_s_parallel_postulate ->
postulate_of_existence_of_a_triangle_whose_angles_sum_to_two_rights.