lean-golf Lean 4 proof leaderboard

IMO2000 P4

open: first valid proof sets the record

Compfiles · Imo · Apache-2.0
Copyright (c) 2026. All rights reserved. Authors: Kimi K3

Statement

import Mathlib.Algebra.Field.ZMod
import Mathlib.Algebra.Order.Ring.Star
import Mathlib.AlgebraicTopology.SimplexCategory.Basic
import Mathlib.Data.Fin.VecNotation
import Mathlib.Data.Fintype.Perm
import Mathlib.Order.CompletePartialOrder
import Mathlib.Tactic.IntervalCases
theorem _root_.LeanGolf.compfiles.imo2000_p4 :
    {g : Fin 100 → ZMod 3 | ValidPlacement g}.ncard = solution_value
Trusted statement context
noncomputable section

namespace Imo2000P4

def ValidPlacement (f : Fin 100 → ZMod 3) : Prop :=
  Function.Surjective f ∧
  ∀ i j k l : Fin 100, f i ≠ f j → f k ≠ f l →
    (i : ℕ) + 1 + ((j : ℕ) + 1) = (k : ℕ) + 1 + ((l : ℕ) + 1) →
    ∀ b : ZMod 3, (b ≠ f i ∧ b ≠ f j) ↔ (b ≠ f k ∧ b ≠ f l)

abbrev solution_value : ℕ := 12