Section Vectors.
Context `{TE:Tarski_euclidean}.
intros.
assert(HH:= vector_construction C D B).
ex_and HH F.
exists A.
exists F.
unfold SumV.
intros.
assert(D' = F).
apply (vector_construction_uniqueness C D B); auto.
subst D'.
apply eqv_refl.
Qed.
intros.
unfold Same_dir.
induction (eq_dec_points A B).
left.
tauto.
right.
exists B.
split.
apply out_trivial.
auto.
apply eqv_refl.
Qed.
intros.
unfold Same_dir in H.
induction H.
right.
auto.
ex_and H D'.
unfold EqV in H0.
induction H0.
induction H0.
apply plgs_par_strict in H0.
spliter.
apply False_ind.
apply H1.
exists B.
split; Col.
apply plgf_permut in H0.
apply plgf_sym in H0.
apply plgf_trivial_neq in H0.
spliter.
subst D'.
left.
apply l6_6.
assumption.
spliter.
subst D'.
subst B.
unfold Out in H.
tauto.
Qed.
intros.
unfold Same_dir in H.
induction H.
right.
spliter.
subst B.
tauto.
ex_and H D'.
unfold EqV in H0.
induction H0.
induction H0.
apply plgs_par_strict in H0.
spliter.
apply False_ind.
apply H1.
exists B.
split; Col.
unfold Parallelogram_flat in H0.
spliter.
assert(A = D' \/ Midpoint B A D').
apply l7_20.
Col.
Cong.
induction H5.
subst D'.
tauto.
left.
unfold Midpoint in H5.
spliter.
unfold Out.
repeat split.
intro.
subst B.
apply cong_symmetry in H6.
apply cong_identity in H6.
induction H4; tauto.
intro.
subst C.
unfold Out in H.
spliter.
induction H8.
apply H.
apply (between_equality _ _ D');
Between.
apply H7.
apply (between_equality _ _ A);
Between.
induction H.
spliter.
induction H8.
left.
apply (between_inner_transitivity _ _ _ D').
apply H5.
apply H8.
left.
apply (outer_transitivity_between _ _  D').
apply H5.
auto.
auto.
spliter.
subst B.
subst D'.
unfold Out in H.
tauto.
Qed.
intros.
unfold Same_dir in H.
induction H.
tauto.
ex_and H D.
apply null_vector in H0.
subst D.
unfold Out in H.
tauto.
Qed.
intros.
induction (eq_dec_points A B).
subst B.
apply same_dir_null in H.
subst D.
left.
tauto.
unfold Same_dir in *.
induction H.
left.
tauto.
ex_and H D'.
right.
assert(HH:=vector_construction C D A).
ex_and HH B'.
exists B'.
split.
unfold EqV in H1.
unfold EqV in H2.
unfold Out in *.
spliter.
induction H1; induction H2.
repeat split.
auto.
intro.
subst B'.
induction H2.
apply H2.
Col.
apply plgf_sym in H2.
apply plgf_trivial_neq in H2.
spliter.
auto.
induction H4.
right.
apply (plg_plg_bet C D _ _ D').
apply H2.
apply H4.
apply plg_sym.
apply plg_comm2.
assumption.
left.
apply (plg_plg_bet C D' _ _ D).
apply plg_sym.
apply plg_comm2.
apply H1.
apply H4.
assumption.
spliter.
subst D.
tauto.
spliter.
subst B.
tauto.
spliter.
subst D.
tauto.
assumption.
Qed.

Lemma same_dir_trans : forall A B C D E F, Same_dir A B C D -> Same_dir C D E F -> Same_dir A B E F.