Skip to content

Algebraic semilattice theories are missing #676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
HuStmpHrrr opened this issue Mar 30, 2019 · 14 comments · Fixed by #1108
Closed

Algebraic semilattice theories are missing #676

HuStmpHrrr opened this issue Mar 30, 2019 · 14 comments · Fixed by #1108

Comments

@HuStmpHrrr
Copy link
Member

What do you think?

In Algebra, only Lattice is defined. However, Semilattices are going to be helpful. I can do it in May if it's wanted.

#439 might also need to be considered if we want to complicate various order theoretic definitions.

@MatthewDaggitt
Copy link
Contributor

I think it already exists. The algebras are classified by the number and types of operators so it's near the top of the file with semigroups.

record Semilattice c ℓ : Set (suc (c ⊔ ℓ)) where
infixr 7 _∧_
infix 4 _≈_
field
Carrier : Set c
_≈_ : Rel Carrier ℓ
_∧_ : Op₂ Carrier
isSemilattice : IsSemilattice _≈_ _∧_

@HuStmpHrrr
Copy link
Member Author

HuStmpHrrr commented Mar 31, 2019

yeah that's true. what about bounded semilattice? that one I believe is missing. I am looking for the same concepts in algebras that have been implemented on the order theoretical side. I believe both bounded semilattice and bounded lattice are missing. I need to reason these algebraic structures recently, hence the question.

@MatthewDaggitt
Copy link
Contributor

Yup, there's no bounded semilattice so feel free to add it. The next question is what structure it inherits from...

The idea that I've been using so far is group the hierarchy by the signature of its operators. This is the only way I can see of doing it consistently, as the names of such structures aren't particularly consistent.
Therefore in this case BoundedSemilattice should inherit from CommutativeMonoid rather than Semilattice.

@JacquesCarette
Copy link
Contributor

I've got a couple hundred theories that should be considered if we're going to start down that road.

Also, the above IsSemilattice is on two arguments but

record IsSemilattice (∧ : Op₂ A) : Set (a ⊔ ℓ) where
field
isBand : IsBand ∧
comm : Commutative ∧
has only one. [I used the experimental branch, is that right?]. So something's odd there.

@MatthewDaggitt
Copy link
Contributor

@HuStmpHrrr just found bounded semilattices, they're called IsIdempotentCommutativeMonoid in the file.

Also, the above IsSemilattice is on two arguments but ... has only one. So something's odd there.

@JacquesCarette If I understand your question correctly, the equality is missing because it's provided as a module parameter at the top of the file.

@HuStmpHrrr
Copy link
Member Author

@MatthewDaggitt wow indeed, it's so hard to notice. what about creating an alias for it?

@JacquesCarette
Copy link
Contributor

That is indeed not an obvious place to look for IsEquivalence. But I guess it makes sense, now that I think about it.

Note that having an 'alias' IsBoundedLattice for IsIdempotentCommutativeMonoid would massively improve findability! You're expecting your readers to know too much Algebra.

@MatthewDaggitt
Copy link
Contributor

MatthewDaggitt commented Apr 4, 2019

@MatthewDaggitt wow indeed, it's so hard to notice. what about creating an alias for it?

Yup! Sounds like a plan! Note that you'll also need to create an alias for the module as well so that people can write open IsBoundedSemilattice.

@MatthewDaggitt
Copy link
Contributor

Note that having an 'alias' IsBoundedLattice for IsIdempotentCommutativeMonoid would massively improve findability! You're expecting your readers to know too much Algebra.

Haha no expectations on my part! I only myself realised that the two were equivalent when I read up on them just now.

@laMudri
Copy link
Contributor

laMudri commented Oct 16, 2019

So, I notice we have a few lattice-like structures in Algebra, and a more comprehensive collection in Relation.Binary.Lattice. Also, this new definition of BoundedLattice in Algebra is incorrect as far as I understand; it should be BoundedSemilattice. It's also not by necessity that this one can't have lattice-like notation; open ... public renaming (...) should be used here.

I think it would be nice to deprecate all of the lattice stuff in Algebra in favour of the structures in Relation.Binary.Lattice, and then have lemmas somewhere relating idempotent commutative structures to lattices.

@HuStmpHrrr
Copy link
Member Author

HuStmpHrrr commented Oct 16, 2019

you are very much correct. it should be BoundedSemilattice. what I don't follow is the second part: the two groups of definitions of lattices are not the same. why would you remove the algebraic definitions?

@JacquesCarette
Copy link
Contributor

It can be very useful (even in Univalent settings) to have 2 equivalent formulations of a complex theory. Bill Farmer, Michael Kohlhase and I have dubbed such settings 'realms'. The point is that in practice, one 'interface' to a theory (like Lattice) might be much easier to work with than the other. Forcing computations to necessarily translation can be very inefficient. In other words, I am very happy with the redundancy of definition of theories.

@laMudri
Copy link
Contributor

laMudri commented Oct 17, 2019

I was thinking the difference between the two definitions wasn't really that much, but maybe starting from the order versus starting from the operator(s) is big enough to warrant having the two separately. In that case, the collection of definitions in Algebra probably should be improved.

More generally, I agree that equivalent formulations are just as important in univalent and non-univalent settings.

@MatthewDaggitt
Copy link
Contributor

Bounded semilattices are being added in #1108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants