Documentation
Regex
.
Data
.
UInt
.
Basic
Search
return to top
source
Imports
Init
Batteries.Data.Fin.Lemmas
Batteries.Data.Nat.Lemmas
Init.Data.BitVec.Basic
Init.Data.BitVec.Lemmas
Init.Data.UInt.Lemmas
Regex.Data.Fin.Basic
Regex.Data.Nat.Basic
Imported by
UInt32
.
add_def'
UInt32
.
sub_def'
UInt32
.
val_ne_of_ne
UInt32
.
one_le_of_lt
UInt32
.
lt_toNat_lt
UInt32
.
toNat_toUInt_eq
UInt32
.
ofNat_eq
UInt32
.
toBitVecToNat_eq_val
UInt32
.
toBitVec_add_ofNat_eq
UInt32
.
ofNat_add_ofNat
UInt32
.
toNat_add_toNat
UInt32
.
toNat_sub_toNat
UInt32
.
toUInt32_add_toUInt32
UInt32
.
toUInt32_one_add
UInt32
.
isValidChar_lt_0x110000
UInt32
.
isValidChar_lt_uintSize
UInt32
.
isValidChar_succ_lt_uintSize
UInt32
.
isValidChar_pred_lt_uintSize
UInt32
.
lt_succ_le
UInt32
.
toNatUnfold
UInt32
.
lt_pred_le
source
theorem
UInt32
.
add_def'
{a b :
UInt32
}
:
a
.add
b
=
a
+
b
source
theorem
UInt32
.
sub_def'
{a b :
UInt32
}
:
a
.sub
b
=
a
-
b
source
theorem
UInt32
.
val_ne_of_ne
{c d :
UInt32
}
(h :
¬
c
=
d
)
:
¬
c
.val
=
d
.val
source
theorem
UInt32
.
one_le_of_lt
{c1 c2 :
UInt32
}
(h :
c1
<
c2
)
:
1
≤
c2
source
theorem
UInt32
.
lt_toNat_lt
{a b :
UInt32
}
(h :
a
<
b
)
:
a
.toNat
<
b
.toNat
source
theorem
UInt32
.
toNat_toUInt_eq
(u :
UInt32
)
:
u
.toNat
.toUInt32
=
u
source
theorem
UInt32
.
ofNat_eq
(n :
Nat
)
(h :
n
<
size
)
:
(
ofNat
n
)
.val
=
⟨
n
,
h
⟩
source
@[simp]
theorem
UInt32
.
toBitVecToNat_eq_val
{u :
UInt32
}
:
u
.toBitVec
.toNat
=
↑
u
.val
source
theorem
UInt32
.
toBitVec_add_ofNat_eq
{n m :
Nat
}
:
(
ofNat
n
)
.toBitVec
+
(
ofNat
m
)
.toBitVec
=
BitVec.ofNat
32
(
↑
(
ofNat
n
)
.val
+
↑
(
ofNat
m
)
.val
)
source
theorem
UInt32
.
ofNat_add_ofNat
(n m :
Nat
)
(hnm :
n
+
m
<
size
)
:
ofNat
n
+
ofNat
m
=
ofNat
(
n
+
m
)
source
theorem
UInt32
.
toNat_add_toNat
(n m :
UInt32
)
(hnm :
↑
n
.val
+
↑
m
.val
<
size
)
:
n
.toNat
+
m
.toNat
=
(
n
+
m
)
.toNat
source
theorem
UInt32
.
toNat_sub_toNat
{n m :
UInt32
}
(hmn :
m
.val
≤
n
.val
)
(h2 :
↑
n
.val
<
size
)
:
n
.toNat
-
m
.toNat
=
(
n
-
m
)
.toNat
source
theorem
UInt32
.
toUInt32_add_toUInt32
(n m :
Nat
)
(hnm :
n
+
m
<
size
)
:
n
.toUInt32
+
m
.toUInt32
=
(
n
+
m
)
.toUInt32
source
theorem
UInt32
.
toUInt32_one_add
(c :
Nat
)
(h :
c
+
1
<
size
)
:
c
.toUInt32
+
1
=
(
c
+
1
)
.toUInt32
source
theorem
UInt32
.
isValidChar_lt_0x110000
(u :
UInt32
)
(h :
u
.isValidChar
)
:
↑
u
.val
<
1114112
source
theorem
UInt32
.
isValidChar_lt_uintSize
(u :
UInt32
)
:
↑
u
.val
<
size
source
theorem
UInt32
.
isValidChar_succ_lt_uintSize
(u :
UInt32
)
(h :
u
.isValidChar
)
:
↑
u
.val
+
1
<
size
source
theorem
UInt32
.
isValidChar_pred_lt_uintSize
(u :
UInt32
)
:
↑
u
.val
-
1
<
size
source
theorem
UInt32
.
lt_succ_le
{c1 c2 :
UInt32
}
(h :
c1
<
c2
)
(hsucc :
↑
c1
.val
+
1
<
size
)
:
c1
+
1
≤
c2
source
theorem
UInt32
.
toNatUnfold
(c1 c2 :
UInt32
)
(heq :
c2
.toNat
-
c1
.toNat
=
(
c2
-
c1
)
.toNat
)
:
↑
c2
.val
-
↑
c1
.val
=
↑
(
c2
-
c1
)
.val
source
theorem
UInt32
.
lt_pred_le
{c1 c2 :
UInt32
}
(h :
c1
<
c2
)
(h2 :
↑
c2
.val
<
size
)
:
c1
≤
c2
-
1