Require Export GeoCoq.Tarski_dev.Ch09_plane.
Require Export GeoCoq.Tarski_dev.Tactics.CoincR_for_cop.
Ltac CopR :=
let tpoint := constr:(Tpoint) in
let col := constr:(Col) in
let cop := constr:(Coplanar) in
assert_ncols; Cop_refl tpoint col cop.
Section T10.
Context `{TnEQD:Tarski_neutral_dimensionless_with_decidable_point_equality}.

(* Specifications: *)
Lemma ex_sym : forall A B X, exists Y, (Perp A B X Y \/ X = Y) /\
(exists M, Col A B M /\ Midpoint M X Y).
Lemma is_image_is_image_spec : forall P P' A B, A<>B -> (Reflect P' P A B <-> ReflectL P' P A B).
Lemma ex_sym1 : forall A B X, A<>B -> exists Y, (Perp A B X Y \/ X = Y) /\
(exists M, Col A B M /\ Midpoint M X Y /\ Reflect X Y A B).
Lemma l10_2_uniqueness : forall A B P P1 P2,
Reflect P1 P A B -> Reflect P2 P A B -> P1=P2.
Lemma l10_2_uniqueness_spec : forall A B P P1 P2,
ReflectL P1 P A B -> ReflectL P2 P A B -> P1=P2.
Lemma l10_2_existence_spec : forall A B P,
exists P', ReflectL P' P A B.
Lemma l10_2_existence : forall A B P,
exists P', Reflect P' P A B.
Lemma l10_4_spec : forall A B P P',
ReflectL P P' A B ->
ReflectL P' P A B.
Lemma l10_4 : forall A B P P', Reflect P P' A B -> Reflect P' P A B.
Lemma l10_5 : forall A B P P' P'',
Reflect P' P A B ->
Reflect P'' P' A B -> P=P''.
Lemma l10_6_uniqueness : forall A B P P1 P2, Reflect P P1 A B -> Reflect P P2 A B -> P1 = P2.
Lemma l10_6_uniqueness_spec : forall A B P P1 P2, ReflectL P P1 A B -> ReflectL P P2 A B -> P1 = P2.
Lemma l10_6_existence_spec : forall A B P', A<>B -> exists P, ReflectL P' P A B.
Lemma l10_6_existence : forall A B P', exists P, Reflect P' P A B.
Lemma l10_7 : forall A B P P' Q Q',
Reflect P' P A B -> Reflect Q' Q A B ->
P'=Q' -> P = Q.
Lemma l10_8 : forall A B P, Reflect P P A B -> Col P A B.
Lemma col__refl : forall A B P, Col P A B -> ReflectL P P A B.
(** Here we need the assumption that A<>B *)
Lemma is_image_col_cong : forall A B P P' X, A<>B ->
Reflect P P' A B -> Col A B X -> Cong P X P' X.
Lemma is_image_spec_col_cong : forall A B P P' X,
ReflectL P P' A B -> Col A B X -> Cong P X P' X.
Lemma image_id : forall A B T T',
A<>B ->
Col A B T ->
Reflect T T' A B ->
T = T'.
Lemma osym_not_col : forall A B P P',
Reflect P P' A B ->
~ Col A B P -> ~ Col A B P'.
Lemma midpoint_preserves_image : forall A B P P' Q Q' M,
A <> B -> Col A B M -> Reflect P P' A B ->
Midpoint M P Q -> Midpoint M P' Q' -> Reflect Q Q' A B.
Lemma image_in_is_image_spec :
forall M A B P P',
ReflectL_at M P P' A B -> ReflectL P P' A B.
Lemma image_in_gen_is_image : forall M A B P P',
Reflect_at M P P' A B  -> Reflect P P' A B.
Lemma image_image_in : forall A B P P' M,
P <> P'-> ReflectL P P' A B -> Col A B M -> Col P M P' ->
ReflectL_at M P P' A B.
Lemma image_in_col0 : forall A B P P' Y : Tpoint,
ReflectL_at Y P P' A B -> Col P P' Y.
Lemma is_image_spec_rev : forall P P' A B, ReflectL P P' A B -> ReflectL P P' B A.
Lemma is_image_rev : forall P P' A B,
Reflect P P' A B -> Reflect P P' B A.
Lemma midpoint_preserves_per : forall A B C A1 B1 C1 M,
Per A B C ->
Midpoint M A A1 ->
Midpoint M B B1 ->
Midpoint M C C1 ->
Per A1 B1 C1.
Lemma col__image_spec : forall A B X, Col A B X -> ReflectL X X A B.
Lemma image_triv : forall A B, Reflect A A A B.
Lemma cong_midpoint__image : forall A B X Y, Cong A X A Y -> Midpoint B X Y -> Reflect Y X A B.
Lemma col_image_spec__eq : forall A B P P', Col A B P -> ReflectL P P' A B -> P = P'.
Lemma image_spec_triv : forall A B, ReflectL A A B B.
Lemma image_spec__eq : forall A P P', ReflectL P P' A A -> P = P'.
Lemma image__midpoint : forall A P P', Reflect P P' A A -> Midpoint A P' P.
Lemma is_image_spec_dec :
forall A B C D, ReflectL A B C D \/ ~ ReflectL A B C D.
Lemma l10_14 : forall P P' A B, P <> P' -> A <> B ->
Reflect P P' A B -> TS A B P P'.
Lemma l10_15 : forall A B C P,
Col A B C -> ~ Col A B P ->
exists Q, Perp A B Q C /\ OS A B P Q.
Lemma ex_per_cong : forall A B C D X Y,
A <> B -> X <> Y -> Col A B C -> ~Col A B D ->
exists P, Per P C A /\ Cong P C X Y /\ OS A B P D.
Lemma exists_cong_per : forall A B X Y, exists C, Per A B C /\ Cong B C X Y.
End T10.