hilbert
6
Search
☰
About
Tutorial
Roadmap
Get involved
Reference manual
Blueprint
API docs
Papers
About
Tutorial
Roadmap
Get involved
Reference manual
Blueprint
API docs
Papers
GitHub
return to top
source
Imports
Init.Data.Int.ToString
Init.Data.String.Search
Init.Data.String.Slice
Init.Data.String.TakeDrop
Init.Data.ToString.Extra
Std.Data.String.ToNat
Init.Data.String.Lemmas.Pattern.TakeDrop.Basic
Init.Data.String.Lemmas.Pattern.TakeDrop.Char
Imported by
String
.
Slice
.
toInt?_eq_some_iff
String
.
Slice
.
isSome_toInt?
String
.
Slice
.
isInt_of_toInt?_eq_some
String
.
Slice
.
toInt?_eq_none_iff
String
.
Slice
.
toInt?_eq_none
String
.
Slice
.
isInt_iff
String
.
Slice
.
isInt_of_isNat
String
.
Slice
.
toInt?_eq_toNat?_of_startsWith_eq_false
String
.
Slice
.
toInt?_eq_of_eq_minus_append
String
.
Slice
.
toInt?_eq_some_of_toNat?_eq_some
String
.
Slice
.
toInt?_congr
String
.
Slice
.
isInt_congr
String
.
isInt_toSlice
String
.
isInt_comp_toSlice
String
.
toInt?_toSlice
String
.
toInt?_comp_toSlice
String
.
Slice
.
isInt_copy
String
.
Slice
.
isInt_comp_copy
String
.
Slice
.
toInt?_copy
String
.
Slice
.
toInt?_comp_copy
String
.
toInt?_eq_some_iff
String
.
isSome_toInt?
String
.
isInt_of_toInt?_eq_some
String
.
toInt?_eq_none_iff
String
.
toInt?_eq_none
String
.
isInt_iff
String
.
isInt_of_isNat
String
.
toInt?_eq_toNat?_of_startsWith_eq_false
String
.
toInt?_minus_append
String
.
toInt?_eq_some_of_toNat?_eq_some
Nat
.
toInt?_repr
Nat
.
isInt_repr
Int
.
toInt?_repr
Int
.
isInt_repr
Int
.
repr_injective
Int
.
repr_inj
Std
.
Data
.
String
.
ToInt
source
theorem
String
.
Slice
.
toInt?_eq_some_iff
{
s
:
Slice
}
{
a
:
Int
}
:
s
.
toInt?
=
some
a
↔
(
∃
(
b
:
Nat
)
,
s
.
toNat?
=
some
b
∧
a
=
↑
b
)
∨
∃
(
t
:
String
)
,
s
.
copy
=
"-"
++
t
∧
∃
(
b
:
Nat
)
,
t
.
toNat?
=
some
b
∧
a
=
-
↑
b
source
@[simp]
theorem
String
.
Slice
.
isSome_toInt?
{
s
:
Slice
}
:
s
.
toInt?
.
isSome
=
s
.
isInt
source
theorem
String
.
Slice
.
isInt_of_toInt?_eq_some
{
a
:
Int
}
{
s
:
Slice
}
(
h
:
s
.
toInt?
=
some
a
)
:
s
.
isInt
=
true
source
@[simp]
theorem
String
.
Slice
.
toInt?_eq_none_iff
{
s
:
Slice
}
:
s
.
toInt?
=
none
↔
s
.
isInt
=
false
source
theorem
String
.
Slice
.
toInt?_eq_none
{
s
:
Slice
}
(
h
:
s
.
isInt
=
false
)
:
s
.
toInt?
=
none
source
theorem
String
.
Slice
.
isInt_iff
{
s
:
Slice
}
:
s
.
isInt
=
true
↔
s
.
isNat
=
true
∨
∃
(
t
:
String
)
,
s
.
copy
=
"-"
++
t
∧
t
.
isNat
=
true
source
theorem
String
.
Slice
.
isInt_of_isNat
{
s
:
Slice
}
(
h
:
s
.
isNat
=
true
)
:
s
.
isInt
=
true
source
theorem
String
.
Slice
.
toInt?_eq_toNat?_of_startsWith_eq_false
{
s
:
Slice
}
(
h
:
s
.
startsWith
'-'
=
false
)
:
s
.
toInt?
=
Option.map
(fun (
n
:
Nat
) =>
↑
n
)
s
.
toNat?
source
theorem
String
.
Slice
.
toInt?_eq_of_eq_minus_append
{
s
:
Slice
}
{
t
:
String
}
(
h
:
s
.
copy
=
"-"
++
t
)
:
s
.
toInt?
=
Option.map
(fun (
n
:
Nat
) =>
-
↑
n
)
t
.
toNat?
source
theorem
String
.
Slice
.
toInt?_eq_some_of_toNat?_eq_some
{
s
:
Slice
}
{
a
:
Nat
}
(
h
:
s
.
toNat?
=
some
a
)
:
s
.
toInt?
=
some
↑
a
source
theorem
String
.
Slice
.
toInt?_congr
{
s
t
:
Slice
}
(
h
:
s
.
copy
=
t
.
copy
)
:
s
.
toInt?
=
t
.
toInt?
source
theorem
String
.
Slice
.
isInt_congr
{
s
t
:
Slice
}
(
h
:
s
.
copy
=
t
.
copy
)
:
s
.
isInt
=
t
.
isInt
source
@[simp]
theorem
String
.
isInt_toSlice
{
s
:
String
}
:
s
.
toSlice
.
isInt
=
s
.
isInt
source
@[simp]
theorem
String
.
isInt_comp_toSlice
:
Slice.isInt
∘
toSlice
=
isInt
source
@[simp]
theorem
String
.
toInt?_toSlice
{
s
:
String
}
:
s
.
toSlice
.
toInt?
=
s
.
toInt?
source
@[simp]
theorem
String
.
toInt?_comp_toSlice
:
Slice.toInt?
∘
toSlice
=
toInt?
source
@[simp]
theorem
String
.
Slice
.
isInt_copy
{
s
:
Slice
}
:
s
.
copy
.
isInt
=
s
.
isInt
source
@[simp]
theorem
String
.
Slice
.
isInt_comp_copy
:
String.isInt
∘
copy
=
isInt
source
@[simp]
theorem
String
.
Slice
.
toInt?_copy
{
s
:
Slice
}
:
s
.
copy
.
toInt?
=
s
.
toInt?
source
@[simp]
theorem
String
.
Slice
.
toInt?_comp_copy
:
String.toInt?
∘
copy
=
toInt?
source
theorem
String
.
toInt?_eq_some_iff
{
s
:
String
}
{
a
:
Int
}
:
s
.
toInt?
=
some
a
↔
(
∃
(
b
:
Nat
)
,
s
.
toNat?
=
some
b
∧
a
=
↑
b
)
∨
∃
(
t
:
String
)
,
s
=
"-"
++
t
∧
∃
(
b
:
Nat
)
,
t
.
toNat?
=
some
b
∧
a
=
-
↑
b
source
@[simp]
theorem
String
.
isSome_toInt?
{
s
:
String
}
:
s
.
toInt?
.
isSome
=
s
.
isInt
source
theorem
String
.
isInt_of_toInt?_eq_some
{
a
:
Int
}
{
s
:
String
}
(
h
:
s
.
toInt?
=
some
a
)
:
s
.
isInt
=
true
source
@[simp]
theorem
String
.
toInt?_eq_none_iff
{
s
:
String
}
:
s
.
toInt?
=
none
↔
s
.
isInt
=
false
source
theorem
String
.
toInt?_eq_none
{
s
:
String
}
(
h
:
s
.
isInt
=
false
)
:
s
.
toInt?
=
none
source
theorem
String
.
isInt_iff
{
s
:
String
}
:
s
.
isInt
=
true
↔
s
.
isNat
=
true
∨
∃
(
t
:
String
)
,
s
=
"-"
++
t
∧
t
.
isNat
=
true
source
theorem
String
.
isInt_of_isNat
{
s
:
String
}
(
h
:
s
.
isNat
=
true
)
:
s
.
isInt
=
true
source
theorem
String
.
toInt?_eq_toNat?_of_startsWith_eq_false
{
s
:
String
}
(
h
:
s
.
startsWith
'-'
=
false
)
:
s
.
toInt?
=
Option.map
(fun (
a
:
Nat
) =>
↑
a
)
s
.
toNat?
source
@[simp]
theorem
String
.
toInt?_minus_append
{
s
:
String
}
:
(
"-"
++
s
).
toInt?
=
Option.map
(fun (
n
:
Nat
) =>
-
↑
n
)
s
.
toNat?
source
theorem
String
.
toInt?_eq_some_of_toNat?_eq_some
{
s
:
String
}
{
a
:
Nat
}
(
h
:
s
.
toNat?
=
some
a
)
:
s
.
toInt?
=
some
↑
a
source
@[simp]
theorem
Nat
.
toInt?_repr
(
n
:
Nat
)
:
n
.
repr
.
toInt?
=
some
↑
n
source
@[simp]
theorem
Nat
.
isInt_repr
(
n
:
Nat
)
:
n
.
repr
.
isInt
=
true
source
@[simp]
theorem
Int
.
toInt?_repr
(
a
:
Int
)
:
a
.
repr
.
toInt?
=
some
a
source
@[simp]
theorem
Int
.
isInt_repr
(
a
:
Int
)
:
a
.
repr
.
isInt
=
true
source
theorem
Int
.
repr_injective
{
a
b
:
Int
}
(
h
:
a
.
repr
=
b
.
repr
)
:
a
=
b
source
@[simp]
theorem
Int
.
repr_inj
{
a
b
:
Int
}
:
a
.
repr
=
b
.
repr
↔
a
=
b