Skip to content
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

Heyting instances for Dropped, Lifted and Levitated #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

coot
Copy link
Contributor

@coot coot commented Mar 13, 2021

No description provided.

@@ -88,6 +89,12 @@ instance BoundedJoinSemiLattice a => BoundedJoinSemiLattice (Dropped a) where
instance Lattice a => BoundedMeetSemiLattice (Dropped a) where
top = Top

instance (Eq a, Heyting a) => Heyting (Dropped a) where
(Drop a) ==> (Drop b) | Meet a `leq` Meet b = Top
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about this. Why this and not requiring PartialOrd? tough choice. Probably that why I just didn't add an instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PartialOrd must be compatible with Lattice instance which means that both leq :: Meet a -> Meet a -> Bool and leq :: a -> a -> Bool must be give the same result. The argument for using ParitalOrd is that it is be more explicit, and putting Eq a only looks like it is requiring less: having Heyting implies that there is a partial order (the one given by Meet or Join which are the same). In a sense this is indifferent what one would use, and I'd be fine with either of the two, thinking about it now, maybe ParitalOrd would be slightly nicer.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential incompatibility of PartialOrd a and Heyting a is indeed a good point. I have to think this through.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first chapter of Burris & Sankappanavar might help you. It explains that lattices can be defined either as posests with all finite suprema and infima or algebraic structures (as in here). Please excuse me if I am point something that you're well familiar with.

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

Successfully merging this pull request may close these issues.

2 participants