α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
h :
  filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆
    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))
⊢ card (filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts) ≤ 2 ^ (card F - 1)

case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
⊢ filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆
    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
⊢ card (filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts) ≤ 2 ^ (card F - 1)
suffices h :
  ((atomise s F).parts.filter fun u ↦ u ⊆ t ∧ u.Nonempty) ⊆
    (F.erase t).powerset.image fun P ↦ s.filter fun i ↦ ∀ x ∈ F, x ∈ insert t P ↔ i ∈ x
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
⊢ ∀ ⦃x : Finset α⦄,
    x ∈ filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts →
      x ∈ image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
⊢ filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆
    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))
rw [subset_iff]
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
⊢ ∀ ⦃x : Finset α⦄ (x_1 : α),
    x_1 ∈ x →
      ∀ (x_2 : Finset (Finset α)),
        x_2 ⊆ F →
          filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ x_2 ↔ i ∈ u)) s = x →
            x ⊆ t →
              ∀ (x_4 : α),
                x_4 ∈ x →
                  ∃ a, a ⊆ erase F t ∧ filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t a ↔ i ∈ x)) s = x
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
⊢ ∀ ⦃x : Finset α⦄,
    x ∈ filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts →
      x ∈ image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))
simp_rw [mem_image, mem_powerset, mem_filter, and_imp, Finset.Nonempty, exists_imp, mem_atomise,
  and_imp, Finset.Nonempty, exists_imp]
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P✝ : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
i : α
P : Finset (Finset α)
PQ : P ⊆ F
hi : i ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
hy₂ : filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s ⊆ t
j : α
_hj : j ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
⊢ ∃ a,
    a ⊆ erase F t ∧
      filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t a ↔ i ∈ x)) s =
        filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
⊢ ∀ ⦃x : Finset α⦄ (x_1 : α),
    x_1 ∈ x →
      ∀ (x_2 : Finset (Finset α)),
        x_2 ⊆ F →
          filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ x_2 ↔ i ∈ u)) s = x →
            x ⊆ t →
              ∀ (x_4 : α),
                x_4 ∈ x →
                  ∃ a, a ⊆ erase F t ∧ filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t a ↔ i ∈ x)) s = x
rintro P' i hi P PQ rfl hy₂ j _hj
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P✝ : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
i : α
P : Finset (Finset α)
PQ : P ⊆ F
hi : i ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
hy₂ : filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s ⊆ t
j : α
_hj : j ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
⊢ filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t (erase P t) ↔ i ∈ x)) s =
    filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P✝ : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
i : α
P : Finset (Finset α)
PQ : P ⊆ F
hi : i ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
hy₂ : filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s ⊆ t
j : α
_hj : j ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
⊢ ∃ a,
    a ⊆ erase F t ∧
      filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t a ↔ i ∈ x)) s =
        filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
refine' ⟨P.erase t, erase_subset_erase _ PQ, _⟩
no goals
case h
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P✝ : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
i : α
P : Finset (Finset α)
PQ : P ⊆ F
hi : i ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
hy₂ : filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s ⊆ t
j : α
_hj : j ∈ filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
⊢ filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t (erase P t) ↔ i ∈ x)) s =
    filter (fun i => ∀ (u : Finset α), u ∈ F → (u ∈ P ↔ i ∈ u)) s
simp only [insert_erase (((mem_filter.1 hi).2 _ ht).2 <| hy₂ hi)]
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
h :
  filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆
    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))
⊢ card (powerset (erase F t)) ≤ 2 ^ (card F - 1)
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
h :
  filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆
    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))
⊢ card (filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts) ≤ 2 ^ (card F - 1)
refine' (card_le_of_subset h).trans (card_image_le.trans _)
no goals
α : Type u_1
inst✝ : DecidableEq α
s t : Finset α
P : Finpartition s
F : Finset (Finset α)
ht : t ∈ F
h :
  filter (fun u => u ⊆ t ∧ Finset.Nonempty u) (atomise s F).parts ⊆
    image (fun P => filter (fun i => ∀ (x : Finset α), x ∈ F → (x ∈ insert t P ↔ i ∈ x)) s) (powerset (erase F t))
⊢ card (powerset (erase F t)) ≤ 2 ^ (card F - 1)
rw [card_powerset, card_erase_of_mem ht]