@@ -65,18 +65,18 @@ def shadow (𝒜 : Finset (Finset α)) : Finset (Finset α) :=
65
65
66
66
-- mathport name: finset.shadow
67
67
-- Porting note: added `inherit_doc` to calm linter
68
- @[inherit_doc] scoped [FinsetFamily] notation :90 "∂ " => Finset.shadow
68
+ @[inherit_doc] scoped [FinsetFamily] notation :max "∂ " => Finset.shadow
69
69
-- Porting note: had to open FinsetFamily
70
70
open FinsetFamily
71
71
72
72
/-- The shadow of the empty set is empty. -/
73
73
@[simp]
74
- theorem shadow_empty : (∂ ) (∅ : Finset (Finset α)) = ∅ :=
74
+ theorem shadow_empty : ∂ (∅ : Finset (Finset α)) = ∅ :=
75
75
rfl
76
76
#align finset.shadow_empty Finset.shadow_empty
77
77
78
78
@[simp]
79
- theorem shadow_singleton_empty : (∂ ) ({∅} : Finset (Finset α)) = ∅ :=
79
+ theorem shadow_singleton_empty : ∂ ({∅} : Finset (Finset α)) = ∅ :=
80
80
rfl
81
81
#align finset.shadow_singleton_empty Finset.shadow_singleton_empty
82
82
@@ -89,17 +89,17 @@ theorem shadow_monotone : Monotone (shadow : Finset (Finset α) → Finset (Fins
89
89
90
90
/-- `s` is in the shadow of `𝒜` iff there is an `t ∈ 𝒜` from which we can remove one element to
91
91
get `s`. -/
92
- theorem mem_shadow_iff : s ∈ (∂ ) 𝒜 ↔ ∃ t ∈ 𝒜, ∃ a ∈ t, erase t a = s := by
92
+ theorem mem_shadow_iff : s ∈ ∂ 𝒜 ↔ ∃ t ∈ 𝒜, ∃ a ∈ t, erase t a = s := by
93
93
simp only [shadow, mem_sup, mem_image]
94
94
#align finset.mem_shadow_iff Finset.mem_shadow_iff
95
95
96
- theorem erase_mem_shadow (hs : s ∈ 𝒜) (ha : a ∈ s) : erase s a ∈ (∂ ) 𝒜 :=
96
+ theorem erase_mem_shadow (hs : s ∈ 𝒜) (ha : a ∈ s) : erase s a ∈ ∂ 𝒜 :=
97
97
mem_shadow_iff.2 ⟨s, hs, a, ha, rfl⟩
98
98
#align finset.erase_mem_shadow Finset.erase_mem_shadow
99
99
100
100
/-- `t` is in the shadow of `𝒜` iff we can add an element to it so that the resulting finset is in
101
101
`𝒜`. -/
102
- theorem mem_shadow_iff_insert_mem : s ∈ (∂ ) 𝒜 ↔ ∃ (a : _) (_ : a ∉ s), insert a s ∈ 𝒜 := by
102
+ theorem mem_shadow_iff_insert_mem : s ∈ ∂ 𝒜 ↔ ∃ (a : _) (_ : a ∉ s), insert a s ∈ 𝒜 := by
103
103
refine' mem_shadow_iff.trans ⟨_, _⟩
104
104
· rintro ⟨s, hs, a, ha, rfl⟩
105
105
refine' ⟨a, not_mem_erase a s, _⟩
@@ -110,22 +110,22 @@ theorem mem_shadow_iff_insert_mem : s ∈ (∂ ) 𝒜 ↔ ∃ (a : _) (_ : a ∉
110
110
111
111
/-- The shadow of a family of `r`-sets is a family of `r - 1`-sets. -/
112
112
protected theorem Set.Sized.shadow (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
113
- ((∂ ) 𝒜 : Set (Finset α)).Sized (r - 1 ) := by
113
+ (∂ 𝒜 : Set (Finset α)).Sized (r - 1 ) := by
114
114
intro A h
115
115
obtain ⟨A, hA, i, hi, rfl⟩ := mem_shadow_iff.1 h
116
116
rw [card_erase_of_mem hi, h𝒜 hA]
117
117
#align finset.set.sized.shadow Finset.Set.Sized.shadow
118
118
119
119
theorem sized_shadow_iff (h : ∅ ∉ 𝒜) :
120
- ((∂ ) 𝒜 : Set (Finset α)).Sized r ↔ (𝒜 : Set (Finset α)).Sized (r + 1 ) := by
120
+ (∂ 𝒜 : Set (Finset α)).Sized r ↔ (𝒜 : Set (Finset α)).Sized (r + 1 ) := by
121
121
refine' ⟨fun h𝒜 s hs => _, Set.Sized.shadow⟩
122
122
obtain ⟨a, ha⟩ := nonempty_iff_ne_empty.2 (ne_of_mem_of_not_mem hs h)
123
123
rw [← h𝒜 (erase_mem_shadow hs ha), card_erase_add_one ha]
124
124
#align finset.sized_shadow_iff Finset.sized_shadow_iff
125
125
126
126
/-- `s ∈ ∂ 𝒜` iff `s` is exactly one element less than something from `𝒜` -/
127
127
theorem mem_shadow_iff_exists_mem_card_add_one :
128
- s ∈ (∂ ) 𝒜 ↔ ∃ t ∈ 𝒜, s ⊆ t ∧ t.card = s.card + 1 := by
128
+ s ∈ ∂ 𝒜 ↔ ∃ t ∈ 𝒜, s ⊆ t ∧ t.card = s.card + 1 := by
129
129
refine' mem_shadow_iff_insert_mem.trans ⟨_, _⟩
130
130
· rintro ⟨a, ha, hs⟩
131
131
exact ⟨insert a s, hs, subset_insert _ _, card_insert_of_not_mem ha⟩
@@ -138,7 +138,7 @@ theorem mem_shadow_iff_exists_mem_card_add_one :
138
138
#align finset.mem_shadow_iff_exists_mem_card_add_one Finset.mem_shadow_iff_exists_mem_card_add_one
139
139
140
140
/-- Being in the shadow of `𝒜` means we have a superset in `𝒜`. -/
141
- theorem exists_subset_of_mem_shadow (hs : s ∈ (∂ ) 𝒜) : ∃ t ∈ 𝒜, s ⊆ t :=
141
+ theorem exists_subset_of_mem_shadow (hs : s ∈ ∂ 𝒜) : ∃ t ∈ 𝒜, s ⊆ t :=
142
142
let ⟨t, ht, hst⟩ := mem_shadow_iff_exists_mem_card_add_one.1 hs
143
143
⟨t, ht, hst.1 ⟩
144
144
#align finset.exists_subset_of_mem_shadow Finset.exists_subset_of_mem_shadow
@@ -189,11 +189,11 @@ def upShadow (𝒜 : Finset (Finset α)) : Finset (Finset α) :=
189
189
190
190
-- mathport name: finset.up_shadow
191
191
-- Porting note: added `inherit_doc` to calm linter
192
- @[inherit_doc] scoped [FinsetFamily] notation :90 "∂⁺ " => Finset.upShadow
192
+ @[inherit_doc] scoped [FinsetFamily] notation :max "∂⁺ " => Finset.upShadow
193
193
194
194
/-- The upper shadow of the empty set is empty. -/
195
195
@[simp]
196
- theorem upShadow_empty : (∂⁺ ) (∅ : Finset (Finset α)) = ∅ :=
196
+ theorem upShadow_empty : ∂⁺ (∅ : Finset (Finset α)) = ∅ :=
197
197
rfl
198
198
#align finset.up_shadow_empty Finset.upShadow_empty
199
199
@@ -205,25 +205,25 @@ theorem upShadow_monotone : Monotone (upShadow : Finset (Finset α) → Finset (
205
205
206
206
/-- `s` is in the upper shadow of `𝒜` iff there is an `t ∈ 𝒜` from which we can remove one element
207
207
to get `s`. -/
208
- theorem mem_upShadow_iff : s ∈ (∂⁺ ) 𝒜 ↔ ∃ t ∈ 𝒜, ∃ (a : _) (_ : a ∉ t), insert a t = s := by
208
+ theorem mem_upShadow_iff : s ∈ ∂⁺ 𝒜 ↔ ∃ t ∈ 𝒜, ∃ (a : _) (_ : a ∉ t), insert a t = s := by
209
209
simp_rw [upShadow, mem_sup, mem_image, exists_prop, mem_compl]
210
210
#align finset.mem_up_shadow_iff Finset.mem_upShadow_iff
211
211
212
- theorem insert_mem_upShadow (hs : s ∈ 𝒜) (ha : a ∉ s) : insert a s ∈ (∂⁺ ) 𝒜 :=
212
+ theorem insert_mem_upShadow (hs : s ∈ 𝒜) (ha : a ∉ s) : insert a s ∈ ∂⁺ 𝒜 :=
213
213
mem_upShadow_iff.2 ⟨s, hs, a, ha, rfl⟩
214
214
#align finset.insert_mem_up_shadow Finset.insert_mem_upShadow
215
215
216
216
/-- The upper shadow of a family of `r`-sets is a family of `r + 1`-sets. -/
217
217
protected theorem Set.Sized.upShadow (h𝒜 : (𝒜 : Set (Finset α)).Sized r) :
218
- ((∂⁺ ) 𝒜 : Set (Finset α)).Sized (r + 1 ) := by
218
+ (∂⁺ 𝒜 : Set (Finset α)).Sized (r + 1 ) := by
219
219
intro A h
220
220
obtain ⟨A, hA, i, hi, rfl⟩ := mem_upShadow_iff.1 h
221
221
rw [card_insert_of_not_mem hi, h𝒜 hA]
222
222
#align finset.set.sized.up_shadow Finset.Set.Sized.upShadow
223
223
224
224
/-- `t` is in the upper shadow of `𝒜` iff we can remove an element from it so that the resulting
225
225
finset is in `𝒜`. -/
226
- theorem mem_upShadow_iff_erase_mem : s ∈ (∂⁺ ) 𝒜 ↔ ∃ a ∈ s, s.erase a ∈ 𝒜 := by
226
+ theorem mem_upShadow_iff_erase_mem : s ∈ ∂⁺ 𝒜 ↔ ∃ a ∈ s, s.erase a ∈ 𝒜 := by
227
227
refine' mem_upShadow_iff.trans ⟨_, _⟩
228
228
· rintro ⟨s, hs, a, ha, rfl⟩
229
229
refine' ⟨a, mem_insert_self a s, _⟩
@@ -234,7 +234,7 @@ theorem mem_upShadow_iff_erase_mem : s ∈ (∂⁺ ) 𝒜 ↔ ∃ a ∈ s, s.era
234
234
235
235
/-- `s ∈ ∂⁺ 𝒜` iff `s` is exactly one element less than something from `𝒜`. -/
236
236
theorem mem_upShadow_iff_exists_mem_card_add_one :
237
- s ∈ (∂⁺ ) 𝒜 ↔ ∃ t ∈ 𝒜, t ⊆ s ∧ t.card + 1 = s.card := by
237
+ s ∈ ∂⁺ 𝒜 ↔ ∃ t ∈ 𝒜, t ⊆ s ∧ t.card + 1 = s.card := by
238
238
refine' mem_upShadow_iff_erase_mem.trans ⟨_, _⟩
239
239
· rintro ⟨a, ha, hs⟩
240
240
exact ⟨s.erase a, hs, erase_subset _ _, card_erase_add_one ha⟩
@@ -246,7 +246,7 @@ theorem mem_upShadow_iff_exists_mem_card_add_one :
246
246
#align finset.mem_up_shadow_iff_exists_mem_card_add_one Finset.mem_upShadow_iff_exists_mem_card_add_one
247
247
248
248
/-- Being in the upper shadow of `𝒜` means we have a superset in `𝒜`. -/
249
- theorem exists_subset_of_mem_upShadow (hs : s ∈ (∂⁺ ) 𝒜) : ∃ t ∈ 𝒜, t ⊆ s :=
249
+ theorem exists_subset_of_mem_upShadow (hs : s ∈ ∂⁺ 𝒜) : ∃ t ∈ 𝒜, t ⊆ s :=
250
250
let ⟨t, ht, hts, _⟩ := mem_upShadow_iff_exists_mem_card_add_one.1 hs
251
251
⟨t, ht, hts⟩
252
252
#align finset.exists_subset_of_mem_up_shadow Finset.exists_subset_of_mem_upShadow
@@ -281,7 +281,7 @@ theorem mem_upShadow_iff_exists_mem_card_add :
281
281
#align finset.mem_up_shadow_iff_exists_mem_card_add Finset.mem_upShadow_iff_exists_mem_card_add
282
282
283
283
@[simp]
284
- theorem shadow_image_compl : ((∂ ) 𝒜).image compl = (∂⁺ ) (𝒜.image compl) := by
284
+ theorem shadow_image_compl : (∂ 𝒜).image compl = ∂⁺ (𝒜.image compl) := by
285
285
ext s
286
286
simp only [mem_image, exists_prop, mem_shadow_iff, mem_upShadow_iff]
287
287
constructor
@@ -292,7 +292,7 @@ theorem shadow_image_compl : ((∂ ) 𝒜).image compl = (∂⁺ ) (𝒜.image c
292
292
#align finset.shadow_image_compl Finset.shadow_image_compl
293
293
294
294
@[simp]
295
- theorem upShadow_image_compl : (( ∂⁺ ) 𝒜).image compl = (∂ ) (𝒜.image compl) := by
295
+ theorem upShadow_image_compl : (∂⁺ 𝒜).image compl = ∂ (𝒜.image compl) := by
296
296
ext s
297
297
simp only [mem_image, exists_prop, mem_shadow_iff, mem_upShadow_iff]
298
298
constructor
0 commit comments