This repository has been archived by the owner on Jul 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorthocentre.v
306 lines (291 loc) · 10.3 KB
/
orthocentre.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
(* This program is free software; you can redistribute it and/or *)
(* modify it under the terms of the GNU Lesser General Public License *)
(* as published by the Free Software Foundation; either version 2.1 *)
(* of the License, or (at your option) any later version. *)
(* *)
(* This program is distributed in the hope that it will be useful, *)
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
(* GNU General Public License for more details. *)
(* *)
(* You should have received a copy of the GNU Lesser General Public *)
(* License along with this program; if not, write to the Free *)
(* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *)
(* 02110-1301 USA *)
Require Export projection_orthogonale.
Require Export angles_droites.
Set Implicit Arguments.
Unset Strict Implicit.
Lemma deux_hauteurs_trois :
forall A B C H : PO,
orthogonal (vec H A) (vec B C) ->
orthogonal (vec H B) (vec A C) -> orthogonal (vec H C) (vec A B).
intros.
apply def_orthogonal2.
replace (vec H C) with (add_PP (vec H A) (vec A C)) by Ringvec.
lapply (def_orthogonal (A:=H) (B:=A) (C:=B) (D:=C)); auto; intros.
lapply (def_orthogonal (A:=H) (B:=B) (C:=A) (D:=C)); auto; intros.
Simplscal.
replace (scalaire (vec H A) (vec A B)) with (scalaire (vec H A) (vec A C)).
replace (scalaire (vec H A) (vec A C) + scalaire (vec A C) (vec A B)) with
(scalaire (add_PP (vec H A) (vec A B)) (vec A C)).
replace (add_PP (vec H A) (vec A B)) with (vec H B); auto.
Ringvec.
Simplscal.
rewrite (scalaire_sym A B A C); auto.
replace (vec A B) with (add_PP (vec A C) (vec C B)).
Simplscal.
replace (vec C B) with (mult_PP (-1) (vec B C)).
Simplscal.
rewrite H2; ring.
Ringvec.
Ringvec.
Qed.
Lemma triangle_rectangle_une_fois :
forall A B C : PO,
triangle A B C ->
orthogonal (vec A B) (vec A C) ->
~ orthogonal (vec A B) (vec B C) /\ ~ orthogonal (vec A C) (vec C B).
intros.
cut (triangle A C B); intros; auto with geo.
deroule_triangle A C B.
split; [ try assumption | idtac ].
red in |- *; intros; apply H2.
elim orthogonal_paralleles with (A := A) (B := B) (C := C) (E := B) (F := C);
[ intros k H7; try exact H7
| auto with geo
| auto with geo
| auto with geo
| auto with geo ].
apply colineaire_alignes with (- k + 1); auto.
replace (vec A B) with (add_PP (mult_PP (-1) (vec B C)) (vec A C));
[ idtac | Ringvec ].
rewrite H7; Ringvec.
deroule_triangle A B C.
red in |- *; intros; apply H6.
elim orthogonal_paralleles with (A := A) (B := C) (C := B) (E := C) (F := B);
[ intros k H11; try exact H11
| auto with geo
| auto with geo
| auto with geo
| auto with geo ].
apply colineaire_alignes with (- k + 1); auto.
replace (vec A C) with (add_PP (mult_PP (-1) (vec C B)) (vec A B));
[ idtac | Ringvec ].
rewrite H11; Ringvec.
Qed.
Lemma triangle_distincts_pied_hauteur :
forall A B C H : PO,
triangle A B C -> H = projete_orthogonal A B C -> C <> H :>PO.
intros.
deroule_triangle A B C.
elim (def_projete_orthogonal2 (A:=A) (B:=B) (C:=C) (H:=H)); auto; intros.
red in |- *; intros; apply H2.
rewrite H8; auto.
Qed.
Require Export Droite_espace.
Lemma triangle_hauteurs_secantes :
forall A B C H K : PO,
triangle A B C ->
H = projete_orthogonal A B C ->
K = projete_orthogonal A C B -> concours (droite C H) (droite B K).
intros.
deroule_triangle A B C.
elim (def_projete_orthogonal2 (A:=A) (B:=B) (C:=C) (H:=H)); auto; intros.
elim (def_projete_orthogonal2 (A:=A) (B:=C) (C:=B) (H:=K)); auto; intros.
cut (C <> H); intros.
cut (B <> K); intros.
elim (position_relative_droites_coplanaires (A:=C) (B:=H) (C:=B) (D:=K));
auto with geo; intros.
absurd (paralleles (droite C H) (droite B K)); auto.
apply angle_non_paralleles; auto.
rewrite
(angles_droites_orthogonales (A:=A) (B:=C) (C:=A) (D:=B) (E:=B) (F:=K)
(G:=C) (I:=H)); auto with geo.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=C) (C:=B) (H:=K));
auto with geo.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=B) (C:=C) (H:=H));
auto with geo.
Qed.
Lemma aux :
forall A B C H K : PO,
triangle A B C ->
H = projete_orthogonal A B C :>PO ->
K = projete_orthogonal A C B :>PO -> ~ alignes C H B \/ ~ alignes C H K.
intros.
deroule_triangle A B C.
elim (def_projete_orthogonal2 (A:=A) (B:=B) (C:=C) (H:=H)); auto; intros.
elim (def_projete_orthogonal2 (A:=A) (B:=C) (C:=B) (H:=K)); auto; intros.
cut (C <> H); intros.
cut (B <> K); intros.
elim (classic (orthogonal (vec B A) (vec B C))); intros.
cut (H = B); intros.
right; try assumption.
rewrite H14.
cut (~ orthogonal (vec A C) (vec B C)); intros.
red in |- *; intros; apply H15.
assert (alignes B K C); auto with geo.
halignes H17 ipattern:(k).
apply ortho_sym.
rewrite H18.
Simplortho.
elim triangle_rectangle_une_fois with (A := B) (B := A) (C := C);
[ try clear triangle_rectangle_une_fois; intros | auto with geo | auto ].
red in |- *; intros; apply H16.
auto with geo.
apply unicite_projete_orthogonal with (2 := H7) (3 := H8); auto with geo.
left.
red in |- *; intros; apply H13.
halignes H14 ipattern:(k).
apply ortho_sym.
replace (vec B C) with (mult_PP (-1) (vec C B)); [ idtac | Ringvec ].
rewrite H15.
replace (mult_PP (-1) (mult_PP k (vec C H))) with (mult_PP k (vec H C));
[ idtac | Ringvec ].
Simplortho.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=C) (C:=B) (H:=K));
auto with geo.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=B) (C:=C) (H:=H)); auto.
Qed.
Lemma existence_intersection_deux_hauteurs_triangle :
forall A B C H K : PO,
triangle A B C ->
H = projete_orthogonal A B C :>PO ->
K = projete_orthogonal A C B :>PO ->
ex (fun I : PO => I = pt_intersection (droite C H) (droite B K) :>PO).
intros.
cut (~ alignes C H B \/ ~ alignes C H K); intros.
apply existence_pt_intersection; auto.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=B) (C:=C) (H:=H)); auto.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=C) (C:=B) (H:=K));
auto with geo.
apply triangle_hauteurs_secantes with (A := A); auto.
apply aux with (A := A); auto.
Qed.
Parameter orthocentre : PO -> PO -> PO -> PO.
Axiom
orthocentre_def :
forall A B C H : PO,
orthogonal (vec H A) (vec B C) ->
orthogonal (vec H B) (vec A C) ->
orthogonal (vec H C) (vec A B) -> H = orthocentre A B C :>PO.
Axiom
orthocentre_def2 :
forall A B C H : PO,
H = orthocentre A B C :>PO ->
(orthogonal (vec H A) (vec B C) /\ orthogonal (vec H B) (vec A C)) /\
orthogonal (vec H C) (vec A B).
Lemma orthocentre_ordre :
forall A B C H : PO,
triangle A B C -> H = orthocentre A B C :>PO -> H = orthocentre C A B :>PO.
intros.
elim orthocentre_def2 with (A := A) (B := B) (C := C) (H := H);
[ intros | auto ].
elim H2; intros H4 H5; try clear H2; try exact H5.
apply orthocentre_def; auto with geo.
Qed.
Lemma orthocentre_permute :
forall A B C H : PO,
triangle A B C -> H = orthocentre A B C :>PO -> H = orthocentre B A C :>PO.
intros.
elim orthocentre_def2 with (A := A) (B := B) (C := C) (H := H);
[ intros | auto ].
elim H2; intros H4 H5; try clear H2; try exact H5.
apply orthocentre_def; auto with geo.
Qed.
Hint Immediate orthocentre_ordre orthocentre_permute: geo.
Lemma orthocentre_triangle_rectangle :
forall A B C : PO,
triangle A B C ->
orthogonal (vec A B) (vec B C) -> B = orthocentre A B C :>PO.
intros.
apply orthocentre_def; auto with geo.
replace (vec B B) with zero; auto with geo.
Ringvec.
Qed.
Lemma intersection_deux_hauteurs_orthocentre_triangle :
forall A B C H K I : PO,
triangle A B C ->
H = projete_orthogonal A B C :>PO ->
K = projete_orthogonal A C B :>PO ->
I = pt_intersection (droite C H) (droite B K) :>PO ->
I = orthocentre A B C :>PO.
intros A B C H K I H0 H2 H3 H4.
deroule_triangle A B C.
elim (def_projete_orthogonal2 (A:=A) (B:=B) (C:=C) (H:=H)); auto; intros.
elim (def_projete_orthogonal2 (A:=A) (B:=C) (C:=B) (H:=K)); auto; intros.
cut (C <> H); intros.
cut (B <> K); intros.
cut (~ alignes C H B \/ ~ alignes C H K); intros.
elim def_pt_intersection2 with (A := C) (B := H) (C := B) (D := K) (I := I);
[ try clear def_pt_intersection2; intros | auto | auto | auto | auto ].
halignes H16 ipattern:(k).
halignes H15 ipattern:(k0).
cut (orthogonal (vec I B) (vec A C) /\ orthogonal (vec I C) (vec A B));
intros.
elim H19; intros H20 H21; try clear H19; try exact H21.
apply orthocentre_def; auto.
apply deux_hauteurs_trois.
auto with geo.
auto with geo.
split; [ idtac | try assumption ].
replace (vec I B) with (mult_PP (-1) (vec B I)).
rewrite H17.
replace (mult_PP (-1) (mult_PP k (vec B K))) with (mult_PP k (vec K B)).
Simplortho.
Ringvec.
Ringvec.
replace (vec I C) with (mult_PP (-1) (vec C I)).
rewrite H18.
replace (mult_PP (-1) (mult_PP k0 (vec C H))) with (mult_PP k0 (vec H C)).
Simplortho.
Ringvec.
Ringvec.
apply aux with (A := A); auto.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=C) (C:=B) (H:=K));
auto with geo.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=B) (C:=C) (H:=H)); auto.
Qed.
Lemma orthocentre_intersection_hauteurs :
forall A B C H K I : PO,
triangle A B C ->
H = projete_orthogonal A B C :>PO ->
K = projete_orthogonal A C B :>PO ->
I = orthocentre A B C :>PO ->
I = pt_intersection (droite C H) (droite B K) :>PO.
intros.
elim orthocentre_def2 with (A := A) (B := B) (C := C) (H := I);
[ intros | auto ].
elim H4; intros H6 H7; try clear H4; try exact H7.
cut (~ alignes C H B \/ ~ alignes C H K); intros.
deroule_triangle A B C.
elim (def_projete_orthogonal2 (A:=A) (B:=B) (C:=C) (H:=H)); auto; intros.
elim (def_projete_orthogonal2 (A:=A) (B:=C) (C:=B) (H:=K)); auto; intros.
cut (C <> H); intros.
cut (B <> K); intros.
apply def_pt_intersection; auto.
elim
orthogonal_colineaires
with (A := A) (B := B) (C := H) (D := C) (E := C) (F := I);
[ intros k H18; try exact H18
| auto with geo
| auto with geo
| auto with geo
| auto with geo ].
apply colineaire_alignes with (- k); auto.
rewrite H18; Ringvec.
elim
orthogonal_colineaires
with (A := A) (B := C) (C := K) (D := B) (E := B) (F := I);
[ intros k H18; try exact H18
| auto with geo
| auto with geo
| auto with geo
| auto with geo ].
apply colineaire_alignes with (- k); auto.
rewrite H18; Ringvec.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=C) (C:=B) (H:=K));
auto with geo.
apply (triangle_distincts_pied_hauteur (A:=A) (B:=B) (C:=C) (H:=H)); auto.
apply aux with (A := A); auto.
Qed.