math-classes icon indicating copy to clipboard operation
math-classes copied to clipboard

Why does rationals_le use the concrete type nat?

Open langston-barrett opened this issue 8 years ago • 1 comments

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?

langston-barrett avatar Feb 10 '17 23:02 langston-barrett

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

spitters avatar Jun 04 '17 17:06 spitters