Theorem: Finset.mem_shadow_iff_exists_mem_card_add
File: Mathlib/Combinatorics/SetFamily/Shadow.lean

tactic: induction' k with k ih generalizing 𝒜 s
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ s ∈ (∂ ^[k]) 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + k

tactic: simp only [exists_prop, Function.comp_apply, Function.iterate_succ]
state_before: case succ
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t : Finset α
a : α
k✝ r k : ℕ
ih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ (∂ ^[k]) 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + k
𝒜 : Finset (Finset α)
s : Finset α
⊢ s ∈ (∂ ^[succ k]) 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k

tactic: refine' ih.trans _
state_before: case succ
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t : Finset α
a : α
k✝ r k : ℕ
ih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ (∂ ^[k]) 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + k
𝒜 : Finset (Finset α)
s : Finset α
⊢ s ∈ (∂ ^[k]) ((∂ ) 𝒜) ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k

tactic: clear ih
state_before: case succ
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t : Finset α
a : α
k✝ r k : ℕ
ih : ∀ {𝒜 : Finset (Finset α)} {s : Finset α}, s ∈ (∂ ^[k]) 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + k
𝒜 : Finset (Finset α)
s : Finset α
⊢ (∃ t, t ∈ (∂ ) 𝒜 ∧ s ⊆ t ∧ card t = card s + k) ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k

tactic: constructor
state_before: case succ
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ (∃ t, t ∈ (∂ ) 𝒜 ∧ s ⊆ t ∧ card t = card s + k) ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k

tactic: refine' ⟨fun hs => ⟨s, hs, Subset.refl _, rfl⟩, _⟩
state_before: case zero
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t : Finset α
a : α
k r : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ s ∈ (∂ ^[zero]) 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + zero

tactic: rintro ⟨t, ht, hst, hcard⟩
state_before: case zero
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t : Finset α
a : α
k r : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + zero) → s ∈ (∂ ^[zero]) 𝒜

tactic: rwa [eq_of_subset_of_card_le hst hcard.le]
state_before: case zero.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k r : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
hcard : card t = card s + zero
⊢ s ∈ (∂ ^[zero]) 𝒜

tactic: rintro ⟨t, ht, hst, hcardst⟩
state_before: case succ.mp
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ (∃ t, t ∈ (∂ ) 𝒜 ∧ s ⊆ t ∧ card t = card s + k) → ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k

tactic: obtain ⟨u, hu, htu, hcardtu⟩ := mem_shadow_iff_exists_mem_card_add_one.1 ht
state_before: case succ.mp.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ (∂ ) 𝒜
hst : s ⊆ t
hcardst : card t = card s + k
⊢ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k

tactic: refine' ⟨u, hu, hst.trans htu, _⟩
state_before: case succ.mp.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ (∂ ) 𝒜
hst : s ⊆ t
hcardst : card t = card s + k
u : Finset α
hu : u ∈ 𝒜
htu : t ⊆ u
hcardtu : card u = card t + 1
⊢ ∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k

tactic: rw [hcardtu, hcardst]
state_before: case succ.mp.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ (∂ ) 𝒜
hst : s ⊆ t
hcardst : card t = card s + k
u : Finset α
hu : u ∈ 𝒜
htu : t ⊆ u
hcardtu : card u = card t + 1
⊢ card u = card s + succ k

tactic: rfl
state_before: case succ.mp.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ (∂ ) 𝒜
hst : s ⊆ t
hcardst : card t = card s + k
u : Finset α
hu : u ∈ 𝒜
htu : t ⊆ u
hcardtu : card u = card t + 1
⊢ card s + k + 1 = card s + succ k

tactic: rintro ⟨t, ht, hst, hcard⟩
state_before: case succ.mpr
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t ∧ card t = card s + succ k) → ∃ t, t ∈ (∂ ) 𝒜 ∧ s ⊆ t ∧ card t = card s + k

tactic: obtain ⟨u, hsu, hut, hu⟩ :=
  Finset.exists_intermediate_set k
    (by
      rw [add_comm, hcard]
      exact le_succ _)
    hst
state_before: case succ.mpr.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
hcard : card t = card s + succ k
⊢ ∃ t, t ∈ (∂ ) 𝒜 ∧ s ⊆ t ∧ card t = card s + k

tactic: rw [add_comm] at hu
state_before: case succ.mpr.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
hcard : card t = card s + succ k
u : Finset α
hsu : s ⊆ u
hut : u ⊆ t
hu : card u = k + card s
⊢ ∃ t, t ∈ (∂ ) 𝒜 ∧ s ⊆ t ∧ card t = card s + k

tactic: refine' ⟨u, mem_shadow_iff_exists_mem_card_add_one.2 ⟨t, ht, hut, _⟩, hsu, hu⟩
state_before: case succ.mpr.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
hcard : card t = card s + succ k
u : Finset α
hsu : s ⊆ u
hut : u ⊆ t
hu : card u = card s + k
⊢ ∃ t, t ∈ (∂ ) 𝒜 ∧ s ⊆ t ∧ card t = card s + k

tactic: rw [hcard, hu]
state_before: case succ.mpr.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
hcard : card t = card s + succ k
u : Finset α
hsu : s ⊆ u
hut : u ⊆ t
hu : card u = card s + k
⊢ card t = card u + 1

tactic: rfl
state_before: case succ.mpr.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
hcard : card t = card s + succ k
u : Finset α
hsu : s ⊆ u
hut : u ⊆ t
hu : card u = card s + k
⊢ card s + succ k = card s + k + 1

tactic: rw [add_comm, hcard]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
hcard : card t = card s + succ k
⊢ k + card s ≤ card t

tactic: exact le_succ _
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
hcard : card t = card s + succ k
⊢ card s + k ≤ card s + succ k