internlm/Lean-Github huggingface dataset:
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s1 ∪ s2
⊢ f (s1 ∪ s2) = f s1
Tactic:
unfold_let f
Proof state after:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s1 ∪ s2
⊢ (fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)) (s1 ∪ s2) =
    (fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)) s1
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s1 ∪ s2
⊢ (fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)) (s1 ∪ s2) =
    (fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)) s1
Tactic:
simp only [Finset.mem_union] at hss
Proof state after:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s1 ∨ s ∈ s2
⊢ (fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)) (s1 ∪ s2) =
    (fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)) s1
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s1 ∨ s ∈ s2
⊢ (fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)) (s1 ∪ s2) =
    (fun x => if s ∈ x then Color.red else f' (Finset.subtype (fun a => a ≠ s) x)) s1
Tactic:
simp only [Finset.mem_union, hss, dite_eq_ite, ite_true]
Proof state after:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s1 ∨ s ∈ s2
⊢ Color.red = if s ∈ s1 then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case h.left.intro.intro.inr.inl.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s1
⊢ Color.red = if s ∈ s1 then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)
Tactic:
simp [hss]
Proof state after:
no goals
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case pos
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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s2
h : s ∈ s1
⊢ Color.red = Color.red
Tactic:
rfl
Proof state after:
no goals
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case neg
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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∈ s2
h : s ∉ s1
⊢ Color.red = f' (Finset.subtype (fun a => a ≠ s) s1)
Tactic:
simp only [h, f] at hfs1
Proof state after:
case neg
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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hss : s ∈ s2
h : s ∉ s1
hfs1 : ¬(if False then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)) = Color.blue
⊢ Color.red = f' (Finset.subtype (fun a => a ≠ s) s1)
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case neg
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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hss : s ∈ s2
h : s ∉ s1
hfs1 : ¬(if False then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)) = Color.blue
⊢ Color.red = f' (Finset.subtype (fun a => a ≠ s) s1)
Tactic:
match h20 : (f' (Finset.subtype (fun a => ¬a = s) s1)) with
| Color.blue => exact (hfs1 h20).elim
| Color.red => rfl
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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hss : s ∈ s2
h : s ∉ s1
hfs1 : ¬(if False then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)) = Color.blue
h20 : f' (Finset.subtype (fun a => ¬a = s) s1) = Color.blue
⊢ Color.red = Color.blue
Tactic:
exact (hfs1 h20).elim
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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hss : s ∈ s2
h : s ∉ s1
hfs1 : ¬(if False then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)) = Color.blue
h20 : f' (Finset.subtype (fun a => ¬a = s) s1) = Color.red
⊢ Color.red = Color.red
Tactic:
rfl
Proof state after:
no goals
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∉ s1 ∪ s2
⊢ f (s1 ∪ s2) = f s1
Tactic:
simp only [hss, dite_false, f, S']
Proof state after:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∉ s1 ∪ s2
⊢ (if False then Color.red else f' (Finset.subtype (fun a => a ≠ s) (s1 ∪ s2))) =
    if s ∈ s1 then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)
Theorem: Usa2002P1.usa2002_p1_generalized
Proof state before:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∉ s1 ∪ s2
⊢ (if False then Color.red else f' (Finset.subtype (fun a => a ≠ s) (s1 ∪ s2))) =
    if s ∈ s1 then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)
Tactic:
rw [Finset.mem_union, not_or] at hss
Proof state after:
case h.left.intro.intro.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
s1 s2 : Finset S
hs12 : f s1 = f s2
h4 : f s1 = Color.blue → s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue
mpr✝¹ : s ∉ s1 ∧ f' (Finset.subtype (fun a => a ≠ s) s1) = Color.blue → f s1 = Color.blue
h4' : f s2 = Color.blue → s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue
mpr✝ : s ∉ s2 ∧ f' (Finset.subtype (fun a => a ≠ s) s2) = Color.blue → f s2 = Color.blue
hfs1 : ¬f s1 = Color.blue
hss : s ∉ s1 ∧ s ∉ s2
⊢ (if False then Color.red else f' (Finset.subtype (fun a => a ≠ s) (s1 ∪ s2))) =
    if s ∈ s1 then Color.red else f' (Finset.subtype (fun a => a ≠ s) s1)