Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case neg.inr
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
hxy : ∀ (a : { a // a ≠ s }), a ∈ Finset.subtype (fun a => a ≠ s) x ↔ a ∈ Finset.subtype (fun a => a ≠ s) y
hxx : f' (Finset.subtype (fun a => a ≠ s) x) = Color.red
⊢ ⟨x, hx⟩ = ⟨y, hy⟩
Tactic:
cases' (h2' y).mp hy with hyy hyy
Proof state after:
case neg.inr.inl
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
hxy : ∀ (a : { a // a ≠ s }), a ∈ Finset.subtype (fun a => a ≠ s) x ↔ a ∈ Finset.subtype (fun a => a ≠ s) y
hxx : f' (Finset.subtype (fun a => a ≠ s) x) = Color.red
hyy : s ∈ y
⊢ ⟨x, hx⟩ = ⟨y, hy⟩

case neg.inr.inr
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
hxy : ∀ (a : { a // a ≠ s }), a ∈ Finset.subtype (fun a => a ≠ s) x ↔ a ∈ Finset.subtype (fun a => a ≠ s) y
hxx : f' (Finset.subtype (fun a => a ≠ s) x) = Color.red
hyy : f' (Finset.subtype (fun a => a ≠ s) y) = Color.red
⊢ ⟨x, hx⟩ = ⟨y, hy⟩