internlm/Lean-Github huggingface dataset:
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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⟩
Tactic:
contradiction
Proof state after:
no goals
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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⟩
Tactic:
simp only [Finset.mem_subtype, Subtype.forall] at hxy
Proof state after:
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
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)
⊢ ⟨x, hx⟩ = ⟨y, hy⟩
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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
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)
⊢ ⟨x, hx⟩ = ⟨y, hy⟩
Tactic:
rw [Subtype.mk.injEq]
Proof state after:
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
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)
⊢ x = y
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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
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)
⊢ x = y
Tactic:
ext a
Proof state after:
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
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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
Tactic:
intro ha
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
ha : a ∈ x
⊢ a ∈ y
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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
ha : a ∈ x
⊢ a ∈ y
Tactic:
have h6 : ¬ a = s := by intro has; rw [has] at ha; contradiction
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
ha : a ∈ x
h6 : ¬a = s
⊢ a ∈ y
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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
ha : a ∈ x
h6 : ¬a = s
⊢ a ∈ y
Tactic:
rwa [←hxy a h6]
Proof state after:
no goals
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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
ha : a ∈ x
⊢ ¬a = s
Tactic:
intro has
Proof state after:
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
ha : a ∈ x
has : a = s
⊢ False
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
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
ha : a ∈ x
has : a = s
⊢ False
Tactic:
rw [has] at ha
Proof state after:
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
ha : s ∈ x
has : a = s
⊢ False