Theorem: Finset.slice_union_shadow_falling_succ
File: Mathlib/Combinatorics/SetFamily/LYM.lean

tactic: ext s
state_before: 𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ 𝒜 # k ∪ (∂ ) (falling (k + 1) 𝒜) = falling k 𝒜

tactic: simp_rw [mem_union, mem_slice, mem_shadow_iff, mem_falling]
state_before: case a
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
⊢ s ∈ 𝒜 # k ∪ (∂ ) (falling (k + 1) 𝒜) ↔ s ∈ falling k 𝒜

tactic: constructor
state_before: case a
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
⊢ (s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s) ↔
    (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k

tactic: rintro (h | ⟨s, ⟨⟨t, ht, hst⟩, hs⟩, a, ha, rfl⟩)
state_before: case a.mp
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
⊢ (s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s) →
    (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k

tactic: refine' ⟨⟨t, ht, (erase_subset _ _).trans hst⟩, _⟩
state_before: case a.mp.inr.intro.intro.intro.intro.intro.intro.intro
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
hs : card s = k + 1
t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
a : α
ha : a ∈ s
⊢ (∃ t, t ∈ 𝒜 ∧ erase s a ⊆ t) ∧ card (erase s a) = k

tactic: rw [card_erase_of_mem ha, hs]
state_before: case a.mp.inr.intro.intro.intro.intro.intro.intro.intro
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
hs : card s = k + 1
t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
a : α
ha : a ∈ s
⊢ card (erase s a) = k

tactic: rfl
state_before: case a.mp.inr.intro.intro.intro.intro.intro.intro.intro
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
hs : card s = k + 1
t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
a : α
ha : a ∈ s
⊢ k + 1 - 1 = k

tactic: exact ⟨⟨s, h.1, Subset.refl _⟩, h.2⟩
state_before: case a.mp.inl
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
h : s ∈ 𝒜 ∧ card s = k
⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k

tactic: rintro ⟨⟨t, ht, hst⟩, hs⟩
state_before: case a.mpr
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
⊢ (∃ t, t ∈ 𝒜 ∧ s ⊆ t) ∧ card s = k →
    s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s

tactic: by_cases h : s ∈ 𝒜
state_before: case a.mpr.intro.intro.intro
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
hs : card s = k
t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
⊢ s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s

tactic: obtain ⟨a, ha, hst⟩ := ssubset_iff.1 (ssubset_of_subset_of_ne hst (ht.ne_of_not_mem h).symm)
state_before: case neg
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
hs : card s = k
t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
h : ¬s ∈ 𝒜
⊢ s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s

tactic: refine' Or.inr ⟨insert a s, ⟨⟨t, ht, hst⟩, _⟩, a, mem_insert_self _ _, erase_insert ha⟩
state_before: case neg.intro.intro
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
hs : card s = k
t : Finset α
ht : t ∈ 𝒜
hst✝ : s ⊆ t
h : ¬s ∈ 𝒜
a : α
ha : ¬a ∈ s
hst : insert a s ⊆ t
⊢ s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s

tactic: rw [card_insert_of_not_mem ha, hs]
state_before: case neg.intro.intro
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
hs : card s = k
t : Finset α
ht : t ∈ 𝒜
hst✝ : s ⊆ t
h : ¬s ∈ 𝒜
a : α
ha : ¬a ∈ s
hst : insert a s ⊆ t
⊢ card (insert a s) = k + 1

tactic: exact Or.inl ⟨h, hs⟩
state_before: case pos
𝕜 : Type ?u.21156
α : Type u_1
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s✝ s : Finset α
hs : card s = k
t : Finset α
ht : t ∈ 𝒜
hst : s ⊆ t
h : s ∈ 𝒜
⊢ s ∈ 𝒜 ∧ card s = k ∨ ∃ t, ((∃ t_1, t_1 ∈ 𝒜 ∧ t ⊆ t_1) ∧ card t = k + 1) ∧ ∃ a, a ∈ t ∧ erase t a = s