Documentation
Init
.
SizeOfLemmas
Search
Google site search
Init
.
SizeOfLemmas
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
.val
+
1
source
@[simp]
theorem
UInt8
.
sizeOf
(a :
UInt8
)
:
sizeOf
a
=
UInt8.toNat
a
+
2
source
@[simp]
theorem
UInt16
.
sizeOf
(a :
UInt16
)
:
sizeOf
a
=
UInt16.toNat
a
+
2
source
@[simp]
theorem
UInt32
.
sizeOf
(a :
UInt32
)
:
sizeOf
a
=
UInt32.toNat
a
+
2
source
@[simp]
theorem
UInt64
.
sizeOf
(a :
UInt64
)
:
sizeOf
a
=
UInt64.toNat
a
+
2
source
@[simp]
theorem
USize
.
sizeOf
(a :
USize
)
:
sizeOf
a
=
USize.toNat
a
+
2
source
@[simp]
theorem
Char
.
sizeOf
(a :
Char
)
:
sizeOf
a
=
Char.toNat
a
+
3
source
@[simp]
theorem
Subtype
.
sizeOf
{α :
Sort
u_1}
{p :
α
→
Prop
}
(s :
Subtype
p
)
:
sizeOf
s
=
sizeOf
s
.val
+
1