Theorem: Finset.mem_upShadow_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 α
inst✝ : Fintype α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ s ∈ (∂⁺ ^[k]) 𝒜 ↔ ∃ t, t ∈ 𝒜 ∧ t ⊆ s ∧ card t + k = card s

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

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

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

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

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

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

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

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

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

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

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

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

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

tactic: obtain ⟨u, htu, hus, hu⟩ :=
  Finset.exists_intermediate_set 1
    (by
      rw [add_comm, ← hcard]
      exact add_le_add_left (succ_le_of_lt (zero_lt_succ _)) _)
    hts
state_before: case succ.mpr.intro.intro.intro
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hts : t ⊆ s
hcard : card t + succ k = card s
⊢ ∃ t, t ∈ (∂⁺ ) 𝒜 ∧ t ⊆ s ∧ card t + k = card s

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

tactic: refine' ⟨u, mem_upShadow_iff_exists_mem_card_add_one.2 ⟨t, ht, htu, hu.symm⟩, hus, _⟩
state_before: case succ.mpr.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hts : t ⊆ s
hcard : card t + succ k = card s
u : Finset α
htu : t ⊆ u
hus : u ⊆ s
hu : card u = card t + 1
⊢ ∃ t, t ∈ (∂⁺ ) 𝒜 ∧ t ⊆ s ∧ card t + k = card s

tactic: rw [hu, ← hcard, add_right_comm]
state_before: case succ.mpr.intro.intro.intro.intro.intro.intro
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hts : t ⊆ s
hcard : card t + succ k = card s
u : Finset α
htu : t ⊆ u
hus : u ⊆ s
hu : card u = card t + 1
⊢ card u + k = card s

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

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

tactic: exact add_le_add_left (succ_le_of_lt (zero_lt_succ _)) _
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜✝ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
k✝ r k : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
ht : t ∈ 𝒜
hts : t ⊆ s
hcard : card t + succ k = card s
⊢ card t + 1 ≤ card t + succ k