Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit d359aa8

Browse files
sgouezeljohoelzl
authored andcommitted
feat(order/conditionally_complete_lattice): cinfi_const (#634)
1 parent 06eba7f commit d359aa8

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

src/data/set/basic.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,14 @@ subtype_val_range
10671067
lemma range_const_subset {c : β} : range (λx:α, c) ⊆ {c} :=
10681068
range_subset_iff.2 $ λ x, or.inl rfl
10691069

1070+
@[simp] lemma range_const [h : nonempty α] {c : β} : range (λx:α, c) = {c} :=
1071+
begin
1072+
refine subset.antisymm range_const_subset (λy hy, _),
1073+
rw set.mem_singleton_iff.1 hy,
1074+
rcases exists_mem_of_nonempty α with ⟨x, _⟩,
1075+
exact mem_range_self x
1076+
end
1077+
10701078
def range_factorization (f : ι → β) : ι → range f :=
10711079
λ i, ⟨f i, mem_range_self i⟩
10721080

src/order/conditionally_complete_lattice.lean

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ set_option old_structure_cmd true
3030

3131
open preorder set lattice
3232

33-
universes u v
34-
variables {α : Type u} {β : Type v}
33+
universes u v w
34+
variables {α : Type u} {β : Type v} {ι : Type w}
3535

3636
section preorder
3737
variables [preorder α] [preorder β] {s t : set α} {a b : α}
@@ -484,7 +484,7 @@ lemma csupr_le [ne : nonempty β] {f : β → α} {c : α} (H : ∀x, f x ≤ c)
484484
cSup_le (by simp [not_not_intro ne]) (by rwa forall_range_iff)
485485

486486
/--The indexed supremum of a function is bounded below by the value taken at one point-/
487-
lemma le_csupr [ne : nonempty β] {f : β → α} (H : bdd_above (range f)) {c : β} : f c ≤ supr f :=
487+
lemma le_csupr {f : β → α} (H : bdd_above (range f)) {c : β} : f c ≤ supr f :=
488488
le_cSup H (mem_range_self _)
489489

490490
/--The indexed infimum of two functions are comparable if the functions are pointwise comparable-/
@@ -506,7 +506,7 @@ lemma le_cinfi [ne : nonempty β] {f : β → α} {c : α} (H : ∀x, c ≤ f x)
506506
le_cInf (by simp [not_not_intro ne]) (by rwa forall_range_iff)
507507

508508
/--The indexed infimum of a function is bounded above by the value taken at one point-/
509-
lemma cinfi_le [ne : nonempty β] {f : β → α} (H : bdd_below (range f)) {c : β} : infi f ≤ f c :=
509+
lemma cinfi_le {f : β → α} (H : bdd_below (range f)) {c : β} : infi f ≤ f c :=
510510
cInf_le H (mem_range_self _)
511511

512512
lemma is_lub_cSup {s : set α} (ne : s ≠ ∅) (H : bdd_above s) : is_lub s (Sup s) :=
@@ -515,6 +515,22 @@ lemma is_lub_cSup {s : set α} (ne : s ≠ ∅) (H : bdd_above s) : is_lub s (Su
515515
lemma is_glb_cInf {s : set α} (ne : s ≠ ∅) (H : bdd_below s) : is_glb s (Inf s) :=
516516
⟨assume x, cInf_le H, assume x, le_cInf ne⟩
517517

518+
@[simp] theorem cinfi_const [nonempty ι] {a : α} : (⨅ b:ι, a) = a :=
519+
begin
520+
rcases exists_mem_of_nonempty ι with ⟨x, _⟩,
521+
refine le_antisymm (@cinfi_le _ _ _ _ _ x) (le_cinfi (λi, _root_.le_refl _)),
522+
rw range_const,
523+
exact bdd_below_singleton
524+
end
525+
526+
@[simp] theorem csupr_const [nonempty ι] {a : α} : (⨆ b:ι, a) = a :=
527+
begin
528+
rcases exists_mem_of_nonempty ι with ⟨x, _⟩,
529+
refine le_antisymm (csupr_le (λi, _root_.le_refl _)) (@le_csupr _ _ _ (λ b:ι, a) _ x),
530+
rw range_const,
531+
exact bdd_above_singleton
532+
end
533+
518534
end conditionally_complete_lattice
519535

520536

0 commit comments

Comments
 (0)