File size: 965 Bytes
1c3ffd8 |
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 |
import Mathlib
set_option linter.unusedVariables.analyzeTactics true
open Nat
lemma imo_1959_p1_1
(n : β) :
Nat.gcd (21 * n + 4) (14 * n + 3) = Nat.gcd (7 * n + 1) (14 * n + 3) := by
have gβ: (21 * n + 4) = (7*n + 1) + 1 * (14 * n + 3) := by linarith
rw [gβ]
exact gcd_add_mul_right_left (7 * n + 1) (14 * n + 3) 1
lemma imo_1959_p1_2
(n : β) :
Nat.gcd (7 * n + 1) (14 * n + 3) = Nat.gcd (7 * n + 1) 1 := by
have gβ: 14 * n + 3 = (7 * n + 1) * 2 + 1 := by linarith
rw [gβ]
exact gcd_mul_left_add_right (7 * n + 1) 1 2
lemma imo_1959_p1_3
(n : β) :
Nat.gcd (7 * n + 1) 1 = 1 := by
exact Nat.gcd_one_right (7 * n + 1)
lemma imo_1959_p1_4
(n : β)
(hβ : Nat.gcd (21 * n + 4) (14 * n + 3) = Nat.gcd (7 * n + 1) (14 * n + 3))
(hβ : Nat.gcd (7 * n + 1) (14 * n + 3) = Nat.gcd (7 * n + 1) 1)
(hβ : Nat.gcd (7 * n + 1) 1 = 1) :
Nat.gcd (21 * n + 4) (14 * n + 3) = 1 := by
rw [β hβ, β hβ, β hβ]
|