@@ -102,11 +102,9 @@ protected theorem sup_le_iff {a : α} : s.sup f ≤ a ↔ ∀ b ∈ s, f b ≤ a
102
102
exact ⟨fun k b hb => k _ _ hb rfl, fun k a' b hb h => h ▸ k _ hb⟩
103
103
#align finset.sup_le_iff Finset.sup_le_iff
104
104
105
- alias ⟨_, sup_le⟩ := Finset.sup_le_iff
105
+ protected alias ⟨_, sup_le⟩ := Finset.sup_le_iff
106
106
#align finset.sup_le Finset.sup_le
107
107
108
- -- Porting note: removed `attribute [protected] sup_le`
109
-
110
108
theorem sup_const_le : (s.sup fun _ => a) ≤ a :=
111
109
Finset.sup_le fun _ _ => le_rfl
112
110
#align finset.sup_const_le Finset.sup_const_le
@@ -173,6 +171,20 @@ theorem sup_product_right (s : Finset β) (t : Finset γ) (f : β × γ → α)
173
171
rw [sup_product_left, Finset.sup_comm]
174
172
#align finset.sup_product_right Finset.sup_product_right
175
173
174
+ section Prod
175
+ variable {ι κ α β : Type *} [SemilatticeSup α] [SemilatticeSup β] [OrderBot α] [OrderBot β]
176
+ {s : Finset ι} {t : Finset κ}
177
+
178
+ @[simp] lemma sup_prodMap (hs : s.Nonempty) (ht : t.Nonempty) (f : ι → α) (g : κ → β) :
179
+ sup (s ×ˢ t) (Prod.map f g) = (sup s f, sup t g) :=
180
+ eq_of_forall_ge_iff fun i ↦ by
181
+ obtain ⟨a, ha⟩ := hs
182
+ obtain ⟨b, hb⟩ := ht
183
+ simp only [Prod.map, Finset.sup_le_iff, mem_product, and_imp, Prod.forall, Prod.le_def]
184
+ exact ⟨fun h ↦ ⟨fun i hi ↦ (h _ _ hi hb).1 , fun j hj ↦ (h _ _ ha hj).2 ⟩, by aesop⟩
185
+
186
+ end Prod
187
+
176
188
@[simp]
177
189
theorem sup_erase_bot [DecidableEq α] (s : Finset α) : (s.erase ⊥).sup id = s.sup id := by
178
190
refine' (sup_mono (s.erase_subset _)).antisymm (Finset.sup_le_iff.2 fun a ha => _)
@@ -365,11 +377,9 @@ theorem _root_.map_finset_inf [SemilatticeInf β] [OrderTop β] [InfTopHomClass
365
377
@Finset.sup_le_iff αᵒᵈ _ _ _ _ _ _
366
378
#align finset.le_inf_iff Finset.le_inf_iff
367
379
368
- alias ⟨_, le_inf⟩ := Finset.le_inf_iff
380
+ protected alias ⟨_, le_inf⟩ := Finset.le_inf_iff
369
381
#align finset.le_inf Finset.le_inf
370
382
371
- -- Porting note: removed attribute [ protected ] le_inf
372
-
373
383
theorem le_inf_const_le : a ≤ s.inf fun _ => a :=
374
384
Finset.le_inf fun _ _ => le_rfl
375
385
#align finset.le_inf_const_le Finset.le_inf_const_le
@@ -427,6 +437,16 @@ theorem inf_product_right (s : Finset β) (t : Finset γ) (f : β × γ → α)
427
437
@sup_product_right αᵒᵈ _ _ _ _ _ _ _
428
438
#align finset.inf_product_right Finset.inf_product_right
429
439
440
+ section Prod
441
+ variable {ι κ α β : Type *} [SemilatticeInf α] [SemilatticeInf β] [OrderTop α] [OrderTop β]
442
+ {s : Finset ι} {t : Finset κ}
443
+
444
+ @[simp] lemma inf_prodMap (hs : s.Nonempty) (ht : t.Nonempty) (f : ι → α) (g : κ → β) :
445
+ inf (s ×ˢ t) (Prod.map f g) = (inf s f, inf t g) :=
446
+ sup_prodMap (α := αᵒᵈ) (β := βᵒᵈ) hs ht _ _
447
+
448
+ end Prod
449
+
430
450
@[simp]
431
451
theorem inf_erase_top [DecidableEq α] (s : Finset α) : (s.erase ⊤).inf id = s.inf id :=
432
452
@sup_erase_bot αᵒᵈ _ _ _ _
@@ -847,6 +867,26 @@ theorem sup'_product_right {t : Finset γ} (hs : s.Nonempty) (ht : t.Nonempty) (
847
867
rw [sup'_product_left, Finset.sup'_comm]
848
868
#align finset.sup'_product_right Finset.sup'_product_right
849
869
870
+ section Prod
871
+ variable {ι κ α β : Type *} [SemilatticeSup α] [SemilatticeSup β] {s : Finset ι} {t : Finset κ}
872
+
873
+ /-- See also `Finset.sup'_prodMap`. -/
874
+ lemma prodMk_sup'_sup' (hs : s.Nonempty) (ht : t.Nonempty) (f : ι → α) (g : κ → β) :
875
+ (sup' s hs f, sup' t ht g) = sup' (s ×ˢ t) (hs.product ht) (Prod.map f g) :=
876
+ eq_of_forall_ge_iff fun i ↦ by
877
+ obtain ⟨a, ha⟩ := hs
878
+ obtain ⟨b, hb⟩ := ht
879
+ simp only [Prod.map, sup'_le_iff, mem_product, and_imp, Prod.forall, Prod.le_def]
880
+ exact ⟨by aesop, fun h ↦ ⟨fun i hi ↦ (h _ _ hi hb).1 , fun j hj ↦ (h _ _ ha hj).2 ⟩⟩
881
+
882
+ /-- See also `Finset.prodMk_sup'_sup'`. -/
883
+ -- @[ simp ] -- TODO: Why does `Prod_map` simplify the LHS?
884
+ lemma sup'_prodMap (hst : (s ×ˢ t).Nonempty) (f : ι → α) (g : κ → β) :
885
+ sup' (s ×ˢ t) hst (Prod.map f g) = (sup' s hst.fst f, sup' t hst.snd g) :=
886
+ (prodMk_sup'_sup' _ _ _ _).symm
887
+
888
+ end Prod
889
+
850
890
theorem comp_sup'_eq_sup'_comp [SemilatticeSup γ] {s : Finset β} (H : s.Nonempty) {f : β → α}
851
891
(g : α → γ) (g_sup : ∀ x y, g (x ⊔ y) = g x ⊔ g y) : g (s.sup' H f) = s.sup' H (g ∘ f) := by
852
892
rw [← WithBot.coe_eq_coe, coe_sup']
@@ -1005,6 +1045,22 @@ theorem inf'_product_right {t : Finset γ} (hs : s.Nonempty) (ht : t.Nonempty) (
1005
1045
@sup'_product_right αᵒᵈ _ _ _ _ _ hs ht _
1006
1046
#align finset.inf'_product_right Finset.inf'_product_right
1007
1047
1048
+ section Prod
1049
+ variable {ι κ α β : Type *} [SemilatticeInf α] [SemilatticeInf β] {s : Finset ι} {t : Finset κ}
1050
+
1051
+ /-- See also `Finset.inf'_prodMap`. -/
1052
+ lemma prodMk_inf'_inf' (hs : s.Nonempty) (ht : t.Nonempty) (f : ι → α) (g : κ → β) :
1053
+ (inf' s hs f, inf' t ht g) = inf' (s ×ˢ t) (hs.product ht) (Prod.map f g) :=
1054
+ prodMk_sup'_sup' (α := αᵒᵈ) (β := βᵒᵈ) hs ht _ _
1055
+
1056
+ /-- See also `Finset.prodMk_inf'_inf'`. -/
1057
+ -- @[ simp ] -- TODO: Why does `Prod_map` simplify the LHS?
1058
+ lemma inf'_prodMap (hst : (s ×ˢ t).Nonempty) (f : ι → α) (g : κ → β) :
1059
+ inf' (s ×ˢ t) hst (Prod.map f g) = (inf' s hst.fst f, inf' t hst.snd g) :=
1060
+ (prodMk_inf'_inf' _ _ _ _).symm
1061
+
1062
+ end Prod
1063
+
1008
1064
theorem comp_inf'_eq_inf'_comp [SemilatticeInf γ] {s : Finset β} (H : s.Nonempty) {f : β → α}
1009
1065
(g : α → γ) (g_inf : ∀ x y, g (x ⊓ y) = g x ⊓ g y) : g (s.inf' H f) = s.inf' H (g ∘ f) :=
1010
1066
comp_sup'_eq_sup'_comp (α := αᵒᵈ) (γ := γᵒᵈ) H g g_inf
0 commit comments