File: Mathlib/Combinatorics/SetFamily/Shadow.lean

full_name: Finset.shadow
code: /-- The shadow of a set family `𝒜` is all sets we can get by removing one element from any set in
`𝒜`, and the (`k` times) iterated shadow (`shadow^[k]`) is all sets we can get by removing `k`
elements from any set in `𝒜`. -/
def shadow (𝒜 : Finset (Finset α)) : Finset (Finset α) 
goal: Finset (Finset α)

full_name: FinsetFamily._aux_Mathlib_Combinatorics_SetFamily_Shadow___unexpand_Finset_shadow_1
code: @[inherit_doc] scoped[FinsetFamily] notation:max "∂ " => Finset.shadow
goal: Lean.PrettyPrinter.Unexpander

full_name: FinsetFamily.«_aux_Mathlib_Combinatorics_SetFamily_Shadow___macroRules_FinsetFamily_term∂_1»
code: @[inherit_doc] scoped[FinsetFamily] notation:max "∂ " => Finset.shadow
goal: Lean.Macro

full_name: Finset.shadow_empty
code: /-- The shadow of the empty set is empty. -/
@[simp]
theorem shadow_empty : ∂ (∅ : Finset (Finset α)) = ∅ 
goal: ∅.shadow = ∅

full_name: Finset.shadow_iterate_empty
code: @[simp] lemma shadow_iterate_empty (k : ℕ) : ∂^[k] (∅ : Finset (Finset α)) = ∅ 
goal: Finset.shadow^[k] ∅ = ∅

full_name: Finset.shadow_singleton_empty
code: @[simp]
theorem shadow_singleton_empty : ∂ ({∅} : Finset (Finset α)) = ∅ 
goal: {∅}.shadow = ∅

full_name: Finset.shadow_monotone
code: /-- The shadow is monotone. -/
@[mono]
theorem shadow_monotone : Monotone (shadow : Finset (Finset α) → Finset (Finset α)) 
goal: Monotone Finset.shadow

full_name: Finset.mem_shadow_iff
code: /-- `t` is in the shadow of `𝒜` iff there is a `s ∈ 𝒜` from which we can remove one element to
get `t`. -/
lemma mem_shadow_iff : t ∈ ∂ 𝒜 ↔ ∃ s ∈ 𝒜, ∃ a ∈ s, erase s a = t 
goal: t ∈ 𝒜.shadow ↔ ∃ s ∈ 𝒜, ∃ a ∈ s, s.erase a = t

full_name: Finset.erase_mem_shadow
code: theorem erase_mem_shadow (hs : s ∈ 𝒜) (ha : a ∈ s) : erase s a ∈ ∂ 𝒜 
goal: s.erase a ∈ 𝒜.shadow

full_name: Finset.mem_shadow_iff_exists_sdiff
code: /-- `t ∈ ∂𝒜` iff `t` is exactly one element less than something from `𝒜`.

See also `Finset.mem_shadow_iff_exists_mem_card_add_one`. -/
lemma mem_shadow_iff_exists_sdiff : t ∈ ∂ 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = 1 
goal: t ∈ 𝒜.shadow ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = 1

full_name: Finset.mem_shadow_iff_insert_mem
code: /-- `t` is in the shadow of `𝒜` iff we can add an element to it so that the resulting finset is in
`𝒜`. -/
lemma mem_shadow_iff_insert_mem : t ∈ ∂ 𝒜 ↔ ∃ a ∉ t, insert a t ∈ 𝒜 
goal: t ∈ 𝒜.shadow ↔ ∃ a ∉ t, insert a t ∈ 𝒜

full_name: Finset.mem_shadow_iff_exists_mem_card_add_one
code: /-- `s ∈ ∂ 𝒜` iff `s` is exactly one element less than something from `𝒜`.

See also `Finset.mem_shadow_iff_exists_sdiff`. -/
lemma mem_shadow_iff_exists_mem_card_add_one :
    t ∈ ∂ 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ s.card = t.card + 1 
goal: t ∈ 𝒜.shadow ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ s.card = t.card + 1

full_name: Finset.mem_shadow_iterate_iff_exists_card
code: lemma mem_shadow_iterate_iff_exists_card :
    t ∈ ∂^[k] 𝒜 ↔ ∃ u : Finset α, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜 
goal: t ∈ Finset.shadow^[k] 𝒜 ↔ ∃ u, u.card = k ∧ Disjoint t u ∧ t ∪ u ∈ 𝒜

full_name: Finset.mem_shadow_iterate_iff_exists_sdiff
code: /-- `t ∈ ∂^k 𝒜` iff `t` is exactly `k` elements less than something from `𝒜`.

See also `Finset.mem_shadow_iff_exists_mem_card_add`. -/
lemma mem_shadow_iterate_iff_exists_sdiff : t ∈ ∂^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k 
goal: t ∈ Finset.shadow^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ (s \ t).card = k

full_name: Finset.mem_shadow_iterate_iff_exists_mem_card_add
code: /-- `t ∈ ∂^k 𝒜` iff `t` is exactly `k` elements less than something in `𝒜`.

See also `Finset.mem_shadow_iterate_iff_exists_sdiff`. -/
lemma mem_shadow_iterate_iff_exists_mem_card_add :
    t ∈ ∂^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ s.card = t.card + k 
goal: t ∈ Finset.shadow^[k] 𝒜 ↔ ∃ s ∈ 𝒜, t ⊆ s ∧ s.card = t.card + k

full_name: Set.Sized.shadow
code: /-- The shadow of a family of `r`-sets is a family of `r - 1`-sets. -/
protected theorem _root_.Set.Sized.shadow (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
    (∂ 𝒜 : Set (Finset α)).Sized (r - 1) 
goal: Set.Sized (r - 1) ↑𝒜.shadow

full_name: Set.Sized.shadow_iterate
code: /-- The `k`-th shadow of a family of `r`-sets is a family of `r - k`-sets. -/
lemma _root_.Set.Sized.shadow_iterate (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
    (∂^[k] 𝒜 : Set (Finset α)).Sized (r - k) 
goal: Set.Sized (r - k) ↑(Finset.shadow^[k] 𝒜)

full_name: Finset.sized_shadow_iff
code: theorem sized_shadow_iff (h : ∅ ∉ 𝒜) :
    (∂ 𝒜 : Set (Finset α)).Sized r ↔ (𝒜 : Set (Finset α)).Sized (r + 1) 
goal: Set.Sized r ↑𝒜.shadow ↔ Set.Sized (r + 1) ↑𝒜

full_name: Finset.exists_subset_of_mem_shadow
code: /-- Being in the shadow of `𝒜` means we have a superset in `𝒜`. -/
lemma exists_subset_of_mem_shadow (hs : t ∈ ∂ 𝒜) : ∃ s ∈ 𝒜, t ⊆ s 
goal: ∃ s ∈ 𝒜, t ⊆ s

full_name: Finset.upShadow
code: /-- The upper shadow of a set family `𝒜` is all sets we can get by adding one element to any set in
`𝒜`, and the (`k` times) iterated upper shadow (`upShadow^[k]`) is all sets we can get by adding
`k` elements from any set in `𝒜`. -/
def upShadow (𝒜 : Finset (Finset α)) : Finset (Finset α) 
goal: Finset (Finset α)

full_name: FinsetFamily.«_aux_Mathlib_Combinatorics_SetFamily_Shadow___macroRules_FinsetFamily_term∂⁺_1»
code: @[inherit_doc] scoped[FinsetFamily] notation:max "∂⁺ " => Finset.upShadow
goal: Lean.Macro

full_name: FinsetFamily._aux_Mathlib_Combinatorics_SetFamily_Shadow___unexpand_Finset_upShadow_1
code: @[inherit_doc] scoped[FinsetFamily] notation:max "∂⁺ " => Finset.upShadow
goal: Lean.PrettyPrinter.Unexpander

full_name: Finset.upShadow_empty
code: /-- The upper shadow of the empty set is empty. -/
@[simp]
theorem upShadow_empty : ∂⁺ (∅ : Finset (Finset α)) = ∅ 
goal: ∅.upShadow = ∅

full_name: Finset.upShadow_monotone
code: /-- The upper shadow is monotone. -/
@[mono]
theorem upShadow_monotone : Monotone (upShadow : Finset (Finset α) → Finset (Finset α)) 
goal: Monotone Finset.upShadow

full_name: Finset.mem_upShadow_iff
code: /-- `t` is in the upper shadow of `𝒜` iff there is a `s ∈ 𝒜` from which we can remove one element
to get `t`. -/
lemma mem_upShadow_iff : t ∈ ∂⁺ 𝒜 ↔ ∃ s ∈ 𝒜, ∃ a ∉ s, insert a s = t 
goal: t ∈ 𝒜.upShadow ↔ ∃ s ∈ 𝒜, ∃ a ∉ s, insert a s = t

full_name: Finset.insert_mem_upShadow
code: theorem insert_mem_upShadow (hs : s ∈ 𝒜) (ha : a ∉ s) : insert a s ∈ ∂⁺ 𝒜 
goal: insert a s ∈ 𝒜.upShadow

full_name: Finset.mem_upShadow_iff_exists_sdiff
code: /-- `t` is in the upper shadow of `𝒜` iff `t` is exactly one element more than something from `𝒜`.

See also `Finset.mem_upShadow_iff_exists_mem_card_add_one`. -/
lemma mem_upShadow_iff_exists_sdiff : t ∈ ∂⁺ 𝒜 ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ (t \ s).card = 1 
goal: t ∈ 𝒜.upShadow ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ (t \ s).card = 1

full_name: Finset.mem_upShadow_iff_erase_mem
code: /-- `t` is in the upper shadow of `𝒜` iff we can remove an element from it so that the resulting
finset is in `𝒜`. -/
lemma mem_upShadow_iff_erase_mem : t ∈ ∂⁺ 𝒜 ↔ ∃ a, a ∈ t ∧ erase t a ∈ 𝒜 
goal: t ∈ 𝒜.upShadow ↔ ∃ a ∈ t, t.erase a ∈ 𝒜

full_name: Finset.mem_upShadow_iff_exists_mem_card_add_one
code: /-- `t` is in the upper shadow of `𝒜` iff `t` is exactly one element less than something from `𝒜`.

See also `Finset.mem_upShadow_iff_exists_sdiff`. -/
lemma mem_upShadow_iff_exists_mem_card_add_one :
    t ∈ ∂⁺ 𝒜 ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ t.card = s.card + 1 
goal: t ∈ 𝒜.upShadow ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ t.card = s.card + 1

full_name: Finset.mem_upShadow_iterate_iff_exists_card
code: lemma mem_upShadow_iterate_iff_exists_card :
    t ∈ ∂⁺^[k] 𝒜 ↔ ∃ u : Finset α, u.card = k ∧ u ⊆ t ∧ t \ u ∈ 𝒜 
goal: t ∈ Finset.upShadow^[k] 𝒜 ↔ ∃ u, u.card = k ∧ u ⊆ t ∧ t \ u ∈ 𝒜

full_name: Finset.mem_upShadow_iterate_iff_exists_sdiff
code: /-- `t` is in the upper shadow of `𝒜` iff `t` is exactly `k` elements less than something from `𝒜`.

See also `Finset.mem_upShadow_iff_exists_mem_card_add`. -/
lemma mem_upShadow_iterate_iff_exists_sdiff :
    t ∈ ∂⁺^[k] 𝒜 ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ (t \ s).card = k 
goal: t ∈ Finset.upShadow^[k] 𝒜 ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ (t \ s).card = k

full_name: Finset.mem_upShadow_iterate_iff_exists_mem_card_add
code: /-- `t ∈ ∂⁺^k 𝒜` iff `t` is exactly `k` elements less than something in `𝒜`.

See also `Finset.mem_upShadow_iterate_iff_exists_sdiff`. -/
lemma mem_upShadow_iterate_iff_exists_mem_card_add :
    t ∈ ∂⁺^[k] 𝒜 ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ t.card = s.card + k 
goal: t ∈ Finset.upShadow^[k] 𝒜 ↔ ∃ s ∈ 𝒜, s ⊆ t ∧ t.card = s.card + k

full_name: Set.Sized.upShadow
code: /-- The upper shadow of a family of `r`-sets is a family of `r + 1`-sets. -/
protected lemma _root_.Set.Sized.upShadow (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
    (∂⁺ 𝒜 : Set (Finset α)).Sized (r + 1) 
goal: Set.Sized (r + 1) ↑𝒜.upShadow

full_name: Finset.exists_subset_of_mem_upShadow
code: /-- Being in the upper shadow of `𝒜` means we have a superset in `𝒜`. -/
theorem exists_subset_of_mem_upShadow (hs : s ∈ ∂⁺ 𝒜) : ∃ t ∈ 𝒜, t ⊆ s 
goal: ∃ t ∈ 𝒜, t ⊆ s

full_name: Finset.mem_upShadow_iff_exists_mem_card_add
code: /-- `t ∈ ∂^k 𝒜` iff `t` is exactly `k` elements more than something in `𝒜`. -/
theorem mem_upShadow_iff_exists_mem_card_add :
    s ∈ ∂⁺ ^[k] 𝒜 ↔ ∃ t ∈ 𝒜, t ⊆ s ∧ t.card + k = s.card 
goal: s ∈ Finset.upShadow^[k] 𝒜 ↔ ∃ t ∈ 𝒜, t ⊆ s ∧ t.card + k = s.card

full_name: Finset.shadow_compls
code: @[simp] lemma shadow_compls : ∂ 𝒜ᶜˢ = (∂⁺ 𝒜)ᶜˢ 
goal: 𝒜.compls.shadow = 𝒜.upShadow.compls

full_name: Finset.upShadow_compls
code: @[simp] lemma upShadow_compls : ∂⁺ 𝒜ᶜˢ = (∂ 𝒜)ᶜˢ 
goal: 𝒜.compls.upShadow = 𝒜.shadow.compls