Documentation
Init
.
Data
.
Nat
.
Lcm
Search
Google site search
return to top
source
Imports
Init.Data.Nat.Gcd
Init.Data.Nat.Lemmas
Imported by
Nat
.
lcm
Nat
.
lcm_comm
Nat
.
instCommutativeLcm
Nat
.
lcm_zero_left
Nat
.
lcm_zero_right
Nat
.
lcm_one_left
Nat
.
lcm_one_right
Nat
.
instLawfulIdentityLcmOfNat
Nat
.
lcm_self
Nat
.
instIdempotentOpLcm
Nat
.
dvd_lcm_left
Nat
.
dvd_lcm_right
Nat
.
gcd_mul_lcm
Nat
.
lcm_dvd
Nat
.
lcm_assoc
Nat
.
instAssociativeLcm
Nat
.
lcm_ne_zero
source
def
Nat
.
lcm
(m n :
Nat
)
:
Nat
The least common multiple of
m
and
n
, defined using
gcd
.
Equations
m
.lcm
n
=
m
*
n
/
m
.gcd
n
Instances For
source
theorem
Nat
.
lcm_comm
(m n :
Nat
)
:
m
.lcm
n
=
n
.lcm
m
source
theorem
Nat
.
instCommutativeLcm
:
Std.Commutative
Nat.lcm
source
@[simp]
theorem
Nat
.
lcm_zero_left
(m :
Nat
)
:
Nat.lcm
0
m
=
0
source
@[simp]
theorem
Nat
.
lcm_zero_right
(m :
Nat
)
:
m
.lcm
0
=
0
source
@[simp]
theorem
Nat
.
lcm_one_left
(m :
Nat
)
:
Nat.lcm
1
m
=
m
source
@[simp]
theorem
Nat
.
lcm_one_right
(m :
Nat
)
:
m
.lcm
1
=
m
source
theorem
Nat
.
instLawfulIdentityLcmOfNat
:
Std.LawfulIdentity
Nat.lcm
1
source
@[simp]
theorem
Nat
.
lcm_self
(m :
Nat
)
:
m
.lcm
m
=
m
source
theorem
Nat
.
instIdempotentOpLcm
:
Std.IdempotentOp
Nat.lcm
source
theorem
Nat
.
dvd_lcm_left
(m n :
Nat
)
:
m
∣
m
.lcm
n
source
theorem
Nat
.
dvd_lcm_right
(m n :
Nat
)
:
n
∣
m
.lcm
n
source
theorem
Nat
.
gcd_mul_lcm
(m n :
Nat
)
:
m
.gcd
n
*
m
.lcm
n
=
m
*
n
source
theorem
Nat
.
lcm_dvd
{m n k :
Nat
}
(H1 :
m
∣
k
)
(H2 :
n
∣
k
)
:
m
.lcm
n
∣
k
source
theorem
Nat
.
lcm_assoc
(m n k :
Nat
)
:
(
m
.lcm
n
)
.lcm
k
=
m
.lcm
(
n
.lcm
k
)
source
theorem
Nat
.
instAssociativeLcm
:
Std.Associative
Nat.lcm
source
theorem
Nat
.
lcm_ne_zero
{m n :
Nat
}
(hm :
m
≠
0
)
(hn :
n
≠
0
)
:
m
.lcm
n
≠
0