Skip to content

Commit

Permalink
chore(order/lattice): add exists_lt_of_sup/inf (#10133)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Nov 3, 2021
1 parent 8f7ffec commit 3a0b0d1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/order/lattice.lean
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ begin
injection this; congr'
end

theorem exists_lt_of_sup (α : Type*) [semilattice_sup α] [nontrivial α] : ∃ a b : α, a < b :=
begin
rcases exists_pair_ne α with ⟨a, b, hne⟩,
rcases forall_le_or_exists_lt_sup b with (hb|⟨c, hc⟩),
exacts [⟨a, b, (hb a).lt_of_ne hne⟩, ⟨b, c, hc⟩]
end

end semilattice_sup

/-!
Expand Down Expand Up @@ -417,6 +424,10 @@ theorem semilattice_inf.dual_dual (α : Type*) [H : semilattice_inf α] :
order_dual.semilattice_inf (order_dual α) = H :=
semilattice_inf.ext $ λ _ _, iff.rfl

theorem exists_lt_of_inf (α : Type*) [semilattice_inf α] [nontrivial α] :
∃ a b : α, a < b :=
let ⟨a, b, h⟩ := exists_lt_of_sup (order_dual α) in ⟨b, a, h⟩

end semilattice_inf

/--
Expand Down

0 comments on commit 3a0b0d1

Please sign in to comment.