Require Export GeoCoq.Tarski_dev.Annexes.midpoint_theorems.
Section Varignon.
Context `{TE:Tarski_euclidean}.
(** This is the usual proof presented in classroom based on the midpoint theorem but this proof suffers from two problems. It needs the fact that IJK are not collinear, which is not always the case when the quadrilateral is not convex. It also needs the fact that A is different from C, and B is different from D. The original proof by Varignon suffer from the same problem. The original proof can be found page 138, Corollary IV: http://polib.univ-lille3.fr/documents/B590092101_000000011.489_IMT.pdf *)

Lemma varignon :
forall A B C D I J K L,
A<>C -> B<>D -> ~ Col I J K ->
Midpoint I A B ->
Midpoint J B C ->
Midpoint K C D ->
Midpoint L A D ->
Parallelogram I J K L.