Documentation
Std
.
Data
.
Int
.
Gcd
Search
Google site search
return to top
source
Imports
Init
Std.Tactic.Simpa
Std.Data.Int.DivMod
Std.Data.Nat.Gcd
Imported by
Int
.
gcd_dvd_left
Int
.
gcd_dvd_right
Int
.
one_gcd
Int
.
gcd_one
Int
.
neg_gcd
Int
.
gcd_neg
Int
.
lcm
Int
.
lcm_ne_zero
Int
.
dvd_lcm_left
Int
.
dvd_lcm_right
Int
.
lcm_self
Results about
Int.gcd
.
#
source
theorem
Int
.
gcd_dvd_left
{a :
Int
}
{b :
Int
}
:
↑
(
Int.gcd
a
b
)
∣
a
source
theorem
Int
.
gcd_dvd_right
{a :
Int
}
{b :
Int
}
:
↑
(
Int.gcd
a
b
)
∣
b
source
@[simp]
theorem
Int
.
one_gcd
{a :
Int
}
:
Int.gcd
1
a
=
1
source
@[simp]
theorem
Int
.
gcd_one
{a :
Int
}
:
Int.gcd
a
1
=
1
source
@[simp]
theorem
Int
.
neg_gcd
{a :
Int
}
{b :
Int
}
:
Int.gcd
(
-
a
)
b
=
Int.gcd
a
b
source
@[simp]
theorem
Int
.
gcd_neg
{a :
Int
}
{b :
Int
}
:
Int.gcd
a
(
-
b
)
=
Int.gcd
a
b
source
def
Int
.
lcm
(m :
Int
)
(n :
Int
)
:
Nat
Computes the least common multiple of two integers, as a
Nat
.
Equations
Int.lcm
m
n
=
Nat.lcm
(
Int.natAbs
m
)
(
Int.natAbs
n
)
Instances For
source
theorem
Int
.
lcm_ne_zero
{m :
Int
}
{n :
Int
}
(hm :
m
≠
0
)
(hn :
n
≠
0
)
:
Int.lcm
m
n
≠
0
source
theorem
Int
.
dvd_lcm_left
{a :
Int
}
{b :
Int
}
:
a
∣
↑
(
Int.lcm
a
b
)
source
theorem
Int
.
dvd_lcm_right
{a :
Int
}
{b :
Int
}
:
b
∣
↑
(
Int.lcm
a
b
)
source
@[simp]
theorem
Int
.
lcm_self
{a :
Int
}
:
Int.lcm
a
a
=
Int.natAbs
a