Skip to content

Commit 9f06374

Browse files
committed
feat(Order.Bounds.Basic): boundedness in pi types (#5806)
1 parent bf28bf4 commit 9f06374

File tree

1 file changed

+36
-12
lines changed

1 file changed

+36
-12
lines changed

Mathlib/Order/Bounds/Basic.lean

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,19 +1552,29 @@ end AntitoneMonotone
15521552

15531553
end Image2
15541554

1555-
theorem IsGLB.of_image [Preorder α] [Preorder β] {f : α → β} (hf : ∀ {x y}, f x ≤ f y ↔ x ≤ y)
1556-
{s : Set α} {x : α} (hx : IsGLB (f '' s) (f x)) : IsGLB s x :=
1557-
fun _ hy => hf.1 <| hx.1 <| mem_image_of_mem _ hy, fun _ hy =>
1558-
hf.1 <| hx.2 <| Monotone.mem_lowerBounds_image (fun _ _ => hf.2) hy⟩
1559-
#align is_glb.of_image IsGLB.of_image
1555+
section Pi
15601556

1561-
theorem IsLUB.of_image [Preorder α] [Preorder β] {f : α → β} (hf : ∀ {x y}, f x ≤ f y ↔ x ≤ y)
1562-
{s : Set α} {x : α} (hx : IsLUB (f '' s) (f x)) : IsLUB s x :=
1563-
fun _ hy => hf.1 <| hx.1 <| mem_image_of_mem _ hy, fun _ hy =>
1564-
hf.1 <| hx.2 <| Monotone.mem_upperBounds_image (fun _ _ => hf.2) hy⟩
1565-
#align is_lub.of_image IsLUB.of_image
1557+
variable {π : α → Type _} [∀ a, Preorder (π a)]
1558+
1559+
lemma bddAbove_pi {s : Set (∀ a, π a)} :
1560+
BddAbove s ↔ ∀ a, BddAbove (Function.eval a '' s) :=
1561+
fun ⟨f, hf⟩ a ↦ ⟨f a, ball_image_of_ball fun _ hg ↦ hf hg a⟩,
1562+
fun h ↦ ⟨fun a ↦ (h a).some, fun _ hg a ↦ (h a).some_mem <| mem_image_of_mem _ hg⟩⟩
1563+
1564+
lemma bddBelow_pi {s : Set (∀ a, π a)} :
1565+
BddBelow s ↔ ∀ a, BddBelow (Function.eval a '' s) :=
1566+
bddAbove_pi (π := fun a ↦ (π a)ᵒᵈ)
1567+
1568+
lemma bddAbove_range_pi {F : ι → ∀ a, π a} :
1569+
BddAbove (range F) ↔ ∀ a, BddAbove (range fun i ↦ F i a) := by
1570+
simp only [bddAbove_pi, ←range_comp]
1571+
rfl
15661572

1567-
theorem isLUB_pi {π : α → Type _} [∀ a, Preorder (π a)] {s : Set (∀ a, π a)} {f : ∀ a, π a} :
1573+
lemma bddBelow_range_pi {F : ι → ∀ a, π a} :
1574+
BddBelow (range F) ↔ ∀ a, BddBelow (range fun i ↦ F i a) :=
1575+
bddAbove_range_pi (π := fun a ↦ (π a)ᵒᵈ)
1576+
1577+
theorem isLUB_pi {s : Set (∀ a, π a)} {f : ∀ a, π a} :
15681578
IsLUB s f ↔ ∀ a, IsLUB (Function.eval a '' s) (f a) := by
15691579
classical
15701580
refine'
@@ -1576,11 +1586,25 @@ theorem isLUB_pi {π : α → Type _} [∀ a, Preorder (π a)] {s : Set (∀ a,
15761586
· exact fun g hg a => (H a).2 ((Function.monotone_eval a).mem_upperBounds_image hg)
15771587
#align is_lub_pi isLUB_pi
15781588

1579-
theorem isGLB_pi {π : α → Type _} [∀ a, Preorder (π a)] {s : Set (∀ a, π a)} {f : ∀ a, π a} :
1589+
theorem isGLB_pi {s : Set (∀ a, π a)} {f : ∀ a, π a} :
15801590
IsGLB s f ↔ ∀ a, IsGLB (Function.eval a '' s) (f a) :=
15811591
@isLUB_pi α (fun a => (π a)ᵒᵈ) _ s f
15821592
#align is_glb_pi isGLB_pi
15831593

1594+
end Pi
1595+
1596+
theorem IsGLB.of_image [Preorder α] [Preorder β] {f : α → β} (hf : ∀ {x y}, f x ≤ f y ↔ x ≤ y)
1597+
{s : Set α} {x : α} (hx : IsGLB (f '' s) (f x)) : IsGLB s x :=
1598+
fun _ hy => hf.1 <| hx.1 <| mem_image_of_mem _ hy, fun _ hy =>
1599+
hf.1 <| hx.2 <| Monotone.mem_lowerBounds_image (fun _ _ => hf.2) hy⟩
1600+
#align is_glb.of_image IsGLB.of_image
1601+
1602+
theorem IsLUB.of_image [Preorder α] [Preorder β] {f : α → β} (hf : ∀ {x y}, f x ≤ f y ↔ x ≤ y)
1603+
{s : Set α} {x : α} (hx : IsLUB (f '' s) (f x)) : IsLUB s x :=
1604+
fun _ hy => hf.1 <| hx.1 <| mem_image_of_mem _ hy, fun _ hy =>
1605+
hf.1 <| hx.2 <| Monotone.mem_upperBounds_image (fun _ _ => hf.2) hy⟩
1606+
#align is_lub.of_image IsLUB.of_image
1607+
15841608
theorem isLUB_prod [Preorder α] [Preorder β] {s : Set (α × β)} (p : α × β) :
15851609
IsLUB s p ↔ IsLUB (Prod.fst '' s) p.1 ∧ IsLUB (Prod.snd '' s) p.2 := by
15861610
refine'

0 commit comments

Comments
 (0)