lean-golf Lean 4 proof leaderboard

IMO2017 P6

open: first valid proof sets the record

Compfiles · Imo · Apache-2.0
Copyright (c) 2023 David Renshaw. All rights reserved. Authors: David Renshaw, Kimi K3

Statement

import Mathlib.Analysis.Normed.Ring.Lemmas
import Mathlib.FieldTheory.Finite.Basic
import Mathlib.Tactic.Ring
theorem _root_.LeanGolf.compfiles.imo2017_p6 (S : Finset (ℤ × ℤ)) (hS : ∀ s ∈ S, gcd s.1 s.2 = 1) :
    ∃ n : ℕ, 0 < n ∧ ∃ a : ℕ → ℤ,
      ∀ s ∈ S, ∑ i ∈ Finset.range (n + 1), a i * s.1 ^ i * s.2 ^ (n - i) = 1
Trusted statement context
noncomputable section

namespace Imo2017P6

def canon (s : ℤ × ℤ) : Prop := 0 < s.1 ∨ (s.1 = 0 ∧ 0 < s.2)

instance (s : ℤ × ℤ) : Decidable (canon s) := by
  unfold canon
  infer_instance