USA2002 P1
open: first valid proof sets the record
Compfiles · Usa · Apache-2.0
Copyright (c) 2023 David Renshaw. All rights reserved. Authors: David Renshaw
Statement
import Mathlib.Data.Fintype.Card
import Mathlib.Data.Finset.Basic
import Mathlib.Data.Finset.Card
import Mathlib.Tactic
theorem _root_.LeanGolf.compfiles.usa2002_p1
{α : Type} [DecidableEq α] [Fintype α] (hs : Fintype.card α = 2002)
(N : ℕ) (hN : N ≤ 2 ^ 2002) :
∃ f : Finset α → Color,
((∀ s1 s2 : Finset α, f s1 = f s2 → f (s1 ∪ s2) = f s1) ∧
(Fintype.card
{ a : Finset α // f a = Color.red } = N))Trusted statement context
noncomputable section
namespace Usa2002P1
inductive Color : Type where
| red : Color
| blue : Color
deriving DecidableEq
instance : Fintype Color where
elems := ⟨↑[Color.red, Color.blue], by decide⟩
complete := fun x => by cases x <;> decide