Theorem: Finset.card_truncatedInf_union_add_card_truncatedInf_sups
File: Mathlib/Combinatorics/SetFamily/AhlswedeZhang.lean

tactic: by_cases h𝒜 : s ∈ upperClosure (𝒜 : Set $ Finset α) <;>
  by_cases hℬ : s ∈ upperClosure (ℬ : Set $ Finset α)
state_before: α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card
state_after: case pos
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∈ upperClosure ↑𝒜
hℬ : s ∈ upperClosure ↑ℬ
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card

case neg
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∈ upperClosure ↑𝒜
hℬ : s ∉ upperClosure ↑ℬ
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card

case pos
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∉ upperClosure ↑𝒜
hℬ : s ∈ upperClosure ↑ℬ
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card

case neg
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∉ upperClosure ↑𝒜
hℬ : s ∉ upperClosure ↑ℬ
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card

tactic: rw [truncatedInf_union h𝒜 hℬ, truncatedInf_sups h𝒜 hℬ]
state_before: case pos
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∈ upperClosure ↑𝒜
hℬ : s ∈ upperClosure ↑ℬ
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card
state_after: case pos
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∈ upperClosure ↑𝒜
hℬ : s ∈ upperClosure ↑ℬ
⊢ (𝒜.truncatedInf s ⊓ ℬ.truncatedInf s).card + (𝒜.truncatedInf s ⊔ ℬ.truncatedInf s).card =
    (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card

tactic: exact card_inter_add_card_union _ _
state_before: case pos
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∈ upperClosure ↑𝒜
hℬ : s ∈ upperClosure ↑ℬ
⊢ (𝒜.truncatedInf s ⊓ ℬ.truncatedInf s).card + (𝒜.truncatedInf s ⊔ ℬ.truncatedInf s).card =
    (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card
state_after: no goals

tactic: rw [truncatedInf_union_left h𝒜 hℬ, truncatedInf_of_not_mem hℬ,
  truncatedInf_sups_of_not_mem fun h ↦ hℬ h.2]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∈ upperClosure ↑𝒜
hℬ : s ∉ upperClosure ↑ℬ
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card
state_after: no goals

tactic: rw [truncatedInf_union_right h𝒜 hℬ, truncatedInf_of_not_mem h𝒜,
  truncatedInf_sups_of_not_mem fun h ↦ h𝒜 h.1, add_comm]
state_before: case pos
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∉ upperClosure ↑𝒜
hℬ : s ∈ upperClosure ↑ℬ
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card
state_after: no goals

tactic: rw [truncatedInf_of_not_mem h𝒜, truncatedInf_of_not_mem hℬ,
  truncatedInf_union_of_not_mem h𝒜 hℬ, truncatedInf_sups_of_not_mem fun h ↦ h𝒜 h.1]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
𝒜 ℬ : Finset (Finset α)
s : Finset α
h𝒜 : s ∉ upperClosure ↑𝒜
hℬ : s ∉ upperClosure ↑ℬ
⊢ ((𝒜 ∪ ℬ).truncatedInf s).card + ((𝒜 ⊻ ℬ).truncatedInf s).card = (𝒜.truncatedInf s).card + (ℬ.truncatedInf s).card
state_after: no goals