Skip to content

Commit 142ded1

Browse files
committed
feat(Archive/Imo): IMO 1963 Q5 (#18789)
proves the equality `cos (π / 7) - cos (2 * π / 7) + cos (3 * π / 7) = 1 / 2`.
1 parent 0f12054 commit 142ded1

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

Archive.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Archive.Imo.Imo1960Q2
1212
import Archive.Imo.Imo1961Q3
1313
import Archive.Imo.Imo1962Q1
1414
import Archive.Imo.Imo1962Q4
15+
import Archive.Imo.Imo1963Q5
1516
import Archive.Imo.Imo1964Q1
1617
import Archive.Imo.Imo1969Q1
1718
import Archive.Imo.Imo1972Q5

Archive/Imo/Imo1963Q5.lean

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/-
2+
Copyright (c) 2024 Rida Hamadani. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Rida Hamadani
5+
-/
6+
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Complex
7+
8+
/-!
9+
# IMO 1963 Q5
10+
11+
Prove that `cos (π / 7) - cos (2 * π / 7) + cos (3 * π / 7) = 1 / 2`.
12+
13+
The main idea of the proof is to multiply both sides by `2 * sin (π / 7)`, then the result follows
14+
through basic algebraic manipulations with the use of some trigonometric identities.
15+
16+
-/
17+
18+
open Real
19+
20+
lemma two_sin_pi_div_seven_ne_zero : 2 * sin (π / 7) ≠ 0 := by
21+
apply mul_ne_zero two_ne_zero (Real.sin_pos_of_pos_of_lt_pi _ _).ne' <;> linarith [pi_pos]
22+
23+
lemma sin_pi_mul_neg_div (a b : ℝ) : sin (π * (- a / b)) = - sin (π * (a / b)) := by
24+
ring_nf
25+
exact sin_neg _
26+
27+
theorem imo1963_q5 : cos (π / 7) - cos (2 * π / 7) + cos (3 * π / 7) = 1 / 2 := by
28+
rw [← mul_right_inj' two_sin_pi_div_seven_ne_zero, mul_add, mul_sub, ← sin_two_mul,
29+
two_mul_sin_mul_cos, two_mul_sin_mul_cos]
30+
ring_nf
31+
rw [← sin_pi_sub (π * (3 / 7)), sin_pi_mul_neg_div 2 7, sin_pi_mul_neg_div 1 7]
32+
ring_nf

Mathlib/Data/Complex/Exponential.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,18 @@ nonrec theorem cos_sub_cos : cos x - cos y = -2 * sin ((x + y) / 2) * sin ((x -
759759
nonrec theorem cos_add_cos : cos x + cos y = 2 * cos ((x + y) / 2) * cos ((x - y) / 2) :=
760760
ofReal_injective <| by simp [cos_add_cos]
761761

762+
theorem two_mul_sin_mul_sin (x y : ℝ) : 2 * sin x * sin y = cos (x - y) - cos (x + y) := by
763+
simp [cos_add, cos_sub]
764+
ring
765+
766+
theorem two_mul_cos_mul_cos (x y : ℝ) : 2 * cos x * cos y = cos (x - y) + cos (x + y) := by
767+
simp [cos_add, cos_sub]
768+
ring
769+
770+
theorem two_mul_sin_mul_cos (x y : ℝ) : 2 * sin x * cos y = sin (x - y) + sin (x + y) := by
771+
simp [sin_add, sin_sub]
772+
ring
773+
762774
nonrec theorem tan_eq_sin_div_cos : tan x = sin x / cos x :=
763775
ofReal_injective <| by simp only [ofReal_tan, tan_eq_sin_div_cos, ofReal_div, ofReal_sin,
764776
ofReal_cos]
@@ -1487,3 +1499,5 @@ theorem abs_exp_eq_iff_re_eq {x y : ℂ} : abs (exp x) = abs (exp y) ↔ x.re =
14871499
rw [abs_exp, abs_exp, Real.exp_eq_exp]
14881500

14891501
end Complex
1502+
1503+
set_option linter.style.longFile 1700

0 commit comments

Comments
 (0)