Documentation
Init
.
Data
.
SInt
.
Lemmas
Search
return to top
source
Imports
Init.Data.BitVec.Lemmas
Init.Data.SInt.Basic
Imported by
commandDeclare_int_theorems__
Int8
.
toBitVec_ofNat
Int8
.
ne_iff_toBitVec_ne
Int8
.
le_def
Int8
.
eq_iff_toBitVec_eq
Int8
.
lt_def
Int8
.
toBitVec_inj
Int8
.
toBitVec_ofNatOfNat
Int16
.
ne_iff_toBitVec_ne
Int16
.
toBitVec_ofNatOfNat
Int16
.
le_def
Int16
.
eq_iff_toBitVec_eq
Int16
.
toBitVec_ofNat
Int16
.
toBitVec_inj
Int16
.
lt_def
Int32
.
toBitVec_inj
Int32
.
le_def
Int32
.
lt_def
Int32
.
ne_iff_toBitVec_ne
Int32
.
toBitVec_ofNat
Int32
.
eq_iff_toBitVec_eq
Int32
.
toBitVec_ofNatOfNat
Int64
.
eq_iff_toBitVec_eq
Int64
.
lt_def
Int64
.
toBitVec_ofNat
Int64
.
toBitVec_ofNatOfNat
Int64
.
le_def
Int64
.
ne_iff_toBitVec_ne
Int64
.
toBitVec_inj
ISize
.
eq_iff_toBitVec_eq
ISize
.
le_def
ISize
.
toBitVec_ofNatOfNat
ISize
.
ne_iff_toBitVec_ne
ISize
.
toBitVec_inj
ISize
.
toBitVec_ofNat
ISize
.
lt_def
UInt8
.
toBitVec_toInt8
UInt16
.
toBitVec_toInt16
UInt32
.
toBitVec_toInt32
UInt64
.
toBitVec_toInt64
USize
.
toBitVec_toISize
Int8
.
ofBitVec_uInt8ToBitVec
Int16
.
ofBitVec_uInt16ToBitVec
Int32
.
ofBitVec_uInt32ToBitVec
Int64
.
ofBitVec_uInt64ToBitVec
ISize
.
ofBitVec_uSize8ToBitVec
UInt8
.
toUInt8_toInt8
UInt16
.
toUInt16_toInt16
UInt32
.
toUInt32_toInt32
UInt64
.
toUInt64_toInt64
USize
.
toUSize_toISize
ISize
.
toBitVec_neg
ISize
.
toBitVec_zero
ISize
.
toBitVec_ofInt
Int8
.
neg_zero
Int16
.
neg_zero
Int32
.
neg_zero
Int64
.
neg_zero
ISize
.
neg_zero
ISize
.
toNat_toBitVec_ofNat_of_lt
ISize
.
toInt_ofInt
ISize
.
toNatClampNeg_ofInt_eq_zero
ISize
.
neg_ofInt
ISize
.
ofInt_eq_ofNat
ISize
.
neg_ofNat
ISize
.
toNatClampNeg_ofNat_of_lt
ISize
.
toNatClampNeg_neg_ofNat_of_le
ISize
.
toInt_ofNat_of_lt
ISize
.
toInt_neg_ofNat_of_le
source
def
commandDeclare_int_theorems__
:
Lean.ParserDescr
Equations
One or more equations did not get rendered due to their size.
Instances For
source
@[simp]
theorem
Int8
.
toBitVec_ofNat
{
n
:
Nat
}
:
(
ofNat
n
)
.
toBitVec
=
BitVec.ofNat
8
n
source
theorem
Int8
.
ne_iff_toBitVec_ne
{
a
b
:
Int8
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
Int8
.
le_def
{
a
b
:
Int8
}
:
a
≤
b
↔
a
.
toBitVec
.
sle
b
.
toBitVec
=
true
source
theorem
Int8
.
eq_iff_toBitVec_eq
{
a
b
:
Int8
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
theorem
Int8
.
lt_def
{
a
b
:
Int8
}
:
a
<
b
↔
a
.
toBitVec
.
slt
b
.
toBitVec
=
true
source
theorem
Int8
.
toBitVec_inj
{
a
b
:
Int8
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
@[simp]
theorem
Int8
.
toBitVec_ofNatOfNat
{
n
:
Nat
}
:
(
OfNat.ofNat
n
)
.
toBitVec
=
OfNat.ofNat
n
source
theorem
Int16
.
ne_iff_toBitVec_ne
{
a
b
:
Int16
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
@[simp]
theorem
Int16
.
toBitVec_ofNatOfNat
{
n
:
Nat
}
:
(
OfNat.ofNat
n
)
.
toBitVec
=
OfNat.ofNat
n
source
theorem
Int16
.
le_def
{
a
b
:
Int16
}
:
a
≤
b
↔
a
.
toBitVec
.
sle
b
.
toBitVec
=
true
source
theorem
Int16
.
eq_iff_toBitVec_eq
{
a
b
:
Int16
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
@[simp]
theorem
Int16
.
toBitVec_ofNat
{
n
:
Nat
}
:
(
ofNat
n
)
.
toBitVec
=
BitVec.ofNat
16
n
source
theorem
Int16
.
toBitVec_inj
{
a
b
:
Int16
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
theorem
Int16
.
lt_def
{
a
b
:
Int16
}
:
a
<
b
↔
a
.
toBitVec
.
slt
b
.
toBitVec
=
true
source
theorem
Int32
.
toBitVec_inj
{
a
b
:
Int32
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
theorem
Int32
.
le_def
{
a
b
:
Int32
}
:
a
≤
b
↔
a
.
toBitVec
.
sle
b
.
toBitVec
=
true
source
theorem
Int32
.
lt_def
{
a
b
:
Int32
}
:
a
<
b
↔
a
.
toBitVec
.
slt
b
.
toBitVec
=
true
source
theorem
Int32
.
ne_iff_toBitVec_ne
{
a
b
:
Int32
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
@[simp]
theorem
Int32
.
toBitVec_ofNat
{
n
:
Nat
}
:
(
ofNat
n
)
.
toBitVec
=
BitVec.ofNat
32
n
source
theorem
Int32
.
eq_iff_toBitVec_eq
{
a
b
:
Int32
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
@[simp]
theorem
Int32
.
toBitVec_ofNatOfNat
{
n
:
Nat
}
:
(
OfNat.ofNat
n
)
.
toBitVec
=
OfNat.ofNat
n
source
theorem
Int64
.
eq_iff_toBitVec_eq
{
a
b
:
Int64
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
theorem
Int64
.
lt_def
{
a
b
:
Int64
}
:
a
<
b
↔
a
.
toBitVec
.
slt
b
.
toBitVec
=
true
source
@[simp]
theorem
Int64
.
toBitVec_ofNat
{
n
:
Nat
}
:
(
ofNat
n
)
.
toBitVec
=
BitVec.ofNat
64
n
source
@[simp]
theorem
Int64
.
toBitVec_ofNatOfNat
{
n
:
Nat
}
:
(
OfNat.ofNat
n
)
.
toBitVec
=
OfNat.ofNat
n
source
theorem
Int64
.
le_def
{
a
b
:
Int64
}
:
a
≤
b
↔
a
.
toBitVec
.
sle
b
.
toBitVec
=
true
source
theorem
Int64
.
ne_iff_toBitVec_ne
{
a
b
:
Int64
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
Int64
.
toBitVec_inj
{
a
b
:
Int64
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
theorem
ISize
.
eq_iff_toBitVec_eq
{
a
b
:
ISize
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
theorem
ISize
.
le_def
{
a
b
:
ISize
}
:
a
≤
b
↔
a
.
toBitVec
.
sle
b
.
toBitVec
=
true
source
@[simp]
theorem
ISize
.
toBitVec_ofNatOfNat
{
n
:
Nat
}
:
(
OfNat.ofNat
n
)
.
toBitVec
=
OfNat.ofNat
n
source
theorem
ISize
.
ne_iff_toBitVec_ne
{
a
b
:
ISize
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
ISize
.
toBitVec_inj
{
a
b
:
ISize
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
@[simp]
theorem
ISize
.
toBitVec_ofNat
{
n
:
Nat
}
:
(
ofNat
n
)
.
toBitVec
=
BitVec.ofNat
System.Platform.numBits
n
source
theorem
ISize
.
lt_def
{
a
b
:
ISize
}
:
a
<
b
↔
a
.
toBitVec
.
slt
b
.
toBitVec
=
true
source
@[simp]
theorem
UInt8
.
toBitVec_toInt8
(
x
:
UInt8
)
:
x
.
toInt8
.
toBitVec
=
x
.
toBitVec
source
@[simp]
theorem
UInt16
.
toBitVec_toInt16
(
x
:
UInt16
)
:
x
.
toInt16
.
toBitVec
=
x
.
toBitVec
source
@[simp]
theorem
UInt32
.
toBitVec_toInt32
(
x
:
UInt32
)
:
x
.
toInt32
.
toBitVec
=
x
.
toBitVec
source
@[simp]
theorem
UInt64
.
toBitVec_toInt64
(
x
:
UInt64
)
:
x
.
toInt64
.
toBitVec
=
x
.
toBitVec
source
@[simp]
theorem
USize
.
toBitVec_toISize
(
x
:
USize
)
:
x
.
toISize
.
toBitVec
=
x
.
toBitVec
source
@[simp]
theorem
Int8
.
ofBitVec_uInt8ToBitVec
(
x
:
UInt8
)
:
ofBitVec
x
.
toBitVec
=
x
.
toInt8
source
@[simp]
theorem
Int16
.
ofBitVec_uInt16ToBitVec
(
x
:
UInt16
)
:
ofBitVec
x
.
toBitVec
=
x
.
toInt16
source
@[simp]
theorem
Int32
.
ofBitVec_uInt32ToBitVec
(
x
:
UInt32
)
:
ofBitVec
x
.
toBitVec
=
x
.
toInt32
source
@[simp]
theorem
Int64
.
ofBitVec_uInt64ToBitVec
(
x
:
UInt64
)
:
ofBitVec
x
.
toBitVec
=
x
.
toInt64
source
@[simp]
theorem
ISize
.
ofBitVec_uSize8ToBitVec
(
x
:
USize
)
:
ofBitVec
x
.
toBitVec
=
x
.
toISize
source
@[simp]
theorem
UInt8
.
toUInt8_toInt8
(
x
:
UInt8
)
:
x
.
toInt8
.
toUInt8
=
x
source
@[simp]
theorem
UInt16
.
toUInt16_toInt16
(
x
:
UInt16
)
:
x
.
toInt16
.
toUInt16
=
x
source
@[simp]
theorem
UInt32
.
toUInt32_toInt32
(
x
:
UInt32
)
:
x
.
toInt32
.
toUInt32
=
x
source
@[simp]
theorem
UInt64
.
toUInt64_toInt64
(
x
:
UInt64
)
:
x
.
toInt64
.
toUInt64
=
x
source
@[simp]
theorem
USize
.
toUSize_toISize
(
x
:
USize
)
:
x
.
toISize
.
toUSize
=
x
source
@[simp]
theorem
ISize
.
toBitVec_neg
(
x
:
ISize
)
:
(
-
x
).
toBitVec
=
-
x
.
toBitVec
source
@[simp]
theorem
ISize
.
toBitVec_zero
:
toBitVec
0
=
0
source
@[simp]
theorem
ISize
.
toBitVec_ofInt
(
i
:
Int
)
:
(
ofInt
i
)
.
toBitVec
=
BitVec.ofInt
System.Platform.numBits
i
source
@[simp]
theorem
Int8
.
neg_zero
:
-
0
=
0
source
@[simp]
theorem
Int16
.
neg_zero
:
-
0
=
0
source
@[simp]
theorem
Int32
.
neg_zero
:
-
0
=
0
source
@[simp]
theorem
Int64
.
neg_zero
:
-
0
=
0
source
@[simp]
theorem
ISize
.
neg_zero
:
-
0
=
0
source
theorem
ISize
.
toNat_toBitVec_ofNat_of_lt
{
n
:
Nat
}
(
h
:
n
<
2
^
32
)
:
(
ofNat
n
)
.
toBitVec
.
toNat
=
n
source
theorem
ISize
.
toInt_ofInt
{
n
:
Int
}
(
hn
:
-
2
^
31
≤
n
)
(
hn'
:
n
<
2
^
31
)
:
(
ofInt
n
)
.
toInt
=
n
source
theorem
ISize
.
toNatClampNeg_ofInt_eq_zero
{
n
:
Int
}
(
hn
:
-
2
^
31
≤
n
)
(
hn'
:
n
≤
0
)
:
(
ofInt
n
)
.
toNatClampNeg
=
0
source
theorem
ISize
.
neg_ofInt
{
n
:
Int
}
:
-
ofInt
n
=
ofInt
(
-
n
)
source
theorem
ISize
.
ofInt_eq_ofNat
{
n
:
Nat
}
:
ofInt
↑
n
=
ofNat
n
source
theorem
ISize
.
neg_ofNat
{
n
:
Nat
}
:
-
ofNat
n
=
ofInt
(
-
↑
n
)
source
theorem
ISize
.
toNatClampNeg_ofNat_of_lt
{
n
:
Nat
}
(
h
:
n
<
2
^
31
)
:
(
ofNat
n
)
.
toNatClampNeg
=
n
source
theorem
ISize
.
toNatClampNeg_neg_ofNat_of_le
{
n
:
Nat
}
(
h
:
n
≤
2
^
31
)
:
(
-
ofNat
n
).
toNatClampNeg
=
0
source
theorem
ISize
.
toInt_ofNat_of_lt
{
n
:
Nat
}
(
h
:
n
<
2
^
31
)
:
(
ofNat
n
)
.
toInt
=
↑
n
source
theorem
ISize
.
toInt_neg_ofNat_of_le
{
n
:
Nat
}
(
h
:
n
≤
2
^
31
)
:
(
-
ofNat
n
).
toInt
=
-
↑
n