Documentation
Init
.
Data
.
Int
.
LemmasAux
Search
return to top
source
Imports
Init.Omega
Init.Data.Int.Order
Init.Data.Int.DivMod.Lemmas
Imported by
Int
.
toNat_sub'
Int
.
toNat_sub_max_self
Int
.
toNat_sub_self_max
Int
.
bmod_neg_iff
Int
.
natCast_le_zero
Int
.
toNat_eq_zero
Int
.
eq_zero_of_dvd_of_natAbs_lt_natAbs
Int
.
bmod_eq_self_of_le
Further lemmas about
Int
relying on
omega
automation.
#
source
@[simp]
theorem
Int
.
toNat_sub'
(
a
:
Int
)
(
b
:
Nat
)
:
(
a
-
↑
b
).
toNat
=
a
.
toNat
-
b
source
@[simp]
theorem
Int
.
toNat_sub_max_self
(
a
:
Int
)
:
(
a
-
max
a
0
).
toNat
=
0
source
@[simp]
theorem
Int
.
toNat_sub_self_max
(
a
:
Int
)
:
(
a
-
max
0
a
).
toNat
=
0
source
theorem
Int
.
bmod_neg_iff
{
m
:
Nat
}
{
x
:
Int
}
(
h2
:
-
↑
m
≤
x
)
(
h1
:
x
<
↑
m
)
:
x
.
bmod
m
<
0
↔
-
(
↑
m
/
2
)
≤
x
∧
x
<
0
∨
(
↑
m
+
1
)
/
2
≤
x
source
@[simp]
theorem
Int
.
natCast_le_zero
{
n
:
Nat
}
:
↑
n
≤
0
↔
n
=
0
source
@[simp]
theorem
Int
.
toNat_eq_zero
{
n
:
Int
}
:
n
.
toNat
=
0
↔
n
≤
0
source
theorem
Int
.
eq_zero_of_dvd_of_natAbs_lt_natAbs
{
d
n
:
Int
}
(
h
:
d
∣
n
)
(
h₁
:
n
.
natAbs
<
d
.
natAbs
)
:
n
=
0
source
theorem
Int
.
bmod_eq_self_of_le
{
n
:
Int
}
{
m
:
Nat
}
(
hn'
:
-
(
↑
m
/
2
)
≤
n
)
(
hn
:
n
<
(
↑
m
+
1
)
/
2
)
:
n
.
bmod
m
=
n