(*
Ltac kill_not_eq :=
   (match goal with
     | H: ?X <> F0 |- _  =>
        ((let tmp := fresh in
          ( intros tmp; case H; rewrite <- tmp); newring; fail) ||
        clear H); kill_not_eq
   end).

Ltac kill_cond_tac :=
   repeat (remove_hyp_div_not_eq_zero; repeat split; auto; try Geometry);
   try newfield; (repeat split); auto; try Geometry;
   try split_goal_not_eq_zero; auto; unfold_field; kill_not_eq.


Ltac field_and_conclude :=  
abstract kill_cond_tac.
*)

Ltac decomp_non_zero_mult_div H := 
  (apply (multnonzero) in H || apply (divnonzero) in H; use H).Ltac decomp_all_non_zero_mult_div := repeat match goal with
 H: ?X <> 0 |- _ => decomp_non_zero_mult_div H
end.Ltac field_and_conclude := 
  (abstract (field;decomp_all_non_zero_mult_div;solve_conds)) ||
  (abstract (Ffield)).(* TODO debugger Ffield instead of using second version *)

Ltac DecomposeMratio :=
  repeat
   match goal with
   | H:(mratio _ _ _ _) |- _ =>
       unfold mratio in H; decompose [and] H; clear H
   end.Ltac check_ratio_hyps_aux A B C D :=
    ((match goal with
 | H : parallel A B C D , H2 : C<>D |- _ => fail 2 
end) || fail 3 "Error, one the following hypotheses are missing : parallel" A B C D ", " C "<>" D) || idtac.Ltac unfold_non_primitive_constructions := 
 unfold is_midpoint, m_ratio, on_circle, inter_lc,
  inversion, eq_angle, eq_distance, co_circle, harmonic in *.(* This definition is used to have a symetric statement to ease simplification *)

Definition parallel_s (A B C D : Point) : Prop := S A C B = S B A D.

Lemma parallel_equiv : forall A B C D, parallel_s A B C D <-> parallel A B C D.