Skip to content

lib2.0 : ℕᵇ (binary) can be pure unlike . #2362

Open
@mechvel

Description

@mechvel

I recall it and return to pointing out that:
in lib-2.0 the part of Data.Nat.Binary.Properties
has several proofs that cannot be considered as reliable.
Their badness is in that the proofs

(Ps)   +-assoc, +-comm, *-assoc, *-comm

and some other,
rely on similar proofs for (unary representation) by using the isomoprphism to .
But these proofs for are not implemented as the first class, are not reliable. Because Nat._+_ and Nat._*_ are implemented as built-in, not in Agda. So that these proofs for are not about the real algorithms for computing these operations.

And ℕᵇ is different. Its arithmetic is implemented totally in Agda.
The corresponding proofs can also be implemented totally in Agda.
In this sense, ℕᵇ is a better Agda model for natural numbers than .
So that it is better to untie ℕᵇ from , because using proofs for spoils the purity of ℕᵇ.

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