CoqEAL binint, ported to Lean — sign + magnitude refines ℤ #
CoqEAL's binint refines MathComp integers to a signed representation. Here a
Bool × List Bool — a sign bit (true = negative) with a little-endian
magnitude — refines ℤ via toInt, reusing BinNat.toNat for the magnitude.
The concrete sign flip binNeg refines ℤ negation (the CoqEAL Rneg square).
The relation is non-injective (+0 and -0 both denote 0), a map-level
refinement — the same shape as the companion binnat, seqpoly, and seqmatrix
data refinements.
@[reducible, inline]
A sign bit (true = negative) with a little-endian magnitude, refining ℤ.
Instances For
Decode a signed binary to the integer it denotes.