Documentation
Init
.
Data
.
UInt
.
Lemmas
Search
return to top
source
Imports
Init.Data.BitVec.Bitblast
Init.Data.BitVec.Lemmas
Init.Data.Fin.Lemmas
Init.Data.UInt.Basic
Imported by
commandDeclare_uint_theorems__
UInt8
.
toNat_sub_of_le
UInt8
.
toNat_toBitVec_eq_toNat
UInt8
.
toNat_mul
UInt8
.
toBitVec_ne_of_ne
UInt8
.
mod_lt
UInt8
.
le_iff_toNat_le
UInt8
.
val_ofNat
UInt8
.
toNat_mod_lt
UInt8
.
not_le
UInt8
.
toBitVec_inj
UInt8
.
le_antisymm
UInt8
.
ne_of_toBitVec_ne
UInt8
.
val_inj
UInt8
.
ofNat_toNat
UInt8
.
lt_iff_toNat_lt
UInt8
.
one_def
UInt8
.
toNat_toUInt64
UInt8
.
toNat_zero
UInt8
.
lt_def
UInt8
.
toBitVec_eq_of_lt
UInt8
.
zero_def
UInt8
.
le_antisymm_iff
UInt8
.
toNat
.
inj
UInt8
.
toNat_mod
UInt8
.
ne_iff_toBitVec_ne
UInt8
.
lt_trans
UInt8
.
mod_def
UInt8
.
le_refl
UInt8
.
toNat_ofNat_of_lt
UInt8
.
eq_of_toBitVec_eq
UInt8
.
ne_of_lt
UInt8
.
mul_def
UInt8
.
mk_ofNat
UInt8
.
le_total
UInt8
.
lt_asymm
UInt8
.
toNat_add
UInt8
.
toNat_ofNatCore
UInt8
.
mk_toBitVec_eq
UInt8
.
modn_lt
UInt8
.
toNat_div
UInt8
.
toNat_mk
UInt8
.
eq_of_val_eq
UInt8
.
toNat_toUInt32
UInt8
.
lt_irrefl
UInt8
.
sub_def
UInt8
.
eq_iff_toBitVec_eq
UInt8
.
le_trans
UInt8
.
le_def
UInt8
.
add_def
UInt8
.
toBitVec_ofNat
UInt8
.
ofNat_one
UInt8
.
toNat_sub
UInt8
.
toNat_ofNat
UInt8
.
not_lt
UInt8
.
toNat_toUSize
UInt8
.
toNat_lt_size
UInt8
.
toNat_inj
UInt8
.
val_val_eq_toNat
UInt8
.
toBitVec_eq_of_eq
UInt8
.
toNat_toUInt16
UInt16
.
toBitVec_ofNat
UInt16
.
toNat_mod_lt
UInt16
.
lt_def
UInt16
.
toNat_lt_size
UInt16
.
toBitVec_eq_of_lt
UInt16
.
le_refl
UInt16
.
eq_iff_toBitVec_eq
UInt16
.
toNat_toUInt32
UInt16
.
toNat_toUInt64
UInt16
.
toNat_sub
UInt16
.
mul_def
UInt16
.
ofNat_toNat
UInt16
.
sub_def
UInt16
.
le_iff_toNat_le
UInt16
.
eq_of_toBitVec_eq
UInt16
.
val_val_eq_toNat
UInt16
.
toNat_sub_of_le
UInt16
.
toBitVec_ne_of_ne
UInt16
.
toNat_mk
UInt16
.
toNat_toUSize
UInt16
.
le_antisymm
UInt16
.
val_inj
UInt16
.
toNat_toUInt8
UInt16
.
lt_trans
UInt16
.
le_total
UInt16
.
lt_irrefl
UInt16
.
le_antisymm_iff
UInt16
.
toNat_toBitVec_eq_toNat
UInt16
.
mk_toBitVec_eq
UInt16
.
lt_asymm
UInt16
.
mk_ofNat
UInt16
.
le_trans
UInt16
.
toBitVec_eq_of_eq
UInt16
.
ne_of_lt
UInt16
.
mod_lt
UInt16
.
not_lt
UInt16
.
toBitVec_inj
UInt16
.
ne_of_toBitVec_ne
UInt16
.
lt_iff_toNat_lt
UInt16
.
toNat_inj
UInt16
.
mod_def
UInt16
.
toNat_zero
UInt16
.
toNat_ofNat
UInt16
.
eq_of_val_eq
UInt16
.
toNat_div
UInt16
.
toNat_mod
UInt16
.
modn_lt
UInt16
.
add_def
UInt16
.
ofNat_one
UInt16
.
one_def
UInt16
.
toNat_ofNatCore
UInt16
.
val_ofNat
UInt16
.
toNat
.
inj
UInt16
.
toNat_ofNat_of_lt
UInt16
.
not_le
UInt16
.
ne_iff_toBitVec_ne
UInt16
.
le_def
UInt16
.
zero_def
UInt16
.
toNat_mul
UInt16
.
toNat_add
UInt32
.
ne_of_toBitVec_ne
UInt32
.
toNat_mod_lt
UInt32
.
val_inj
UInt32
.
toBitVec_eq_of_lt
UInt32
.
toNat_lt_size
UInt32
.
ofNat_one
UInt32
.
ofNat_toNat
UInt32
.
le_def
UInt32
.
one_def
UInt32
.
lt_asymm
UInt32
.
le_antisymm
UInt32
.
modn_lt
UInt32
.
mk_toBitVec_eq
UInt32
.
ne_iff_toBitVec_ne
UInt32
.
toNat_mk
UInt32
.
not_lt
UInt32
.
toNat_toUInt16
UInt32
.
toNat_ofNat_of_lt
UInt32
.
eq_iff_toBitVec_eq
UInt32
.
toNat_toUSize
UInt32
.
toNat_mul
UInt32
.
lt_iff_toNat_lt
UInt32
.
toBitVec_ne_of_ne
UInt32
.
le_antisymm_iff
UInt32
.
toNat_add
UInt32
.
toNat_zero
UInt32
.
lt_irrefl
UInt32
.
toNat_sub
UInt32
.
eq_of_val_eq
UInt32
.
le_trans
UInt32
.
toBitVec_eq_of_eq
UInt32
.
toBitVec_inj
UInt32
.
toNat_ofNat
UInt32
.
ne_of_lt
UInt32
.
toNat_toUInt8
UInt32
.
sub_def
UInt32
.
lt_trans
UInt32
.
toNat_toBitVec_eq_toNat
UInt32
.
toNat_div
UInt32
.
toNat_ofNatCore
UInt32
.
eq_of_toBitVec_eq
UInt32
.
le_iff_toNat_le
UInt32
.
lt_def
UInt32
.
toNat_inj
UInt32
.
val_ofNat
UInt32
.
mod_lt
UInt32
.
add_def
UInt32
.
toNat_mod
UInt32
.
zero_def
UInt32
.
le_total
UInt32
.
mul_def
UInt32
.
toBitVec_ofNat
UInt32
.
not_le
UInt32
.
mk_ofNat
UInt32
.
mod_def
UInt32
.
toNat_toUInt64
UInt32
.
le_refl
UInt32
.
toNat
.
inj
UInt32
.
val_val_eq_toNat
UInt32
.
toNat_sub_of_le
UInt64
.
toNat_sub_of_le
UInt64
.
val_ofNat
UInt64
.
lt_asymm
UInt64
.
toNat_ofNat
UInt64
.
toNat_add
UInt64
.
le_refl
UInt64
.
toNat
.
inj
UInt64
.
toNat_toBitVec_eq_toNat
UInt64
.
toBitVec_ofNat
UInt64
.
toNat_ofNatCore
UInt64
.
lt_irrefl
UInt64
.
toBitVec_eq_of_lt
UInt64
.
mk_toBitVec_eq
UInt64
.
toNat_toUInt8
UInt64
.
toNat_ofNat_of_lt
UInt64
.
toNat_zero
UInt64
.
toBitVec_ne_of_ne
UInt64
.
eq_of_toBitVec_eq
UInt64
.
val_val_eq_toNat
UInt64
.
lt_def
UInt64
.
le_iff_toNat_le
UInt64
.
toNat_toUInt32
UInt64
.
mk_ofNat
UInt64
.
toBitVec_eq_of_eq
UInt64
.
lt_iff_toNat_lt
UInt64
.
le_total
UInt64
.
toBitVec_inj
UInt64
.
val_inj
UInt64
.
toNat_mod
UInt64
.
ne_of_lt
UInt64
.
lt_trans
UInt64
.
le_antisymm
UInt64
.
toNat_mod_lt
UInt64
.
mod_def
UInt64
.
toNat_toUInt16
UInt64
.
le_trans
UInt64
.
mul_def
UInt64
.
one_def
UInt64
.
toNat_mk
UInt64
.
zero_def
UInt64
.
le_def
UInt64
.
modn_lt
UInt64
.
toNat_toUSize
UInt64
.
le_antisymm_iff
UInt64
.
ofNat_toNat
UInt64
.
add_def
UInt64
.
ne_iff_toBitVec_ne
UInt64
.
toNat_lt_size
UInt64
.
mod_lt
UInt64
.
eq_iff_toBitVec_eq
UInt64
.
toNat_inj
UInt64
.
ofNat_one
UInt64
.
toNat_div
UInt64
.
not_lt
UInt64
.
eq_of_val_eq
UInt64
.
toNat_sub
UInt64
.
ne_of_toBitVec_ne
UInt64
.
not_le
UInt64
.
sub_def
UInt64
.
toNat_mul
USize
.
val_val_eq_toNat
USize
.
toNat_mod_lt
USize
.
toNat_ofNat_of_lt
USize
.
toBitVec_eq_of_eq
USize
.
eq_of_toBitVec_eq
USize
.
lt_def
USize
.
toNat_mk
USize
.
toNat_mod
USize
.
toNat_add
USize
.
not_lt
USize
.
ne_of_toBitVec_ne
USize
.
val_ofNat
USize
.
mk_ofNat
USize
.
le_def
USize
.
toNat_zero
USize
.
ne_of_lt
USize
.
zero_def
USize
.
mk_toBitVec_eq
USize
.
toNat_sub
USize
.
le_refl
USize
.
add_def
USize
.
toNat_mul
USize
.
le_total
USize
.
eq_iff_toBitVec_eq
USize
.
toBitVec_ofNat
USize
.
mod_def
USize
.
le_iff_toNat_le
USize
.
not_le
USize
.
le_antisymm
USize
.
toNat
.
inj
USize
.
sub_def
USize
.
toBitVec_ne_of_ne
USize
.
lt_irrefl
USize
.
toNat_toBitVec_eq_toNat
USize
.
modn_lt
USize
.
toBitVec_eq_of_lt
USize
.
lt_iff_toNat_lt
USize
.
toBitVec_inj
USize
.
ofNat_one
USize
.
le_antisymm_iff
USize
.
val_inj
USize
.
toNat_lt_size
USize
.
eq_of_val_eq
USize
.
lt_asymm
USize
.
mul_def
USize
.
ofNat_toNat
USize
.
mod_lt
USize
.
ne_iff_toBitVec_ne
USize
.
le_trans
USize
.
lt_trans
USize
.
toNat_ofNatCore
USize
.
one_def
USize
.
toNat_sub_of_le
USize
.
toNat_div
USize
.
toNat_ofNat
USize
.
toNat_inj
USize
.
toNat_ofNat32
USize
.
toNat_toUInt32
USize
.
toNat_toUInt64
USize
.
toNat_ofNat_of_lt_32
UInt32
.
toNat_lt_of_lt
UInt32
.
lt_toNat_of_lt
UInt32
.
toNat_le_of_le
UInt32
.
le_toNat_of_le
source
def
commandDeclare_uint_theorems__
:
Lean.ParserDescr
Equations
One or more equations did not get rendered due to their size.
Instances For
source
@[simp]
theorem
UInt8
.
toNat_sub_of_le
(a b :
UInt8
)
:
b
≤
a
→
(
a
-
b
).
toNat
=
a
.
toNat
-
b
.
toNat
source
theorem
UInt8
.
toNat_toBitVec_eq_toNat
(x :
UInt8
)
:
x
.
toBitVec
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt8
.
toNat_mul
(a b :
UInt8
)
:
(
a
*
b
).
toNat
=
a
.
toNat
*
b
.
toNat
%
2
^
8
source
theorem
UInt8
.
toBitVec_ne_of_ne
{a b :
UInt8
}
(h :
a
≠
b
)
:
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
UInt8
.
mod_lt
(a :
UInt8
)
{b :
UInt8
}
:
0
<
b
→
a
%
b
<
b
source
theorem
UInt8
.
le_iff_toNat_le
{a b :
UInt8
}
:
a
≤
b
↔
a
.
toNat
≤
b
.
toNat
source
@[simp]
theorem
UInt8
.
val_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
val
=
OfNat.ofNat
n
source
theorem
UInt8
.
toNat_mod_lt
{m :
Nat
}
(u :
UInt8
)
:
m
>
0
→
(
u
%
ofNat
m
).
toNat
<
m
source
@[simp]
theorem
UInt8
.
not_le
{a b :
UInt8
}
:
¬
a
≤
b
↔
b
<
a
source
theorem
UInt8
.
toBitVec_inj
{a b :
UInt8
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
theorem
UInt8
.
le_antisymm
{a b :
UInt8
}
(h₁ :
a
≤
b
)
(h₂ :
b
≤
a
)
:
a
=
b
source
theorem
UInt8
.
ne_of_toBitVec_ne
{a b :
UInt8
}
(h :
a
.
toBitVec
≠
b
.
toBitVec
)
:
a
≠
b
source
theorem
UInt8
.
val_inj
{a b :
UInt8
}
:
a
.
val
=
b
.
val
↔
a
=
b
source
@[simp]
theorem
UInt8
.
ofNat_toNat
{x :
UInt8
}
:
ofNat
x
.
toNat
=
x
source
theorem
UInt8
.
lt_iff_toNat_lt
{a b :
UInt8
}
:
a
<
b
↔
a
.
toNat
<
b
.
toNat
source
theorem
UInt8
.
one_def
:
1
=
{
toBitVec
:=
1
}
source
@[simp]
theorem
UInt8
.
toNat_toUInt64
(x :
UInt8
)
:
x
.
toUInt64
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt8
.
toNat_zero
:
toNat
0
=
0
source
theorem
UInt8
.
lt_def
{a b :
UInt8
}
:
a
<
b
↔
a
.
toBitVec
<
b
.
toBitVec
source
theorem
UInt8
.
toBitVec_eq_of_lt
{a :
Nat
}
:
a
<
size
→
(
ofNat
a
)
.
toBitVec
.
toNat
=
a
source
theorem
UInt8
.
zero_def
:
0
=
{
toBitVec
:=
0
}
source
theorem
UInt8
.
le_antisymm_iff
{a b :
UInt8
}
:
a
=
b
↔
a
≤
b
∧
b
≤
a
source
theorem
UInt8
.
toNat
.
inj
{a b :
UInt8
}
:
a
.
toNat
=
b
.
toNat
→
a
=
b
source
@[simp]
theorem
UInt8
.
toNat_mod
(a b :
UInt8
)
:
(
a
%
b
).
toNat
=
a
.
toNat
%
b
.
toNat
source
theorem
UInt8
.
ne_iff_toBitVec_ne
{a b :
UInt8
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
UInt8
.
lt_trans
{a b c :
UInt8
}
:
a
<
b
→
b
<
c
→
a
<
c
source
theorem
UInt8
.
mod_def
(a b :
UInt8
)
:
a
%
b
=
{
toBitVec
:=
a
.
toBitVec
%
b
.
toBitVec
}
source
@[simp]
theorem
UInt8
.
le_refl
(a :
UInt8
)
:
a
≤
a
source
theorem
UInt8
.
toNat_ofNat_of_lt
{n :
Nat
}
(h :
n
<
size
)
:
(
ofNat
n
)
.
toNat
=
n
source
theorem
UInt8
.
eq_of_toBitVec_eq
{a b :
UInt8
}
(h :
a
.
toBitVec
=
b
.
toBitVec
)
:
a
=
b
source
theorem
UInt8
.
ne_of_lt
{a b :
UInt8
}
(h :
a
<
b
)
:
a
≠
b
source
theorem
UInt8
.
mul_def
(a b :
UInt8
)
:
a
*
b
=
{
toBitVec
:=
a
.
toBitVec
*
b
.
toBitVec
}
source
@[simp]
theorem
UInt8
.
mk_ofNat
(n :
Nat
)
:
{
toBitVec
:=
BitVec.ofNat
8
n
}
=
OfNat.ofNat
n
source
theorem
UInt8
.
le_total
(a b :
UInt8
)
:
a
≤
b
∨
b
≤
a
source
theorem
UInt8
.
lt_asymm
{a b :
UInt8
}
:
a
<
b
→
¬
b
<
a
source
@[simp]
theorem
UInt8
.
toNat_add
(a b :
UInt8
)
:
(
a
+
b
).
toNat
=
(
a
.
toNat
+
b
.
toNat
)
%
2
^
8
source
@[simp]
theorem
UInt8
.
toNat_ofNatCore
{n :
Nat
}
{h :
n
<
size
}
:
(
ofNatCore
n
h
)
.
toNat
=
n
source
@[simp]
theorem
UInt8
.
mk_toBitVec_eq
(a :
UInt8
)
:
{
toBitVec
:=
a
.
toBitVec
}
=
a
source
@[deprecated UInt8.toNat_mod_lt (since := "2024-09-24")]
theorem
UInt8
.
modn_lt
{m :
Nat
}
(u :
UInt8
)
:
m
>
0
→
(
u
%
m
).
toNat
<
m
source
@[simp]
theorem
UInt8
.
toNat_div
(a b :
UInt8
)
:
(
a
/
b
).
toNat
=
a
.
toNat
/
b
.
toNat
source
@[simp]
theorem
UInt8
.
toNat_mk
{a :
BitVec
8
}
:
{
toBitVec
:=
a
}
.
toNat
=
a
.
toNat
source
theorem
UInt8
.
eq_of_val_eq
{a b :
UInt8
}
(h :
a
.
val
=
b
.
val
)
:
a
=
b
source
@[simp]
theorem
UInt8
.
toNat_toUInt32
(x :
UInt8
)
:
x
.
toUInt32
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt8
.
lt_irrefl
(a :
UInt8
)
:
¬
a
<
a
source
theorem
UInt8
.
sub_def
(a b :
UInt8
)
:
a
-
b
=
{
toBitVec
:=
a
.
toBitVec
-
b
.
toBitVec
}
source
theorem
UInt8
.
eq_iff_toBitVec_eq
{a b :
UInt8
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
theorem
UInt8
.
le_trans
{a b c :
UInt8
}
:
a
≤
b
→
b
≤
c
→
a
≤
c
source
theorem
UInt8
.
le_def
{a b :
UInt8
}
:
a
≤
b
↔
a
.
toBitVec
≤
b
.
toBitVec
source
theorem
UInt8
.
add_def
(a b :
UInt8
)
:
a
+
b
=
{
toBitVec
:=
a
.
toBitVec
+
b
.
toBitVec
}
source
@[simp]
theorem
UInt8
.
toBitVec_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
toBitVec
=
BitVec.ofNat
8
n
source
@[simp]
theorem
UInt8
.
ofNat_one
:
ofNat
1
=
1
source
theorem
UInt8
.
toNat_sub
(a b :
UInt8
)
:
(
a
-
b
).
toNat
=
(
2
^
8
-
b
.
toNat
+
a
.
toNat
)
%
2
^
8
source
@[simp]
theorem
UInt8
.
toNat_ofNat
{n :
Nat
}
:
(
ofNat
n
)
.
toNat
=
n
%
2
^
8
source
@[simp]
theorem
UInt8
.
not_lt
{a b :
UInt8
}
:
¬
a
<
b
↔
b
≤
a
source
@[simp]
theorem
UInt8
.
toNat_toUSize
(x :
UInt8
)
:
x
.
toUSize
.
toNat
=
x
.
toNat
source
theorem
UInt8
.
toNat_lt_size
(a :
UInt8
)
:
a
.
toNat
<
size
source
theorem
UInt8
.
toNat_inj
{a b :
UInt8
}
:
a
.
toNat
=
b
.
toNat
↔
a
=
b
source
@[simp]
theorem
UInt8
.
val_val_eq_toNat
(x :
UInt8
)
:
↑
x
.
val
=
x
.
toNat
source
theorem
UInt8
.
toBitVec_eq_of_eq
{a b :
UInt8
}
(h :
a
=
b
)
:
a
.
toBitVec
=
b
.
toBitVec
source
@[simp]
theorem
UInt8
.
toNat_toUInt16
(x :
UInt8
)
:
x
.
toUInt16
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt16
.
toBitVec_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
toBitVec
=
BitVec.ofNat
16
n
source
theorem
UInt16
.
toNat_mod_lt
{m :
Nat
}
(u :
UInt16
)
:
m
>
0
→
(
u
%
ofNat
m
).
toNat
<
m
source
theorem
UInt16
.
lt_def
{a b :
UInt16
}
:
a
<
b
↔
a
.
toBitVec
<
b
.
toBitVec
source
theorem
UInt16
.
toNat_lt_size
(a :
UInt16
)
:
a
.
toNat
<
size
source
theorem
UInt16
.
toBitVec_eq_of_lt
{a :
Nat
}
:
a
<
size
→
(
ofNat
a
)
.
toBitVec
.
toNat
=
a
source
@[simp]
theorem
UInt16
.
le_refl
(a :
UInt16
)
:
a
≤
a
source
theorem
UInt16
.
eq_iff_toBitVec_eq
{a b :
UInt16
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
@[simp]
theorem
UInt16
.
toNat_toUInt32
(x :
UInt16
)
:
x
.
toUInt32
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt16
.
toNat_toUInt64
(x :
UInt16
)
:
x
.
toUInt64
.
toNat
=
x
.
toNat
source
theorem
UInt16
.
toNat_sub
(a b :
UInt16
)
:
(
a
-
b
).
toNat
=
(
2
^
16
-
b
.
toNat
+
a
.
toNat
)
%
2
^
16
source
theorem
UInt16
.
mul_def
(a b :
UInt16
)
:
a
*
b
=
{
toBitVec
:=
a
.
toBitVec
*
b
.
toBitVec
}
source
@[simp]
theorem
UInt16
.
ofNat_toNat
{x :
UInt16
}
:
ofNat
x
.
toNat
=
x
source
theorem
UInt16
.
sub_def
(a b :
UInt16
)
:
a
-
b
=
{
toBitVec
:=
a
.
toBitVec
-
b
.
toBitVec
}
source
theorem
UInt16
.
le_iff_toNat_le
{a b :
UInt16
}
:
a
≤
b
↔
a
.
toNat
≤
b
.
toNat
source
theorem
UInt16
.
eq_of_toBitVec_eq
{a b :
UInt16
}
(h :
a
.
toBitVec
=
b
.
toBitVec
)
:
a
=
b
source
@[simp]
theorem
UInt16
.
val_val_eq_toNat
(x :
UInt16
)
:
↑
x
.
val
=
x
.
toNat
source
@[simp]
theorem
UInt16
.
toNat_sub_of_le
(a b :
UInt16
)
:
b
≤
a
→
(
a
-
b
).
toNat
=
a
.
toNat
-
b
.
toNat
source
theorem
UInt16
.
toBitVec_ne_of_ne
{a b :
UInt16
}
(h :
a
≠
b
)
:
a
.
toBitVec
≠
b
.
toBitVec
source
@[simp]
theorem
UInt16
.
toNat_mk
{a :
BitVec
16
}
:
{
toBitVec
:=
a
}
.
toNat
=
a
.
toNat
source
@[simp]
theorem
UInt16
.
toNat_toUSize
(x :
UInt16
)
:
x
.
toUSize
.
toNat
=
x
.
toNat
source
theorem
UInt16
.
le_antisymm
{a b :
UInt16
}
(h₁ :
a
≤
b
)
(h₂ :
b
≤
a
)
:
a
=
b
source
theorem
UInt16
.
val_inj
{a b :
UInt16
}
:
a
.
val
=
b
.
val
↔
a
=
b
source
@[simp]
theorem
UInt16
.
toNat_toUInt8
(x :
UInt16
)
:
x
.
toUInt8
.
toNat
=
x
.
toNat
%
2
^
8
source
theorem
UInt16
.
lt_trans
{a b c :
UInt16
}
:
a
<
b
→
b
<
c
→
a
<
c
source
theorem
UInt16
.
le_total
(a b :
UInt16
)
:
a
≤
b
∨
b
≤
a
source
@[simp]
theorem
UInt16
.
lt_irrefl
(a :
UInt16
)
:
¬
a
<
a
source
theorem
UInt16
.
le_antisymm_iff
{a b :
UInt16
}
:
a
=
b
↔
a
≤
b
∧
b
≤
a
source
theorem
UInt16
.
toNat_toBitVec_eq_toNat
(x :
UInt16
)
:
x
.
toBitVec
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt16
.
mk_toBitVec_eq
(a :
UInt16
)
:
{
toBitVec
:=
a
.
toBitVec
}
=
a
source
theorem
UInt16
.
lt_asymm
{a b :
UInt16
}
:
a
<
b
→
¬
b
<
a
source
@[simp]
theorem
UInt16
.
mk_ofNat
(n :
Nat
)
:
{
toBitVec
:=
BitVec.ofNat
16
n
}
=
OfNat.ofNat
n
source
theorem
UInt16
.
le_trans
{a b c :
UInt16
}
:
a
≤
b
→
b
≤
c
→
a
≤
c
source
theorem
UInt16
.
toBitVec_eq_of_eq
{a b :
UInt16
}
(h :
a
=
b
)
:
a
.
toBitVec
=
b
.
toBitVec
source
theorem
UInt16
.
ne_of_lt
{a b :
UInt16
}
(h :
a
<
b
)
:
a
≠
b
source
theorem
UInt16
.
mod_lt
(a :
UInt16
)
{b :
UInt16
}
:
0
<
b
→
a
%
b
<
b
source
@[simp]
theorem
UInt16
.
not_lt
{a b :
UInt16
}
:
¬
a
<
b
↔
b
≤
a
source
theorem
UInt16
.
toBitVec_inj
{a b :
UInt16
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
theorem
UInt16
.
ne_of_toBitVec_ne
{a b :
UInt16
}
(h :
a
.
toBitVec
≠
b
.
toBitVec
)
:
a
≠
b
source
theorem
UInt16
.
lt_iff_toNat_lt
{a b :
UInt16
}
:
a
<
b
↔
a
.
toNat
<
b
.
toNat
source
theorem
UInt16
.
toNat_inj
{a b :
UInt16
}
:
a
.
toNat
=
b
.
toNat
↔
a
=
b
source
theorem
UInt16
.
mod_def
(a b :
UInt16
)
:
a
%
b
=
{
toBitVec
:=
a
.
toBitVec
%
b
.
toBitVec
}
source
@[simp]
theorem
UInt16
.
toNat_zero
:
toNat
0
=
0
source
@[simp]
theorem
UInt16
.
toNat_ofNat
{n :
Nat
}
:
(
ofNat
n
)
.
toNat
=
n
%
2
^
16
source
theorem
UInt16
.
eq_of_val_eq
{a b :
UInt16
}
(h :
a
.
val
=
b
.
val
)
:
a
=
b
source
@[simp]
theorem
UInt16
.
toNat_div
(a b :
UInt16
)
:
(
a
/
b
).
toNat
=
a
.
toNat
/
b
.
toNat
source
@[simp]
theorem
UInt16
.
toNat_mod
(a b :
UInt16
)
:
(
a
%
b
).
toNat
=
a
.
toNat
%
b
.
toNat
source
@[deprecated UInt16.toNat_mod_lt (since := "2024-09-24")]
theorem
UInt16
.
modn_lt
{m :
Nat
}
(u :
UInt16
)
:
m
>
0
→
(
u
%
m
).
toNat
<
m
source
theorem
UInt16
.
add_def
(a b :
UInt16
)
:
a
+
b
=
{
toBitVec
:=
a
.
toBitVec
+
b
.
toBitVec
}
source
@[simp]
theorem
UInt16
.
ofNat_one
:
ofNat
1
=
1
source
theorem
UInt16
.
one_def
:
1
=
{
toBitVec
:=
1
}
source
@[simp]
theorem
UInt16
.
toNat_ofNatCore
{n :
Nat
}
{h :
n
<
size
}
:
(
ofNatCore
n
h
)
.
toNat
=
n
source
@[simp]
theorem
UInt16
.
val_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
val
=
OfNat.ofNat
n
source
theorem
UInt16
.
toNat
.
inj
{a b :
UInt16
}
:
a
.
toNat
=
b
.
toNat
→
a
=
b
source
theorem
UInt16
.
toNat_ofNat_of_lt
{n :
Nat
}
(h :
n
<
size
)
:
(
ofNat
n
)
.
toNat
=
n
source
@[simp]
theorem
UInt16
.
not_le
{a b :
UInt16
}
:
¬
a
≤
b
↔
b
<
a
source
theorem
UInt16
.
ne_iff_toBitVec_ne
{a b :
UInt16
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
UInt16
.
le_def
{a b :
UInt16
}
:
a
≤
b
↔
a
.
toBitVec
≤
b
.
toBitVec
source
theorem
UInt16
.
zero_def
:
0
=
{
toBitVec
:=
0
}
source
@[simp]
theorem
UInt16
.
toNat_mul
(a b :
UInt16
)
:
(
a
*
b
).
toNat
=
a
.
toNat
*
b
.
toNat
%
2
^
16
source
@[simp]
theorem
UInt16
.
toNat_add
(a b :
UInt16
)
:
(
a
+
b
).
toNat
=
(
a
.
toNat
+
b
.
toNat
)
%
2
^
16
source
theorem
UInt32
.
ne_of_toBitVec_ne
{a b :
UInt32
}
(h :
a
.
toBitVec
≠
b
.
toBitVec
)
:
a
≠
b
source
theorem
UInt32
.
toNat_mod_lt
{m :
Nat
}
(u :
UInt32
)
:
m
>
0
→
(
u
%
ofNat
m
).
toNat
<
m
source
theorem
UInt32
.
val_inj
{a b :
UInt32
}
:
a
.
val
=
b
.
val
↔
a
=
b
source
theorem
UInt32
.
toBitVec_eq_of_lt
{a :
Nat
}
:
a
<
size
→
(
ofNat
a
)
.
toBitVec
.
toNat
=
a
source
theorem
UInt32
.
toNat_lt_size
(a :
UInt32
)
:
a
.
toNat
<
size
source
@[simp]
theorem
UInt32
.
ofNat_one
:
ofNat
1
=
1
source
@[simp]
theorem
UInt32
.
ofNat_toNat
{x :
UInt32
}
:
ofNat
x
.
toNat
=
x
source
theorem
UInt32
.
le_def
{a b :
UInt32
}
:
a
≤
b
↔
a
.
toBitVec
≤
b
.
toBitVec
source
theorem
UInt32
.
one_def
:
1
=
{
toBitVec
:=
1
}
source
theorem
UInt32
.
lt_asymm
{a b :
UInt32
}
:
a
<
b
→
¬
b
<
a
source
theorem
UInt32
.
le_antisymm
{a b :
UInt32
}
(h₁ :
a
≤
b
)
(h₂ :
b
≤
a
)
:
a
=
b
source
@[deprecated UInt32.toNat_mod_lt (since := "2024-09-24")]
theorem
UInt32
.
modn_lt
{m :
Nat
}
(u :
UInt32
)
:
m
>
0
→
(
u
%
m
).
toNat
<
m
source
@[simp]
theorem
UInt32
.
mk_toBitVec_eq
(a :
UInt32
)
:
{
toBitVec
:=
a
.
toBitVec
}
=
a
source
theorem
UInt32
.
ne_iff_toBitVec_ne
{a b :
UInt32
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
@[simp]
theorem
UInt32
.
toNat_mk
{a :
BitVec
32
}
:
{
toBitVec
:=
a
}
.
toNat
=
a
.
toNat
source
@[simp]
theorem
UInt32
.
not_lt
{a b :
UInt32
}
:
¬
a
<
b
↔
b
≤
a
source
@[simp]
theorem
UInt32
.
toNat_toUInt16
(x :
UInt32
)
:
x
.
toUInt16
.
toNat
=
x
.
toNat
%
2
^
16
source
theorem
UInt32
.
toNat_ofNat_of_lt
{n :
Nat
}
(h :
n
<
size
)
:
(
ofNat
n
)
.
toNat
=
n
source
theorem
UInt32
.
eq_iff_toBitVec_eq
{a b :
UInt32
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
@[simp]
theorem
UInt32
.
toNat_toUSize
(x :
UInt32
)
:
x
.
toUSize
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt32
.
toNat_mul
(a b :
UInt32
)
:
(
a
*
b
).
toNat
=
a
.
toNat
*
b
.
toNat
%
2
^
32
source
theorem
UInt32
.
lt_iff_toNat_lt
{a b :
UInt32
}
:
a
<
b
↔
a
.
toNat
<
b
.
toNat
source
theorem
UInt32
.
toBitVec_ne_of_ne
{a b :
UInt32
}
(h :
a
≠
b
)
:
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
UInt32
.
le_antisymm_iff
{a b :
UInt32
}
:
a
=
b
↔
a
≤
b
∧
b
≤
a
source
@[simp]
theorem
UInt32
.
toNat_add
(a b :
UInt32
)
:
(
a
+
b
).
toNat
=
(
a
.
toNat
+
b
.
toNat
)
%
2
^
32
source
@[simp]
theorem
UInt32
.
toNat_zero
:
toNat
0
=
0
source
@[simp]
theorem
UInt32
.
lt_irrefl
(a :
UInt32
)
:
¬
a
<
a
source
theorem
UInt32
.
toNat_sub
(a b :
UInt32
)
:
(
a
-
b
).
toNat
=
(
2
^
32
-
b
.
toNat
+
a
.
toNat
)
%
2
^
32
source
theorem
UInt32
.
eq_of_val_eq
{a b :
UInt32
}
(h :
a
.
val
=
b
.
val
)
:
a
=
b
source
theorem
UInt32
.
le_trans
{a b c :
UInt32
}
:
a
≤
b
→
b
≤
c
→
a
≤
c
source
theorem
UInt32
.
toBitVec_eq_of_eq
{a b :
UInt32
}
(h :
a
=
b
)
:
a
.
toBitVec
=
b
.
toBitVec
source
theorem
UInt32
.
toBitVec_inj
{a b :
UInt32
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
@[simp]
theorem
UInt32
.
toNat_ofNat
{n :
Nat
}
:
(
ofNat
n
)
.
toNat
=
n
%
2
^
32
source
theorem
UInt32
.
ne_of_lt
{a b :
UInt32
}
(h :
a
<
b
)
:
a
≠
b
source
@[simp]
theorem
UInt32
.
toNat_toUInt8
(x :
UInt32
)
:
x
.
toUInt8
.
toNat
=
x
.
toNat
%
2
^
8
source
theorem
UInt32
.
sub_def
(a b :
UInt32
)
:
a
-
b
=
{
toBitVec
:=
a
.
toBitVec
-
b
.
toBitVec
}
source
theorem
UInt32
.
lt_trans
{a b c :
UInt32
}
:
a
<
b
→
b
<
c
→
a
<
c
source
theorem
UInt32
.
toNat_toBitVec_eq_toNat
(x :
UInt32
)
:
x
.
toBitVec
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt32
.
toNat_div
(a b :
UInt32
)
:
(
a
/
b
).
toNat
=
a
.
toNat
/
b
.
toNat
source
@[simp]
theorem
UInt32
.
toNat_ofNatCore
{n :
Nat
}
{h :
n
<
size
}
:
(
ofNatCore
n
h
)
.
toNat
=
n
source
theorem
UInt32
.
eq_of_toBitVec_eq
{a b :
UInt32
}
(h :
a
.
toBitVec
=
b
.
toBitVec
)
:
a
=
b
source
theorem
UInt32
.
le_iff_toNat_le
{a b :
UInt32
}
:
a
≤
b
↔
a
.
toNat
≤
b
.
toNat
source
theorem
UInt32
.
lt_def
{a b :
UInt32
}
:
a
<
b
↔
a
.
toBitVec
<
b
.
toBitVec
source
theorem
UInt32
.
toNat_inj
{a b :
UInt32
}
:
a
.
toNat
=
b
.
toNat
↔
a
=
b
source
@[simp]
theorem
UInt32
.
val_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
val
=
OfNat.ofNat
n
source
theorem
UInt32
.
mod_lt
(a :
UInt32
)
{b :
UInt32
}
:
0
<
b
→
a
%
b
<
b
source
theorem
UInt32
.
add_def
(a b :
UInt32
)
:
a
+
b
=
{
toBitVec
:=
a
.
toBitVec
+
b
.
toBitVec
}
source
@[simp]
theorem
UInt32
.
toNat_mod
(a b :
UInt32
)
:
(
a
%
b
).
toNat
=
a
.
toNat
%
b
.
toNat
source
theorem
UInt32
.
zero_def
:
0
=
{
toBitVec
:=
0
}
source
theorem
UInt32
.
le_total
(a b :
UInt32
)
:
a
≤
b
∨
b
≤
a
source
theorem
UInt32
.
mul_def
(a b :
UInt32
)
:
a
*
b
=
{
toBitVec
:=
a
.
toBitVec
*
b
.
toBitVec
}
source
@[simp]
theorem
UInt32
.
toBitVec_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
toBitVec
=
BitVec.ofNat
32
n
source
@[simp]
theorem
UInt32
.
not_le
{a b :
UInt32
}
:
¬
a
≤
b
↔
b
<
a
source
@[simp]
theorem
UInt32
.
mk_ofNat
(n :
Nat
)
:
{
toBitVec
:=
BitVec.ofNat
32
n
}
=
OfNat.ofNat
n
source
theorem
UInt32
.
mod_def
(a b :
UInt32
)
:
a
%
b
=
{
toBitVec
:=
a
.
toBitVec
%
b
.
toBitVec
}
source
@[simp]
theorem
UInt32
.
toNat_toUInt64
(x :
UInt32
)
:
x
.
toUInt64
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt32
.
le_refl
(a :
UInt32
)
:
a
≤
a
source
theorem
UInt32
.
toNat
.
inj
{a b :
UInt32
}
:
a
.
toNat
=
b
.
toNat
→
a
=
b
source
@[simp]
theorem
UInt32
.
val_val_eq_toNat
(x :
UInt32
)
:
↑
x
.
val
=
x
.
toNat
source
@[simp]
theorem
UInt32
.
toNat_sub_of_le
(a b :
UInt32
)
:
b
≤
a
→
(
a
-
b
).
toNat
=
a
.
toNat
-
b
.
toNat
source
@[simp]
theorem
UInt64
.
toNat_sub_of_le
(a b :
UInt64
)
:
b
≤
a
→
(
a
-
b
).
toNat
=
a
.
toNat
-
b
.
toNat
source
@[simp]
theorem
UInt64
.
val_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
val
=
OfNat.ofNat
n
source
theorem
UInt64
.
lt_asymm
{a b :
UInt64
}
:
a
<
b
→
¬
b
<
a
source
@[simp]
theorem
UInt64
.
toNat_ofNat
{n :
Nat
}
:
(
ofNat
n
)
.
toNat
=
n
%
2
^
64
source
@[simp]
theorem
UInt64
.
toNat_add
(a b :
UInt64
)
:
(
a
+
b
).
toNat
=
(
a
.
toNat
+
b
.
toNat
)
%
2
^
64
source
@[simp]
theorem
UInt64
.
le_refl
(a :
UInt64
)
:
a
≤
a
source
theorem
UInt64
.
toNat
.
inj
{a b :
UInt64
}
:
a
.
toNat
=
b
.
toNat
→
a
=
b
source
theorem
UInt64
.
toNat_toBitVec_eq_toNat
(x :
UInt64
)
:
x
.
toBitVec
.
toNat
=
x
.
toNat
source
@[simp]
theorem
UInt64
.
toBitVec_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
toBitVec
=
BitVec.ofNat
64
n
source
@[simp]
theorem
UInt64
.
toNat_ofNatCore
{n :
Nat
}
{h :
n
<
size
}
:
(
ofNatCore
n
h
)
.
toNat
=
n
source
@[simp]
theorem
UInt64
.
lt_irrefl
(a :
UInt64
)
:
¬
a
<
a
source
theorem
UInt64
.
toBitVec_eq_of_lt
{a :
Nat
}
:
a
<
size
→
(
ofNat
a
)
.
toBitVec
.
toNat
=
a
source
@[simp]
theorem
UInt64
.
mk_toBitVec_eq
(a :
UInt64
)
:
{
toBitVec
:=
a
.
toBitVec
}
=
a
source
@[simp]
theorem
UInt64
.
toNat_toUInt8
(x :
UInt64
)
:
x
.
toUInt8
.
toNat
=
x
.
toNat
%
2
^
8
source
theorem
UInt64
.
toNat_ofNat_of_lt
{n :
Nat
}
(h :
n
<
size
)
:
(
ofNat
n
)
.
toNat
=
n
source
@[simp]
theorem
UInt64
.
toNat_zero
:
toNat
0
=
0
source
theorem
UInt64
.
toBitVec_ne_of_ne
{a b :
UInt64
}
(h :
a
≠
b
)
:
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
UInt64
.
eq_of_toBitVec_eq
{a b :
UInt64
}
(h :
a
.
toBitVec
=
b
.
toBitVec
)
:
a
=
b
source
@[simp]
theorem
UInt64
.
val_val_eq_toNat
(x :
UInt64
)
:
↑
x
.
val
=
x
.
toNat
source
theorem
UInt64
.
lt_def
{a b :
UInt64
}
:
a
<
b
↔
a
.
toBitVec
<
b
.
toBitVec
source
theorem
UInt64
.
le_iff_toNat_le
{a b :
UInt64
}
:
a
≤
b
↔
a
.
toNat
≤
b
.
toNat
source
@[simp]
theorem
UInt64
.
toNat_toUInt32
(x :
UInt64
)
:
x
.
toUInt32
.
toNat
=
x
.
toNat
%
2
^
32
source
@[simp]
theorem
UInt64
.
mk_ofNat
(n :
Nat
)
:
{
toBitVec
:=
BitVec.ofNat
64
n
}
=
OfNat.ofNat
n
source
theorem
UInt64
.
toBitVec_eq_of_eq
{a b :
UInt64
}
(h :
a
=
b
)
:
a
.
toBitVec
=
b
.
toBitVec
source
theorem
UInt64
.
lt_iff_toNat_lt
{a b :
UInt64
}
:
a
<
b
↔
a
.
toNat
<
b
.
toNat
source
theorem
UInt64
.
le_total
(a b :
UInt64
)
:
a
≤
b
∨
b
≤
a
source
theorem
UInt64
.
toBitVec_inj
{a b :
UInt64
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
theorem
UInt64
.
val_inj
{a b :
UInt64
}
:
a
.
val
=
b
.
val
↔
a
=
b
source
@[simp]
theorem
UInt64
.
toNat_mod
(a b :
UInt64
)
:
(
a
%
b
).
toNat
=
a
.
toNat
%
b
.
toNat
source
theorem
UInt64
.
ne_of_lt
{a b :
UInt64
}
(h :
a
<
b
)
:
a
≠
b
source
theorem
UInt64
.
lt_trans
{a b c :
UInt64
}
:
a
<
b
→
b
<
c
→
a
<
c
source
theorem
UInt64
.
le_antisymm
{a b :
UInt64
}
(h₁ :
a
≤
b
)
(h₂ :
b
≤
a
)
:
a
=
b
source
theorem
UInt64
.
toNat_mod_lt
{m :
Nat
}
(u :
UInt64
)
:
m
>
0
→
(
u
%
ofNat
m
).
toNat
<
m
source
theorem
UInt64
.
mod_def
(a b :
UInt64
)
:
a
%
b
=
{
toBitVec
:=
a
.
toBitVec
%
b
.
toBitVec
}
source
@[simp]
theorem
UInt64
.
toNat_toUInt16
(x :
UInt64
)
:
x
.
toUInt16
.
toNat
=
x
.
toNat
%
2
^
16
source
theorem
UInt64
.
le_trans
{a b c :
UInt64
}
:
a
≤
b
→
b
≤
c
→
a
≤
c
source
theorem
UInt64
.
mul_def
(a b :
UInt64
)
:
a
*
b
=
{
toBitVec
:=
a
.
toBitVec
*
b
.
toBitVec
}
source
theorem
UInt64
.
one_def
:
1
=
{
toBitVec
:=
1
}
source
@[simp]
theorem
UInt64
.
toNat_mk
{a :
BitVec
64
}
:
{
toBitVec
:=
a
}
.
toNat
=
a
.
toNat
source
theorem
UInt64
.
zero_def
:
0
=
{
toBitVec
:=
0
}
source
theorem
UInt64
.
le_def
{a b :
UInt64
}
:
a
≤
b
↔
a
.
toBitVec
≤
b
.
toBitVec
source
@[deprecated UInt64.toNat_mod_lt (since := "2024-09-24")]
theorem
UInt64
.
modn_lt
{m :
Nat
}
(u :
UInt64
)
:
m
>
0
→
(
u
%
m
).
toNat
<
m
source
@[simp]
theorem
UInt64
.
toNat_toUSize
(x :
UInt64
)
:
x
.
toUSize
.
toNat
=
x
.
toNat
%
2
^
System.Platform.numBits
source
theorem
UInt64
.
le_antisymm_iff
{a b :
UInt64
}
:
a
=
b
↔
a
≤
b
∧
b
≤
a
source
@[simp]
theorem
UInt64
.
ofNat_toNat
{x :
UInt64
}
:
ofNat
x
.
toNat
=
x
source
theorem
UInt64
.
add_def
(a b :
UInt64
)
:
a
+
b
=
{
toBitVec
:=
a
.
toBitVec
+
b
.
toBitVec
}
source
theorem
UInt64
.
ne_iff_toBitVec_ne
{a b :
UInt64
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
UInt64
.
toNat_lt_size
(a :
UInt64
)
:
a
.
toNat
<
size
source
theorem
UInt64
.
mod_lt
(a :
UInt64
)
{b :
UInt64
}
:
0
<
b
→
a
%
b
<
b
source
theorem
UInt64
.
eq_iff_toBitVec_eq
{a b :
UInt64
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
theorem
UInt64
.
toNat_inj
{a b :
UInt64
}
:
a
.
toNat
=
b
.
toNat
↔
a
=
b
source
@[simp]
theorem
UInt64
.
ofNat_one
:
ofNat
1
=
1
source
@[simp]
theorem
UInt64
.
toNat_div
(a b :
UInt64
)
:
(
a
/
b
).
toNat
=
a
.
toNat
/
b
.
toNat
source
@[simp]
theorem
UInt64
.
not_lt
{a b :
UInt64
}
:
¬
a
<
b
↔
b
≤
a
source
theorem
UInt64
.
eq_of_val_eq
{a b :
UInt64
}
(h :
a
.
val
=
b
.
val
)
:
a
=
b
source
theorem
UInt64
.
toNat_sub
(a b :
UInt64
)
:
(
a
-
b
).
toNat
=
(
2
^
64
-
b
.
toNat
+
a
.
toNat
)
%
2
^
64
source
theorem
UInt64
.
ne_of_toBitVec_ne
{a b :
UInt64
}
(h :
a
.
toBitVec
≠
b
.
toBitVec
)
:
a
≠
b
source
@[simp]
theorem
UInt64
.
not_le
{a b :
UInt64
}
:
¬
a
≤
b
↔
b
<
a
source
theorem
UInt64
.
sub_def
(a b :
UInt64
)
:
a
-
b
=
{
toBitVec
:=
a
.
toBitVec
-
b
.
toBitVec
}
source
@[simp]
theorem
UInt64
.
toNat_mul
(a b :
UInt64
)
:
(
a
*
b
).
toNat
=
a
.
toNat
*
b
.
toNat
%
2
^
64
source
@[simp]
theorem
USize
.
val_val_eq_toNat
(x :
USize
)
:
↑
x
.
val
=
x
.
toNat
source
theorem
USize
.
toNat_mod_lt
{m :
Nat
}
(u :
USize
)
:
m
>
0
→
(
u
%
ofNat
m
).
toNat
<
m
source
theorem
USize
.
toNat_ofNat_of_lt
{n :
Nat
}
(h :
n
<
size
)
:
(
ofNat
n
)
.
toNat
=
n
source
theorem
USize
.
toBitVec_eq_of_eq
{a b :
USize
}
(h :
a
=
b
)
:
a
.
toBitVec
=
b
.
toBitVec
source
theorem
USize
.
eq_of_toBitVec_eq
{a b :
USize
}
(h :
a
.
toBitVec
=
b
.
toBitVec
)
:
a
=
b
source
theorem
USize
.
lt_def
{a b :
USize
}
:
a
<
b
↔
a
.
toBitVec
<
b
.
toBitVec
source
@[simp]
theorem
USize
.
toNat_mk
{a :
BitVec
System.Platform.numBits
}
:
{
toBitVec
:=
a
}
.
toNat
=
a
.
toNat
source
@[simp]
theorem
USize
.
toNat_mod
(a b :
USize
)
:
(
a
%
b
).
toNat
=
a
.
toNat
%
b
.
toNat
source
@[simp]
theorem
USize
.
toNat_add
(a b :
USize
)
:
(
a
+
b
).
toNat
=
(
a
.
toNat
+
b
.
toNat
)
%
2
^
System.Platform.numBits
source
@[simp]
theorem
USize
.
not_lt
{a b :
USize
}
:
¬
a
<
b
↔
b
≤
a
source
theorem
USize
.
ne_of_toBitVec_ne
{a b :
USize
}
(h :
a
.
toBitVec
≠
b
.
toBitVec
)
:
a
≠
b
source
@[simp]
theorem
USize
.
val_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
val
=
OfNat.ofNat
n
source
@[simp]
theorem
USize
.
mk_ofNat
(n :
Nat
)
:
{
toBitVec
:=
BitVec.ofNat
System.Platform.numBits
n
}
=
OfNat.ofNat
n
source
theorem
USize
.
le_def
{a b :
USize
}
:
a
≤
b
↔
a
.
toBitVec
≤
b
.
toBitVec
source
@[simp]
theorem
USize
.
toNat_zero
:
toNat
0
=
0
source
theorem
USize
.
ne_of_lt
{a b :
USize
}
(h :
a
<
b
)
:
a
≠
b
source
theorem
USize
.
zero_def
:
0
=
{
toBitVec
:=
0
}
source
@[simp]
theorem
USize
.
mk_toBitVec_eq
(a :
USize
)
:
{
toBitVec
:=
a
.
toBitVec
}
=
a
source
theorem
USize
.
toNat_sub
(a b :
USize
)
:
(
a
-
b
).
toNat
=
(
2
^
System.Platform.numBits
-
b
.
toNat
+
a
.
toNat
)
%
2
^
System.Platform.numBits
source
@[simp]
theorem
USize
.
le_refl
(a :
USize
)
:
a
≤
a
source
theorem
USize
.
add_def
(a b :
USize
)
:
a
+
b
=
{
toBitVec
:=
a
.
toBitVec
+
b
.
toBitVec
}
source
@[simp]
theorem
USize
.
toNat_mul
(a b :
USize
)
:
(
a
*
b
).
toNat
=
a
.
toNat
*
b
.
toNat
%
2
^
System.Platform.numBits
source
theorem
USize
.
le_total
(a b :
USize
)
:
a
≤
b
∨
b
≤
a
source
theorem
USize
.
eq_iff_toBitVec_eq
{a b :
USize
}
:
a
=
b
↔
a
.
toBitVec
=
b
.
toBitVec
source
@[simp]
theorem
USize
.
toBitVec_ofNat
(n :
Nat
)
:
(
OfNat.ofNat
n
)
.
toBitVec
=
BitVec.ofNat
System.Platform.numBits
n
source
theorem
USize
.
mod_def
(a b :
USize
)
:
a
%
b
=
{
toBitVec
:=
a
.
toBitVec
%
b
.
toBitVec
}
source
theorem
USize
.
le_iff_toNat_le
{a b :
USize
}
:
a
≤
b
↔
a
.
toNat
≤
b
.
toNat
source
@[simp]
theorem
USize
.
not_le
{a b :
USize
}
:
¬
a
≤
b
↔
b
<
a
source
theorem
USize
.
le_antisymm
{a b :
USize
}
(h₁ :
a
≤
b
)
(h₂ :
b
≤
a
)
:
a
=
b
source
theorem
USize
.
toNat
.
inj
{a b :
USize
}
:
a
.
toNat
=
b
.
toNat
→
a
=
b
source
theorem
USize
.
sub_def
(a b :
USize
)
:
a
-
b
=
{
toBitVec
:=
a
.
toBitVec
-
b
.
toBitVec
}
source
theorem
USize
.
toBitVec_ne_of_ne
{a b :
USize
}
(h :
a
≠
b
)
:
a
.
toBitVec
≠
b
.
toBitVec
source
@[simp]
theorem
USize
.
lt_irrefl
(a :
USize
)
:
¬
a
<
a
source
theorem
USize
.
toNat_toBitVec_eq_toNat
(x :
USize
)
:
x
.
toBitVec
.
toNat
=
x
.
toNat
source
@[deprecated USize.toNat_mod_lt (since := "2024-09-24")]
theorem
USize
.
modn_lt
{m :
Nat
}
(u :
USize
)
:
m
>
0
→
(
u
%
m
).
toNat
<
m
source
theorem
USize
.
toBitVec_eq_of_lt
{a :
Nat
}
:
a
<
size
→
(
ofNat
a
)
.
toBitVec
.
toNat
=
a
source
theorem
USize
.
lt_iff_toNat_lt
{a b :
USize
}
:
a
<
b
↔
a
.
toNat
<
b
.
toNat
source
theorem
USize
.
toBitVec_inj
{a b :
USize
}
:
a
.
toBitVec
=
b
.
toBitVec
↔
a
=
b
source
@[simp]
theorem
USize
.
ofNat_one
:
ofNat
1
=
1
source
theorem
USize
.
le_antisymm_iff
{a b :
USize
}
:
a
=
b
↔
a
≤
b
∧
b
≤
a
source
theorem
USize
.
val_inj
{a b :
USize
}
:
a
.
val
=
b
.
val
↔
a
=
b
source
theorem
USize
.
toNat_lt_size
(a :
USize
)
:
a
.
toNat
<
size
source
theorem
USize
.
eq_of_val_eq
{a b :
USize
}
(h :
a
.
val
=
b
.
val
)
:
a
=
b
source
theorem
USize
.
lt_asymm
{a b :
USize
}
:
a
<
b
→
¬
b
<
a
source
theorem
USize
.
mul_def
(a b :
USize
)
:
a
*
b
=
{
toBitVec
:=
a
.
toBitVec
*
b
.
toBitVec
}
source
@[simp]
theorem
USize
.
ofNat_toNat
{x :
USize
}
:
ofNat
x
.
toNat
=
x
source
theorem
USize
.
mod_lt
(a :
USize
)
{b :
USize
}
:
0
<
b
→
a
%
b
<
b
source
theorem
USize
.
ne_iff_toBitVec_ne
{a b :
USize
}
:
a
≠
b
↔
a
.
toBitVec
≠
b
.
toBitVec
source
theorem
USize
.
le_trans
{a b c :
USize
}
:
a
≤
b
→
b
≤
c
→
a
≤
c
source
theorem
USize
.
lt_trans
{a b c :
USize
}
:
a
<
b
→
b
<
c
→
a
<
c
source
@[simp]
theorem
USize
.
toNat_ofNatCore
{n :
Nat
}
{h :
n
<
size
}
:
(
ofNatCore
n
h
)
.
toNat
=
n
source
theorem
USize
.
one_def
:
1
=
{
toBitVec
:=
1
}
source
@[simp]
theorem
USize
.
toNat_sub_of_le
(a b :
USize
)
:
b
≤
a
→
(
a
-
b
).
toNat
=
a
.
toNat
-
b
.
toNat
source
@[simp]
theorem
USize
.
toNat_div
(a b :
USize
)
:
(
a
/
b
).
toNat
=
a
.
toNat
/
b
.
toNat
source
@[simp]
theorem
USize
.
toNat_ofNat
{n :
Nat
}
:
(
ofNat
n
)
.
toNat
=
n
%
2
^
System.Platform.numBits
source
theorem
USize
.
toNat_inj
{a b :
USize
}
:
a
.
toNat
=
b
.
toNat
↔
a
=
b
source
@[simp]
theorem
USize
.
toNat_ofNat32
{n :
Nat
}
{h :
n
<
4294967296
}
:
(
ofNat32
n
h
)
.
toNat
=
n
source
@[simp]
theorem
USize
.
toNat_toUInt32
(x :
USize
)
:
x
.
toUInt32
.
toNat
=
x
.
toNat
%
2
^
32
source
@[simp]
theorem
USize
.
toNat_toUInt64
(x :
USize
)
:
x
.
toUInt64
.
toNat
=
x
.
toNat
source
theorem
USize
.
toNat_ofNat_of_lt_32
{n :
Nat
}
(h :
n
<
4294967296
)
:
(
ofNat
n
)
.
toNat
=
n
source
theorem
UInt32
.
toNat_lt_of_lt
{n :
UInt32
}
{m :
Nat
}
(h :
m
<
size
)
:
n
<
ofNat
m
→
n
.
toNat
<
m
source
theorem
UInt32
.
lt_toNat_of_lt
{n :
UInt32
}
{m :
Nat
}
(h :
m
<
size
)
:
ofNat
m
<
n
→
m
<
n
.
toNat
source
theorem
UInt32
.
toNat_le_of_le
{n :
UInt32
}
{m :
Nat
}
(h :
m
<
size
)
:
n
≤
ofNat
m
→
n
.
toNat
≤
m
source
theorem
UInt32
.
le_toNat_of_le
{n :
UInt32
}
{m :
Nat
}
(h :
m
<
size
)
:
ofNat
m
≤
n
→
m
≤
n
.
toNat