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

Why does rationals_le use the concrete type nat? #30

Open
langston-barrett opened this issue Feb 10, 2017 · 1 comment
Open

Why does rationals_le use the concrete type nat? #30

langston-barrett opened this issue Feb 10, 2017 · 1 comment

Comments

@langston-barrett
Copy link
Contributor

I was surprised when unfolding rationals_le to see that it specifies that le x y if there is a fraction p/q made of nats such that y=x+p/q:

Instance rationals_le `{Rationals Q} : Le Q | 10 := λ x y,
  ∃ num, ∃ den, y = x + naturals_to_semiring nat Q num / naturals_to_semiring nat Q den.

Why not use any type that is an instance of Naturals?

@spitters
Copy link
Collaborator

spitters commented Jun 4, 2017

I agree. It seems better to generalize this to general instances.

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

No branches or pull requests

2 participants