HepLean Documentation
Init
.
SizeOfLemmas
Search
Google site search
return to top
source
Imports
Init.Meta
Init.SizeOf
Init.Data.Nat.Linear
Imported by
Fin
.
sizeOf
UInt8
.
sizeOf
UInt16
.
sizeOf
UInt32
.
sizeOf
UInt64
.
sizeOf
USize
.
sizeOf
Char
.
sizeOf
Subtype
.
sizeOf
source
@[simp]
theorem
Fin
.
sizeOf
{n :
Nat
}
(a :
Fin
n
)
:
sizeOf
a
=
↑
a
+
1
source
@[simp]
theorem
UInt8
.
sizeOf
(a :
UInt8
)
:
sizeOf
a
=
a
.toNat
+
2
source
@[simp]
theorem
UInt16
.
sizeOf
(a :
UInt16
)
:
sizeOf
a
=
a
.toNat
+
2
source
@[simp]
theorem
UInt32
.
sizeOf
(a :
UInt32
)
:
sizeOf
a
=
a
.toNat
+
2
source
@[simp]
theorem
UInt64
.
sizeOf
(a :
UInt64
)
:
sizeOf
a
=
a
.toNat
+
2
source
@[simp]
theorem
USize
.
sizeOf
(a :
USize
)
:
sizeOf
a
=
a
.toNat
+
2
source
@[simp]
theorem
Char
.
sizeOf
(a :
Char
)
:
sizeOf
a
=
a
.toNat
+
3
source
@[simp]
theorem
Subtype
.
sizeOf
{α :
Sort
u_1}
{p :
α
→
Prop
}
(s :
Subtype
p
)
:
sizeOf
s
=
sizeOf
s
.val
+
1