HepLean 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 :
Nat
)
(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 :
Nat
)
(n :
Nat
)
:
m
.lcm
n
=
n
.lcm
m
source
instance
Nat
.
instCommutativeLcm
:
Std.Commutative
Nat.lcm
Equations
Nat.instCommutativeLcm
=
⋯
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
instance
Nat
.
instLawfulIdentityLcmOfNat
:
Std.LawfulIdentity
Nat.lcm
1
Equations
Nat.instLawfulIdentityLcmOfNat
=
⋯
source
@[simp]
theorem
Nat
.
lcm_self
(m :
Nat
)
:
m
.lcm
m
=
m
source
instance
Nat
.
instIdempotentOpLcm
:
Std.IdempotentOp
Nat.lcm
Equations
Nat.instIdempotentOpLcm
=
⋯
source
theorem
Nat
.
dvd_lcm_left
(m :
Nat
)
(n :
Nat
)
:
m
∣
m
.lcm
n
source
theorem
Nat
.
dvd_lcm_right
(m :
Nat
)
(n :
Nat
)
:
n
∣
m
.lcm
n
source
theorem
Nat
.
gcd_mul_lcm
(m :
Nat
)
(n :
Nat
)
:
m
.gcd
n
*
m
.lcm
n
=
m
*
n
source
theorem
Nat
.
lcm_dvd
{m :
Nat
}
{n :
Nat
}
{k :
Nat
}
(H1 :
m
∣
k
)
(H2 :
n
∣
k
)
:
m
.lcm
n
∣
k
source
theorem
Nat
.
lcm_assoc
(m :
Nat
)
(n :
Nat
)
(k :
Nat
)
:
(
m
.lcm
n
)
.lcm
k
=
m
.lcm
(
n
.lcm
k
)
source
instance
Nat
.
instAssociativeLcm
:
Std.Associative
Nat.lcm
Equations
Nat.instAssociativeLcm
=
⋯
source
theorem
Nat
.
lcm_ne_zero
{m :
Nat
}
{n :
Nat
}
(hm :
m
≠
0
)
(hn :
n
≠
0
)
:
m
.lcm
n
≠
0