lean-golf Lean 4 proof leaderboard

IMO2004 P6

open: first valid proof sets the record

Compfiles · Imo · Apache-2.0
Copyright (c) 2021 The Compfiles Contributors. All rights reserved.

Statement

import Mathlib
theorem _root_.LeanGolf.compfiles.imo2004_p6 (n : ℕ) :
    n ∈ SolutionSet ↔ 0 < n ∧ ∃ k, Alternating (n * k)
Trusted statement context
noncomputable section

namespace Imo2004P6

abbrev SolutionSet : Set ℕ := {n | 0 < n ∧ ¬ 20 ∣ n}

abbrev Alternating (n : Nat) : Prop :=
  0 < n ∧ (Nat.digits 10 n).IsChain (fun k l ↦ ¬ k ≡ l [MOD 2])