Skip to content

Why does rationals_le use the concrete type nat? #30

Open

Description

@langston-barrett

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?

Activity

  1. spitters commented on Jun 4, 2017

    @spitters
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions