(* Julien Narboux *)
(* Formalization of *)
(* Tarski's axiomatic *)
Require Export  Ch01_tarski_axioms.
(** Some basic properties about Cong. *)
Hint Resolve cong_reflexivity : Tarski.
Hint Immediate cong_symmetry : sTarski.
Ltac sTarski := auto with Tarski sTarski.
Ltac esTarski := eauto with Tarski sTarski.
(* The following hint has been disabled since it isn't necessary (cf. cong_inner_transitivity + cong_symmetry) and it may interact badly with cong_inner_transitivity to create proofs with remaining evars *)
(*Hint Resolve cong_transitivity : Tarski.*)
Hint Resolve cong_left_commutativity cong_right_commutativity : sTarski.
Hint Resolve cong_trivial_identity : Tarski.
Proof with eTarski.
intros.
assert (Cong C D A A)...
Qed.
Hint Resolve cong_reverse_identity : Tarski.
Proof with eTarski.
intros...
Qed.
Hint Resolve cong_commutativity : sTarski.
(** (Outer) Five segments configuration. *)
Definition OFSC := fun A B C D A' B' C' D' =>
Bet A B C /\ Bet A' B' C' /\
Cong A B A' B' /\ Cong B C B' C' /\
Cong A D A' D' /\ Cong B D B' D'.
Hint Unfold OFSC : Tarski.
Hint Resolve five_segments_with_def : Tarski.
Proof with eTarski.
intros.
cases_equality A B.
assert (A' = B').
assert (Cong A' B' A B).
sTarski.
eapply cong_identity.
rewrite H3 in H4.
apply H4.
rewrite <- H3 in H2.
rewrite <- H4 in H2.
assumption.
assert (Cong C A C' A').
eapply five_segments; try apply H1...
eTarski.
Qed.
(** Unicity of segment construction. *)

Lemma construction_unicity : forall Q A B C x y,
~(Q=A) ->
Bet Q A x -> Cong A x B C ->
Bet Q A y -> Cong A y B C ->
x=y.