Skip to content

Make pos and int unary #1913

@Alizter

Description

@Alizter

I think it's time to make Pos and Int into the unary versions. By that I mean removing Pos completely and redefining Int as:

Inductive Int :=
| pos : nat -> Int
| negS : nat -> Int
.

This will remove a lot of the friction we have when working with the integers. To see how bad things are today, have a look at https://github.com/HoTT/Coq-HoTT/blob/master/theories/Algebra/Rings/Z.v

A lot of the problems actually come from Pos where the choice as a binary definition hasn't really been a good one. I think for proofs the unary definition is always better. If in the unlikely circumstance we end up needing to compute something big with unary nats and we want something more efficient, we can always convert across equivalences to an efficient one. (This scenario has yet to be conceived).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions