@@ -861,6 +861,94 @@ lemma sup_eq_top_of_top_mem [OrderTop α] (h : ⊤ ∈ s) : sSup s = ⊤ :=
861
861
lemma inf_eq_bot_of_bot_mem [OrderBot α] (h : ⊥ ∈ s) : sInf s = ⊥ :=
862
862
bot_unique <| csInf_le (OrderBot.bddBelow s) h
863
863
864
+ theorem ciSup_subtype [Nonempty ι] {p : ι → Prop } [Nonempty (Subtype p)] {f : Subtype p → α}
865
+ (hf : BddAbove (Set.range f)) (hf' : sSup ∅ ≤ iSup f) :
866
+ iSup f = ⨆ (i) (h : p i), f ⟨i, h⟩ := by
867
+ classical
868
+ refine le_antisymm (ciSup_le ?_) ?_
869
+ · intro ⟨i, h⟩
870
+ have : f ⟨i, h⟩ = (fun i : ι ↦ ⨆ (h : p i), f ⟨i, h⟩) i := by simp [h]
871
+ rw [this]
872
+ refine le_ciSup (f := (fun i : ι ↦ ⨆ (h : p i), f ⟨i, h⟩)) ?_ i
873
+ simp_rw [ciSup_eq_ite]
874
+ refine (hf.union (bddAbove_singleton (a := sSup ∅))).mono ?_
875
+ intro
876
+ simp only [Set.mem_range, Set.union_singleton, Set.mem_insert_iff, Subtype.exists,
877
+ forall_exists_index]
878
+ intro b hb
879
+ split_ifs at hb
880
+ · exact Or.inr ⟨_, _, hb⟩
881
+ · simp_all
882
+ · refine ciSup_le fun i ↦ ?_
883
+ simp_rw [ciSup_eq_ite]
884
+ split_ifs
885
+ · exact le_ciSup hf ?_
886
+ · exact hf'
887
+
888
+ theorem ciInf_subtype [Nonempty ι] {p : ι → Prop } [Nonempty (Subtype p)] {f : Subtype p → α}
889
+ (hf : BddBelow (Set.range f)) (hf' : iInf f ≤ sInf ∅) :
890
+ iInf f = ⨅ (i) (h : p i), f ⟨i, h⟩ :=
891
+ ciSup_subtype (α := αᵒᵈ) hf hf'
892
+
893
+ theorem ciSup_subtype' [Nonempty ι] {p : ι → Prop } [Nonempty (Subtype p)] {f : ∀ i, p i → α}
894
+ (hf : BddAbove (Set.range (fun i : Subtype p ↦ f i i.prop)))
895
+ (hf' : sSup ∅ ≤ ⨆ (i : Subtype p), f i i.prop) :
896
+ ⨆ (i) (h), f i h = ⨆ x : Subtype p, f x x.property :=
897
+ (ciSup_subtype (f := fun x => f x.val x.property) hf hf').symm
898
+
899
+ theorem ciInf_subtype' [Nonempty ι] {p : ι → Prop } [Nonempty (Subtype p)] {f : ∀ i, p i → α}
900
+ (hf : BddBelow (Set.range (fun i : Subtype p ↦ f i i.prop)))
901
+ (hf' : ⨅ (i : Subtype p), f i i.prop ≤ sInf ∅) :
902
+ ⨅ (i) (h), f i h = ⨅ x : Subtype p, f x x.property :=
903
+ (ciInf_subtype (f := fun x => f x.val x.property) hf hf').symm
904
+
905
+ theorem ciSup_subtype'' {ι} [Nonempty ι] {s : Set ι} (hs : s.Nonempty) {f : ι → α}
906
+ (hf : BddAbove (Set.range fun i : s ↦ f i)) (hf' : sSup ∅ ≤ ⨆ i : s, f i) :
907
+ ⨆ i : s, f i = ⨆ (t : ι) (_ : t ∈ s), f t :=
908
+ haveI : Nonempty s := Set.Nonempty.to_subtype hs
909
+ ciSup_subtype hf hf'
910
+
911
+ theorem ciInf_subtype'' {ι} [Nonempty ι] {s : Set ι} (hs : s.Nonempty) {f : ι → α}
912
+ (hf : BddBelow (Set.range fun i : s ↦ f i)) (hf' : ⨅ i : s, f i ≤ sInf ∅) :
913
+ ⨅ i : s, f i = ⨅ (t : ι) (_ : t ∈ s), f t :=
914
+ haveI : Nonempty s := Set.Nonempty.to_subtype hs
915
+ ciInf_subtype hf hf'
916
+
917
+ theorem csSup_image [Nonempty β] {s : Set β} (hs : s.Nonempty) {f : β → α}
918
+ (hf : BddAbove (Set.range fun i : s ↦ f i)) (hf' : sSup ∅ ≤ ⨆ i : s, f i) :
919
+ sSup (f '' s) = ⨆ a ∈ s, f a := by
920
+ rw [← ciSup_subtype'' hs hf hf', iSup, Set.image_eq_range]
921
+
922
+ theorem csInf_image [Nonempty β] {s : Set β} (hs : s.Nonempty) {f : β → α}
923
+ (hf : BddBelow (Set.range fun i : s ↦ f i)) (hf' : ⨅ i : s, f i ≤ sInf ∅) :
924
+ sInf (f '' s) = ⨅ a ∈ s, f a :=
925
+ csSup_image (α := αᵒᵈ) hs hf hf'
926
+
927
+ lemma ciSup_image {α ι ι' : Type *} [ConditionallyCompleteLattice α] [Nonempty ι] [Nonempty ι']
928
+ {s : Set ι} (hs : s.Nonempty) {f : ι → ι'} {g : ι' → α}
929
+ (hf : BddAbove (Set.range fun i : s ↦ g (f i))) (hg' : sSup ∅ ≤ ⨆ i : s, g (f i)) :
930
+ ⨆ i ∈ (f '' s), g i = ⨆ x ∈ s, g (f x) := by
931
+ have hg : BddAbove (Set.range fun i : f '' s ↦ g i) := by
932
+ simpa [bddAbove_def] using hf
933
+ have hf' : sSup ∅ ≤ ⨆ i : f '' s, g i := by
934
+ refine hg'.trans ?_
935
+ have : Nonempty s := Set.Nonempty.to_subtype hs
936
+ refine ciSup_le ?_
937
+ intro ⟨i, h⟩
938
+ obtain ⟨t, ht⟩ : ∃ t : f '' s, g t = g (f (Subtype.mk i h)) := by
939
+ have : f i ∈ f '' s := Set.mem_image_of_mem _ h
940
+ exact ⟨⟨f i, this⟩, by simp [this]⟩
941
+ rw [← ht]
942
+ refine le_ciSup_set ?_ t.prop
943
+ simpa [bddAbove_def] using hf
944
+ rw [← csSup_image (by simpa using hs) hg hf', ← csSup_image hs hf hg', ← Set.image_comp, comp_def]
945
+
946
+ lemma ciInf_image {α ι ι' : Type *} [ConditionallyCompleteLattice α] [Nonempty ι] [Nonempty ι']
947
+ {s : Set ι} (hs : s.Nonempty) {f : ι → ι'} {g : ι' → α}
948
+ (hf : BddBelow (Set.range fun i : s ↦ g (f i))) (hg' : ⨅ i : s, g (f i) ≤ sInf ∅) :
949
+ ⨅ i ∈ (f '' s), g i = ⨅ x ∈ s, g (f x) :=
950
+ ciSup_image (α := αᵒᵈ) hs hf hg'
951
+
864
952
end ConditionallyCompleteLattice
865
953
866
954
instance Pi.conditionallyCompleteLattice {ι : Type *} {α : ι → Type *}
@@ -992,7 +1080,7 @@ theorem cbiSup_eq_of_not_forall {p : ι → Prop} {f : Subtype p → α} (hp :
992
1080
· simp [hi]
993
1081
· apply sup_le
994
1082
· rcases isEmpty_or_nonempty (Subtype p) with hp|hp
995
- · simp only [iSup_of_empty']
1083
+ · rw [iSup_of_empty']
996
1084
convert le_ciSup B i₀
997
1085
simp [hi₀]
998
1086
· apply ciSup_le
@@ -1123,6 +1211,14 @@ theorem ciSup_mono' {ι'} {f : ι → α} {g : ι' → α} (hg : BddAbove (range
1123
1211
theorem csInf_le_csInf' {s t : Set α} (h₁ : t.Nonempty) (h₂ : t ⊆ s) : sInf s ≤ sInf t :=
1124
1212
csInf_le_csInf (OrderBot.bddBelow s) h₁ h₂
1125
1213
1214
+ lemma ciSup_or' (p q : Prop ) (f : p ∨ q → α) :
1215
+ ⨆ (h : p ∨ q), f h = (⨆ h : p, f (.inl h)) ⊔ ⨆ h : q, f (.inr h) := by
1216
+ by_cases hp : p <;> by_cases hq : q
1217
+ · simp [hp, hq]
1218
+ · simp [hp, hq]
1219
+ · simp [hp, hq]
1220
+ · simp [hp, hq]
1221
+
1126
1222
end ConditionallyCompleteLinearOrderBot
1127
1223
1128
1224
namespace WithTop
0 commit comments