Skip to content

Conversation

@coot
Copy link
Contributor

@coot coot commented Mar 13, 2021

No description provided.

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