Documentation
Projects
.
Misc
.
StringLogic
Search
return to top
source
Imports
Init
Projects.Util
Imported by
StringLogic
.
Str
StringLogic
.
le
StringLogic
.
lt
StringLogic
.
addOne
StringLogic
.
isPrefix
StringLogic
.
len
StringLogic
.
odd
StringLogic
.
le_correct
StringLogic
.
lt_correct
StringLogic
.
addOne_correct
StringLogic
.
isPrefix_correct
StringLogic
.
len_correct
StringLogic
.
odd_correct
source
@[reducible, inline]
abbrev
StringLogic
.
Str
:
Type
Equations
StringLogic.Str
=
List
Bit
Instances For
source
def
StringLogic
.
le
(
n
m
:
ℕ
)
:
Prop
Equations
StringLogic.le
n
m
=
∀ (
X
:
StringLogic.Str
),
X
[
m
]
?
≠
none
→
X
[
n
]
?
≠
none
Instances For
source
def
StringLogic
.
lt
(
n
m
:
ℕ
)
:
Prop
Equations
StringLogic.lt
n
m
=
(
n
≤
m
∧
n
≠
m
)
Instances For
source
def
StringLogic
.
addOne
(
n
m
:
ℕ
)
:
Prop
Equations
StringLogic.addOne
n
m
=
(
n
<
m
∧
∀
k
<
m
,
k
≤
n
)
Instances For
source
def
StringLogic
.
isPrefix
(
X
Y
:
Str
)
:
Prop
Equations
StringLogic.isPrefix
X
Y
=
∀ (
z
:
ℕ
),
X
[
z
]
?
=
Y
[
z
]
?
∨
X
[
z
]
?
=
none
Instances For
source
def
StringLogic
.
len
(
X
:
Str
)
(
y
:
ℕ
)
:
Prop
Equations
StringLogic.len
X
y
=
(
X
[
y
]
?
=
none
∧
∀
z
<
y
,
X
[
z
]
?
≠
none
)
Instances For
source
def
StringLogic
.
odd
(
n
:
ℕ
)
:
Prop
Equations
StringLogic.odd
n
=
∃ (
X
:
StringLogic.Str
),
List.length
X
=
n
+
1
∧
X
[
0
]
?
=
some
0
∧
(∀
y
<
n
,
(
X
[
y
]
?
=
some
0
→
X
[
y
+
1
]
?
=
some
1
)
∧
(
X
[
y
]
?
=
some
1
→
X
[
y
+
1
]
?
=
some
0
)
)
∧
X
[
n
]
?
=
some
1
Instances For
source
theorem
StringLogic
.
le_correct
{
n
m
:
ℕ
}
:
le
n
m
↔
n
≤
m
source
theorem
StringLogic
.
lt_correct
{
n
m
:
ℕ
}
:
lt
n
m
↔
n
<
m
source
theorem
StringLogic
.
addOne_correct
{
n
m
:
ℕ
}
:
addOne
n
m
↔
n
+
1
=
m
source
theorem
StringLogic
.
isPrefix_correct
{
X
Y
:
Str
}
:
isPrefix
X
Y
↔
X
<+:
Y
source
theorem
StringLogic
.
len_correct
{
X
:
Str
}
{
y
:
ℕ
}
:
len
X
y
↔
List.length
X
=
y
source
theorem
StringLogic
.
odd_correct
{
n
:
ℕ
}
:
odd
n
↔
Odd
n