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

tactic: rw [mem_shadow_iterate_iff_exists_card]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ t ∈ ∂ ^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k
state_after: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ (∃ u, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜) ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k

tactic: constructor
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ (∃ u, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜) ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k
state_after: case mp
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ (∃ u, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜) → ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k

case mpr
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ (∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k) → ∃ u, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜

tactic: rintro ⟨u, rfl, htu, hsuA⟩
state_before: case mp
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ (∃ u, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜) → ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k
state_after: case mp.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
r : ℕ
u : Finset α
htu : Disjoint t u
hsuA : t ∪ u ∈ 𝒜
⊢ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = u.card

tactic: exact ⟨_, hsuA, subset_union_left, by rw [union_sdiff_cancel_left htu]⟩
state_before: case mp.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
r : ℕ
u : Finset α
htu : Disjoint t u
hsuA : t ∪ u ∈ 𝒜
⊢ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = u.card
state_after: no goals

tactic: rw [union_sdiff_cancel_left htu]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
r : ℕ
u : Finset α
htu : Disjoint t u
hsuA : t ∪ u ∈ 𝒜
⊢ ((t ∪ u) \ t).card = u.card
state_after: no goals

tactic: rintro ⟨s, hs, hts, rfl⟩
state_before: case mpr
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
⊢ (∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k) → ∃ u, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜
state_after: case mpr.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t : Finset α
a : α
r : ℕ
s : Finset α
hs : s ∈ 𝒜
hts : t ⊆ s
⊢ ∃ u, u.card = (s \ t).card ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜

tactic: refine ⟨s \ t, rfl, disjoint_sdiff, ?_⟩
state_before: case mpr.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t : Finset α
a : α
r : ℕ
s : Finset α
hs : s ∈ 𝒜
hts : t ⊆ s
⊢ ∃ u, u.card = (s \ t).card ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜
state_after: case mpr.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t : Finset α
a : α
r : ℕ
s : Finset α
hs : s ∈ 𝒜
hts : t ⊆ s
⊢ t ∪ s \ t ∈ 𝒜

tactic: rwa [union_sdiff_self_eq_union, union_eq_right.2 hts]
state_before: case mpr.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t : Finset α
a : α
r : ℕ
s : Finset α
hs : s ∈ 𝒜
hts : t ⊆ s
⊢ t ∪ s \ t ∈ 𝒜
state_after: no goals