Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case neg.inr.inr.a
k : ℕ
ih :
  ∀ {α : Type} [inst : DecidableEq α] [inst_1 : Fintype α],
    Fintype.card α = k →
      ∀ N ≤ 2 ^ k,
        ∃ f, (∀ (s1 s2 : Finset α), f s1 = f s2 → f (s1 ∪ s2) = f s1) ∧ Fintype.card { a // f a = Color.red } = N
S : Type
hde : DecidableEq S
hft : Fintype S
hs : Fintype.card S = k + 1
N : ℕ
hN : N ≤ 2 ^ (k + 1)
s : S
S' : Type := { a // a ≠ s }
hs' : Fintype.card S' = k
hg : N > 2 ^ k
hl : N - 2 ^ k ≤ 2 ^ k
f' : Finset S' → Color
hf1' : ∀ (s1 s2 : Finset S'), f' s1 = f' s2 → f' (s1 ∪ s2) = f' s1
hf2' : Fintype.card { a // f' a = Color.red } = N - 2 ^ k
f : Finset S → Color := fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)
h2 : ∀ (a : Finset S), f a = Color.blue ↔ s ∉ a ∧ f' (Finset.subtype (fun a => a ≠ s) a) = Color.blue
h2' : ∀ (a : Finset S), f a = Color.red ↔ s ∈ a ∨ f' (Finset.subtype (fun a => a ≠ s) a) = Color.red
b : { a // f a = Color.red } → { a // s ∈ a } ⊕ { a' // f' a' = Color.red } :=
  fun x =>
    match x with
    | ⟨a, ha⟩ => if h : s ∈ a then Sum.inl ⟨a, h⟩ else Sum.inr ⟨Finset.subtype (fun a => a ≠ s) a, ⋯⟩
x : Finset S
hx : f x = Color.red
y : Finset S
hy : f y = Color.red
h4 : s ∉ x
h6 : s ∉ y
hxx : f' (Finset.subtype (fun a => a ≠ s) x) = Color.red
hyy : f' (Finset.subtype (fun a => a ≠ s) y) = Color.red
hxy : ∀ (a : S), a ≠ s → (a ∈ x ↔ a ∈ y)
a : S
⊢ a ∈ x ↔ a ∈ y
Tactic:
constructor
Proof state after:
case neg.inr.inr.a.mp
k : ℕ
ih :
  ∀ {α : Type} [inst : DecidableEq α] [inst_1 : Fintype α],
    Fintype.card α = k →
      ∀ N ≤ 2 ^ k,
        ∃ f, (∀ (s1 s2 : Finset α), f s1 = f s2 → f (s1 ∪ s2) = f s1) ∧ Fintype.card { a // f a = Color.red } = N
S : Type
hde : DecidableEq S
hft : Fintype S
hs : Fintype.card S = k + 1
N : ℕ
hN : N ≤ 2 ^ (k + 1)
s : S
S' : Type := { a // a ≠ s }
hs' : Fintype.card S' = k
hg : N > 2 ^ k
hl : N - 2 ^ k ≤ 2 ^ k
f' : Finset S' → Color
hf1' : ∀ (s1 s2 : Finset S'), f' s1 = f' s2 → f' (s1 ∪ s2) = f' s1
hf2' : Fintype.card { a // f' a = Color.red } = N - 2 ^ k
f : Finset S → Color := fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)
h2 : ∀ (a : Finset S), f a = Color.blue ↔ s ∉ a ∧ f' (Finset.subtype (fun a => a ≠ s) a) = Color.blue
h2' : ∀ (a : Finset S), f a = Color.red ↔ s ∈ a ∨ f' (Finset.subtype (fun a => a ≠ s) a) = Color.red
b : { a // f a = Color.red } → { a // s ∈ a } ⊕ { a' // f' a' = Color.red } :=
  fun x =>
    match x with
    | ⟨a, ha⟩ => if h : s ∈ a then Sum.inl ⟨a, h⟩ else Sum.inr ⟨Finset.subtype (fun a => a ≠ s) a, ⋯⟩
x : Finset S
hx : f x = Color.red
y : Finset S
hy : f y = Color.red
h4 : s ∉ x
h6 : s ∉ y
hxx : f' (Finset.subtype (fun a => a ≠ s) x) = Color.red
hyy : f' (Finset.subtype (fun a => a ≠ s) y) = Color.red
hxy : ∀ (a : S), a ≠ s → (a ∈ x ↔ a ∈ y)
a : S
⊢ a ∈ x → a ∈ y

case neg.inr.inr.a.mpr
k : ℕ
ih :
  ∀ {α : Type} [inst : DecidableEq α] [inst_1 : Fintype α],
    Fintype.card α = k →
      ∀ N ≤ 2 ^ k,
        ∃ f, (∀ (s1 s2 : Finset α), f s1 = f s2 → f (s1 ∪ s2) = f s1) ∧ Fintype.card { a // f a = Color.red } = N
S : Type
hde : DecidableEq S
hft : Fintype S
hs : Fintype.card S = k + 1
N : ℕ
hN : N ≤ 2 ^ (k + 1)
s : S
S' : Type := { a // a ≠ s }
hs' : Fintype.card S' = k
hg : N > 2 ^ k
hl : N - 2 ^ k ≤ 2 ^ k
f' : Finset S' → Color
hf1' : ∀ (s1 s2 : Finset S'), f' s1 = f' s2 → f' (s1 ∪ s2) = f' s1
hf2' : Fintype.card { a // f' a = Color.red } = N - 2 ^ k
f : Finset S → Color := fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)
h2 : ∀ (a : Finset S), f a = Color.blue ↔ s ∉ a ∧ f' (Finset.subtype (fun a => a ≠ s) a) = Color.blue
h2' : ∀ (a : Finset S), f a = Color.red ↔ s ∈ a ∨ f' (Finset.subtype (fun a => a ≠ s) a) = Color.red
b : { a // f a = Color.red } → { a // s ∈ a } ⊕ { a' // f' a' = Color.red } :=
  fun x =>
    match x with
    | ⟨a, ha⟩ => if h : s ∈ a then Sum.inl ⟨a, h⟩ else Sum.inr ⟨Finset.subtype (fun a => a ≠ s) a, ⋯⟩
x : Finset S
hx : f x = Color.red
y : Finset S
hy : f y = Color.red
h4 : s ∉ x
h6 : s ∉ y
hxx : f' (Finset.subtype (fun a => a ≠ s) x) = Color.red
hyy : f' (Finset.subtype (fun a => a ≠ s) y) = Color.red
hxy : ∀ (a : S), a ≠ s → (a ∈ x ↔ a ∈ y)
a : S
⊢ a ∈ y → a ∈ x