Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Remove asCommutativeRing from Heyting #94

Merged
merged 2 commits into from
Oct 14, 2015
Merged

Remove asCommutativeRing from Heyting #94

merged 2 commits into from
Oct 14, 2015

Conversation

johnynek
Copy link
Contributor

Addresses the issue in #89

@non
Copy link
Contributor

non commented Oct 14, 2015

👍

@non non merged commit eec8ada into master Oct 14, 2015
def zero: A = self.zero
def one: A = self.one
def plus(x: A, y: A): A = self.xor(x, y)
def negate(x: A): A = self.complement(x)
Copy link
Collaborator

Choose a reason for hiding this comment

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

negate here is still broken. It should be

def negate(x: A): A = x

Copy link
Contributor

Choose a reason for hiding this comment

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

Aha, right. I'll fix that now. Thanks!

@TomasMikula
Copy link
Collaborator

Also note that if we had a type BoolRing, it could implement negate (to be negate(x) = x) and then the instance returned from Bool#asCommutativeRing would not have to override negate.

@non
Copy link
Contributor

non commented Oct 14, 2015

Let's open an issue about possibly adding BoolRing, and I will submit a PR to fix this bug. (I also want to ensure that we have a test that detects this issue.)

@TomasMikula
Copy link
Collaborator

Sounds good, I will open the issue.

@larsrh larsrh deleted the move-asCommutativeRing branch February 13, 2019 18:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants