Zulip Chat Archive

Stream: general

Topic: distrib_lattice_bot


Yaël Dillies (Jul 28 2021 at 09:56):

I saw the todo about disjoint_sup_left and similar. What do you think of me defining distrib_lattice_bot for these lemmas to be general enough? I just hit a point where I wanted to use them in a generalized_boolean_algebra.

Yaël Dillies (Aug 02 2021 at 08:59):

So I'm doing that on the branch distrib_lattice_botand I've encountered this TODO in order.boolean_algebra:

/- TODO: if we had a typeclass for distributive lattices with `⊥`, we could make an alternative
constructor for `generalized_boolean_algebra` using `disjoint x (y \ x)` and `x ⊔ (y \ x) = y` as
axioms. -/

Yaël Dillies (Aug 02 2021 at 09:00):

inf_inf_sdiff was easy, but I'm stuck on sup_inf_sdiff : ∀ (a b : α), a ⊓ b ⊔ a \ b = a.

Yaël Dillies (Aug 02 2021 at 09:00):

/me is writing a MWE

Yaël Dillies (Aug 02 2021 at 09:04):

if anyone has a paper proof already...

import order.boolean_algebra

/-- A `distrib_lattice_bot` is a distributive with a least element. -/
class distrib_lattice_bot α extends distrib_lattice α, semilattice_inf_bot α, semilattice_sup_bot α

def generalized_boolean_algebra_of_disjoint_sdiff_self_right_of_sup_sdiff_cancel_left {α : Type*}
  [dlb : distrib_lattice_bot α] [sd : has_sdiff α]
  (hdisjoint_sdiff_self_right :  x y : α, disjoint x (y \ x))
  (hsup_sdiff_cancel_left :  x y : α⦄, disjoint x y  (x  y) \ x = y) :
  generalized_boolean_algebra α :=
{ sup_inf_sdiff := λ x y, begin
    sorry
  end,
  inf_inf_sdiff := λ x y, disjoint.eq_bot ((hdisjoint_sdiff_self_right y x).mono_left inf_le_right),
  ..dlb,
  ..sd }

Eric Rodriguez (Aug 02 2021 at 09:15):

that mwe errors with "invalid 'structure' header, field 'le' from 'semilattice_inf_bot' has already been declared"

Kevin Buzzard (Aug 02 2021 at 09:17):

Guess: set_option old_structure_cmd true might fix it? This is precisely the sort of thing it fixes.

Kevin Buzzard (Aug 02 2021 at 09:19):

(Note that old structures are not in Lean 4 -- Leo is forcing us to build them manually because the way we've been using them in Lean 3 apparently creates massive objects behind the scenes. This will involve a re-think of the hierarchy but I am still hazy on the details and would rather not derail this thread.)

Eric Rodriguez (Aug 02 2021 at 09:19):

ahh yes, thanks :)

Yaël Dillies (Aug 02 2021 at 09:38):

Kevin Buzzard said:

This will involve a re-think of the hierarchy

Uh...

Eric Rodriguez (Aug 02 2021 at 10:19):

the note says x ⊔ (y \ x) = y unconditionally, but you wrote (x ⊔ y) \ x = y for disjoint x y; going to try the note's version

Eric Rodriguez (Aug 02 2021 at 10:19):

hmm, but to be fair the notes' version doesn't work in my mental model

Eric Rodriguez (Aug 02 2021 at 10:20):

(the unconditionalness anyways)

Yaël Dillies (Aug 02 2021 at 11:39):

I think that maybe you need to assume x \ y ≤ x. Also, (x ⊔ y) \ x = y gives you the result for all elements that can be written as the sup of a ⊓ a and a \ b for some a, b. But the only way I can think of to find these is precisely using \...

Yaël Dillies (Aug 02 2021 at 11:41):

Eric Rodriguez said:

the note says x ⊔ (y \ x) = y unconditionally, but you wrote (x ⊔ y) \ x = y for disjoint x y; going to try the note's version

Wait but unconditionnally that's wrong. We don't have (x ⊔ x) \ x = x

Eric Rodriguez (Aug 02 2021 at 11:43):

yes, so your version is wrong :b

Eric Rodriguez (Aug 02 2021 at 11:43):

x ⊔ (x \ x) = x is right to me

Yaël Dillies (Aug 02 2021 at 11:46):

Oh what I can't even bracket a statement properly.

Yaël Dillies (Aug 02 2021 at 11:48):

Ah yeah I had my mental priority for inf too high.

Yaël Dillies (Aug 02 2021 at 11:50):

And I thought it had to do with the following (spacially) lemma

theorem disjoint.sdiff_eq_of_sup_eq (hi : disjoint x z) (hs : x  z = y) : y \ x = z :=
have h : y  x = x := inf_eq_right.2 $ le_sup_left.trans hs.le,
sdiff_unique (by rw [h, hs]) (by rw [h, hi.eq_bot])

Yaël Dillies (Aug 02 2021 at 11:51):

But x ⊔ (y \ x) = y is still not true...

Eric Rodriguez (Aug 02 2021 at 11:53):

when is that not true? i live in a model of lattices where all lattices are like sets

Eric Rodriguez (Aug 02 2021 at 11:53):

wait nvm

Eric Rodriguez (Aug 02 2021 at 11:53):

yes of course

Eric Rodriguez (Aug 02 2021 at 11:54):

who wrote that note?

Yaël Dillies (Aug 02 2021 at 11:54):

@Bryan Gin-ge Chen

Yaël Dillies (Aug 02 2021 at 11:54):

Not long ago, actually!

Eric Rodriguez (Aug 02 2021 at 11:56):

I swear he was online more recently than two weeks ago...

Yaël Dillies (Aug 02 2021 at 11:57):

Yeah, he answered something today at 5 in the morning.

Bryan Gin-ge Chen (Aug 02 2021 at 15:06):

Hmm, I don't remember what I was thinking... let me see if I can dig up some notes later.

Bryan Gin-ge Chen (Aug 02 2021 at 18:18):

I can't find my notes, so I think you can just delete that TODO for now. If I ever figure out what I meant I'll come back to this. Thanks for #8507 by the way!


Last updated: Dec 20 2023 at 11:08 UTC