(* Julien Narboux *)
(* Formalization of *)
(* Tarski's axiomatic *)
Require Export  general_tactics.
(** We use the axioms used in the book of Schwabäuser, Szmielew and Tarski. *)
(** We assume that we have a set of points. This axiomatic is based only on points, lines are implicit. *)
Parameter Point : Set.
(* Here we use classical logic, for a intuitionnist approach use von Plato axiomatic for instance. In this development, the classic axiom is mainly applied to formulas of the form : - Col A B C, - A=B *)
Require Export Classical.
(** Tarski's axiomatic is based on two predicates over points, one ternary and one quaternary. *)
(** Cong A B C D informally means that the distance AB is equal to the distance CD. *)
Parameter Cong : Point -> Point -> Point -> Point -> Prop.
(** Bet A B C, informally means that : A, B and C are on the same line B is between A and C. Note that they are not necessarily distinct. This is the difference between the Between predicate of Tarski and the BetweenH prdicate of Hilbert *)
Parameter Bet : Point -> Point -> Point -> Prop.
Definition Col (A B C : Point) : Prop :=
Bet A B C \/ Bet B C A \/ Bet C A B.
Ltac cases_col A B C := elim (classic (Col A B C));intros.
(** %\textbf{% Identity axiom for betweenness. %}% *)
(** %\textbf{% Reflexivity axiom for equidistance.%}% *)
(** %\textbf{% Identity axiom for equidistance.%}% *)
(** %\textbf{% Transitivity axiom for equidistance.%}% *)
(** %\textbf{% Pasch Axiom (Inner form).%}% *)
(** %\textbf{% Euclid Axiom.%}% *)
(** %\textbf{% Five segments axiom.%}% *)
(** %\textbf{% Axiom of segment construction.%}% *)
(** %\textbf{% Lower dimension axiom (2).%}% *)
(** %\textbf{% Upper dimension axiom  (2).%}% *)
(** %\textbf{% Continuity axioms.%}% *)
Hint Resolve segment_construction five_segments inner_pasch euclid : Tarski.
Hint Resolve cong_pseudo_reflexivity cong_identity between_identity : Tarski.
Hint Resolve cong_inner_transitivity  : Tarski.
Ltac eTarski := eauto with Tarski.
Ltac Tarski := auto with Tarski.
(** We use classical logic, to emphasize the fact that it is mainly for the decidability of point equality we use the following lemma *)

Lemma eq_dec_points : forall A B:Point, A=B \/ ~ A=B.