Skip to content

Commit

Permalink
feat(order/complete_lattice): add Sup_diff_singleton_bot etc (#14205)
Browse files Browse the repository at this point in the history
* add `Sup_diff_singleton_bot` and `Inf_diff_singleton_top`;
* add `set.sUnion_diff_singleton_empty` and `set.sInter_diff_singleton_univ`.
  • Loading branch information
urkud committed May 19, 2022
1 parent 6906b6f commit 18624ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/data/set/lattice.lean
Expand Up @@ -791,6 +791,12 @@ Sup_insert
@[simp] theorem sInter_insert (s : set α) (T : set (set α)) : ⋂₀ (insert s T) = s ∩ ⋂₀ T :=
Inf_insert

@[simp] lemma sUnion_diff_singleton_empty (s : set (set α)) : ⋃₀ (s \ {∅}) = ⋃₀ s :=
Sup_diff_singleton_bot s

@[simp] lemma sInter_diff_singleton_univ (s : set (set α)) : ⋂₀ (s \ {univ}) = ⋂₀ s :=
Inf_diff_singleton_top s

theorem sUnion_pair (s t : set α) : ⋃₀ {s, t} = s ∪ t :=
Sup_pair

Expand Down
7 changes: 7 additions & 0 deletions src/order/complete_lattice.lean
Expand Up @@ -338,6 +338,13 @@ le_trans (Sup_le_Sup h) (le_of_eq (trans Sup_insert bot_sup_eq))
theorem Inf_le_Inf_of_subset_insert_top (h : s ⊆ insert ⊤ t) : Inf t ≤ Inf s :=
le_trans (le_of_eq (trans top_inf_eq.symm Inf_insert.symm)) (Inf_le_Inf h)

@[simp] theorem Sup_diff_singleton_bot (s : set α) : Sup (s \ {⊥}) = Sup s :=
(Sup_le_Sup (diff_subset _ _)).antisymm $ Sup_le_Sup_of_subset_insert_bot $
subset_insert_diff_singleton _ _

@[simp] theorem Inf_diff_singleton_top (s : set α) : Inf (s \ {⊤}) = Inf s :=
@Sup_diff_singleton_bot αᵒᵈ _ s

theorem Sup_pair {a b : α} : Sup {a, b} = a ⊔ b :=
(@is_lub_pair α _ a b).Sup_eq

Expand Down

0 comments on commit 18624ef

Please sign in to comment.