Commit 2023-11-29 12:22 e761b4ee

View on Github →

refactor: replace Bitvec with Std.BitVec (#5920) re-adding definitions and theorems about bitvectors that mathlib has for Bitvec to the new Std.BitVec type, and getting rid of the former. In std, the choice was made to define ult (unsigned less than) and related comparisons as Bool-valued, where the corresponding defs for Bitvec in mathlib are Prop-valued. Std does not have definitions for the respective greater-equal or greater-than comparisons, so we add those here, but we choose to be consistent with std and make them Bool-valued as well, breaking with the old API.

Estimated changes

deleted def Bitvec.Sge
deleted def Bitvec.Sgt
deleted def Bitvec.Sle
deleted def Bitvec.Slt
deleted def Bitvec.Uge
deleted def Bitvec.Ugt
deleted def Bitvec.Ule
deleted def Bitvec.Ult
deleted def Bitvec.adc
deleted def Bitvec.addLsb
deleted def Bitvec.append
deleted def Bitvec.bitsToNat
deleted def Bitvec.ofFin
deleted def Bitvec.sbb
deleted def Bitvec.sborrow
deleted def Bitvec.shl
deleted def Bitvec.sshr
deleted def Bitvec.toFin
deleted def Bitvec.uborrow
deleted def Bitvec.ushr
deleted def Bitvec
added def Std.BitVec.adc
added def Std.BitVec.sbb
deleted theorem Bitvec.addLsb_div_two
deleted theorem Bitvec.bitsToNat_toList
deleted theorem Bitvec.bits_toNat_decide
deleted theorem Bitvec.ofFin_toFin
deleted theorem Bitvec.ofFin_val
deleted theorem Bitvec.ofNat_succ
deleted theorem Bitvec.ofNat_toNat
deleted theorem Bitvec.toFin_ofFin
deleted theorem Bitvec.toFin_val
deleted theorem Bitvec.toNat_append
deleted theorem Bitvec.toNat_lt
deleted theorem Bitvec.toNat_ofNat
added theorem Std.BitVec.ofFin_toFin
added theorem Std.BitVec.ofFin_val
added theorem Std.BitVec.ofNat_toNat
added theorem Std.BitVec.toFin_ofFin
added theorem Std.BitVec.toFin_val
added theorem Std.BitVec.toNat_inj
added theorem Std.BitVec.toNat_lt
added theorem Std.BitVec.toNat_ofFin
added theorem Std.BitVec.toNat_ofNat