agda / cubical

An experimental library for Cubical Agda
https://agda.github.io/cubical/Cubical.README.html
Other
441 stars 134 forks source link

More elegant construction of ZariskiLattice #1110

Open MatthiasHu opened 4 months ago

MatthiasHu commented 4 months ago

Here is an idea for an improvement in ZariskiLattice.Base .

The current set-quotient construction begins by defining a preorder (without using this name) and deriving the equivalence relation _∼_ from that: https://github.com/agda/cubical/blob/6ce70a4934db4dac521c60399183b3b6e1bcf225/Cubical/Algebra/ZariskiLattice/Base.agda#L72-L83

So the set-quotient is actually an instance of a general (not formalized yet, I think) preorder-to-poset construction. I propose to actually implement it as such and then to use the resulting poset structure to define the lattice structure more easily.

Advantages:

Prerequisites:

MatthiasHu commented 4 months ago

@mzeuner What do you think?

mzeuner commented 2 months ago

Sorry for the late reply. I guess there is a general question about whether we want a (bounded) distributive lattice to be a poset with induced joins and meets or an algebraic structure with an induced order. I went for the latter when setting everything up, but I'm not sure anymore that that was the right choice. So I'm all for trying the other approach.