Documentation
Regex
.
Data
.
BitVec
Search
return to top
source
Imports
Init
Regex.Data.Nat
Imported by
BitVec
.
set
BitVec
.
set_lt
BitVec
.
getElem_set_eq
BitVec
.
getElem_set_ne
BitVec
.
popcount
BitVec
.
popcount_set_not_getElem
BitVec
.
popcount_le
BitVec
.
sub_lt_popcount_set_not_getElem
source
def
BitVec
.
set
{
w
:
Nat
}
(
b
:
BitVec
w
)
(
i
:
Nat
)
:
BitVec
w
Equations
b
.
set
i
=
if
i
<
w
then
b
|||
↑(
1
<<<
i
)
else
b
Instances For
source
@[simp]
theorem
BitVec
.
set_lt
{
w
:
Nat
}
(
b
:
BitVec
w
)
(
i
:
Nat
)
(
h
:
i
<
w
)
:
b
.
set
i
=
b
|||
↑(
1
<<<
i
)
source
theorem
BitVec
.
getElem_set_eq
{
w
:
Nat
}
(
b
:
BitVec
w
)
(
i
:
Nat
)
(
h
:
i
<
w
)
:
(
b
.
set
i
)
[
i
]
=
true
source
theorem
BitVec
.
getElem_set_ne
{
w
:
Nat
}
(
b
:
BitVec
w
)
(
i
j
:
Nat
)
(
h
:
i
<
w
)
(
h'
:
j
<
w
)
(
hne
:
i
≠
j
)
:
(
b
.
set
i
)
[
j
]
=
b
[
j
]
source
def
BitVec
.
popcount
{
w
:
Nat
}
(
b
:
BitVec
w
)
:
Nat
Equations
b
.
popcount
=
b
.
toNat
.
popcount
Instances For
source
theorem
BitVec
.
popcount_set_not_getElem
{
w
:
Nat
}
(
b
:
BitVec
w
)
(
i
:
Nat
)
(
h
:
i
<
w
)
(
h'
:
¬
b
[
i
]
=
true
)
:
(
b
.
set
i
)
.
popcount
=
b
.
popcount
+
1
source
theorem
BitVec
.
popcount_le
{
w
:
Nat
}
(
b
:
BitVec
w
)
:
b
.
popcount
≤
w
source
theorem
BitVec
.
sub_lt_popcount_set_not_getElem
{
w
:
Nat
}
(
b
:
BitVec
w
)
(
i
:
Nat
)
(
h
:
i
<
w
)
(
h'
:
¬
b
[
i
]
=
true
)
:
w
+
1
-
(
b
.
set
i
)
.
popcount
<
w
+
1
-
b
.
popcount