Lemmas about Euclidean domains #
Main statements #
gcd_eq_gcd_ab: states Bรฉzout's lemma for Euclidean domains.
@[instance 100]
theorem
EuclideanDomain.mod_eq_sub_mul_div
{R : Type u_1}
[EuclideanDomain R]
(a b : R)
:
a % b = a - b * (a / b)
theorem
EuclideanDomain.val_dvd_le
{R : Type u}
[EuclideanDomain R]
(a b : R)
:
b โฃ a โ a โ 0 โ ยฌEuclideanDomain.r a b
@[simp]
theorem
EuclideanDomain.mod_eq_zero
{R : Type u}
[EuclideanDomain R]
{a b : R}
:
a % b = 0 โ b โฃ a
@[simp]
theorem
EuclideanDomain.dvd_mod_iff
{R : Type u}
[EuclideanDomain R]
{a b c : R}
(h : c โฃ b)
:
c โฃ a % b โ c โฃ a
@[simp]
@[simp]
@[simp]
@[simp]
theorem
EuclideanDomain.eq_div_of_mul_eq_left
{R : Type u}
[EuclideanDomain R]
{a b c : R}
(hb : b โ 0)
(h : a * b = c)
:
a = c / b
theorem
EuclideanDomain.eq_div_of_mul_eq_right
{R : Type u}
[EuclideanDomain R]
{a b c : R}
(ha : a โ 0)
(h : a * b = c)
:
b = c / a
theorem
EuclideanDomain.mul_div_assoc
{R : Type u}
[EuclideanDomain R]
(x : R)
{y z : R}
(h : z โฃ y)
:
x * y / z = x * (y / z)
theorem
EuclideanDomain.mul_div_cancel'
{R : Type u}
[EuclideanDomain R]
{a b : R}
(hb : b โ 0)
(hab : b โฃ a)
:
b * (a / b) = a
@[simp]
theorem
EuclideanDomain.div_dvd_of_dvd
{R : Type u}
[EuclideanDomain R]
{p q : R}
(hpq : q โฃ p)
:
p / q โฃ p
theorem
EuclideanDomain.dvd_div_of_mul_dvd
{R : Type u}
[EuclideanDomain R]
{a b c : R}
(h : a * b โฃ c)
:
b โฃ c / a
@[simp]
theorem
EuclideanDomain.gcd_zero_right
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(a : R)
:
gcd a 0 = a
theorem
EuclideanDomain.gcd_dvd_left
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(a b : R)
:
gcd a b โฃ a
theorem
EuclideanDomain.gcd_dvd_right
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(a b : R)
:
gcd a b โฃ b
theorem
EuclideanDomain.gcd_eq_zero_iff
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{a b : R}
:
gcd a b = 0 โ a = 0 โง b = 0
theorem
EuclideanDomain.dvd_gcd
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{a b c : R}
:
c โฃ a โ c โฃ b โ c โฃ gcd a b
theorem
EuclideanDomain.gcd_eq_left
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{a b : R}
:
gcd a b = a โ a โฃ b
@[simp]
theorem
EuclideanDomain.gcd_one_left
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(a : R)
:
gcd 1 a = 1
@[simp]
theorem
EuclideanDomain.gcd_self
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(a : R)
:
gcd a a = a
@[simp]
theorem
EuclideanDomain.xgcdAux_fst
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x y s t s' t' : R)
:
theorem
EuclideanDomain.xgcdAux_P
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(a b : R)
{r r' s t s' t' : R}
(p : EuclideanDomain.Pโ a b (r, s, t))
(p' : EuclideanDomain.Pโยน a b (r', s', t'))
:
EuclideanDomain.Pโยฒ a b (xgcdAux r s t r' s' t')
An explicit version of Bรฉzout's lemma for Euclidean domains.
@[instance 70]
theorem
EuclideanDomain.div_pow
{R : Type u_1}
[EuclideanDomain R]
{a b : R}
{n : โ}
(hab : b โฃ a)
:
(a / b) ^ n = a ^ n / b ^ n
theorem
EuclideanDomain.dvd_lcm_left
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x y : R)
:
x โฃ lcm x y
theorem
EuclideanDomain.dvd_lcm_right
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x y : R)
:
y โฃ lcm x y
theorem
EuclideanDomain.lcm_dvd
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{x y z : R}
(hxz : x โฃ z)
(hyz : y โฃ z)
:
lcm x y โฃ z
@[simp]
theorem
EuclideanDomain.lcm_dvd_iff
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{x y z : R}
:
lcm x y โฃ z โ x โฃ z โง y โฃ z
@[simp]
theorem
EuclideanDomain.lcm_zero_left
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x : R)
:
lcm 0 x = 0
@[simp]
theorem
EuclideanDomain.lcm_zero_right
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
(x : R)
:
lcm x 0 = 0
@[simp]
theorem
EuclideanDomain.lcm_eq_zero_iff
{R : Type u}
[EuclideanDomain R]
[DecidableEq R]
{x y : R}
:
lcm x y = 0 โ x = 0 โจ y = 0
@[simp]
theorem
EuclideanDomain.mul_div_mul_cancel
{R : Type u}
[EuclideanDomain R]
{a b c : R}
(ha : a โ 0)
(hcb : c โฃ b)
:
a * b / (a * c) = b / c
theorem
EuclideanDomain.mul_div_mul_comm_of_dvd_dvd
{R : Type u}
[EuclideanDomain R]
{a b c d : R}
(hac : c โฃ a)
(hbd : d โฃ b)
:
a * b / (c * d) = a / c * (b / d)
theorem
EuclideanDomain.add_mul_div_left
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : y โ 0)
(h2 : y โฃ x)
:
(x + y * z) / y = x / y + z
theorem
EuclideanDomain.add_mul_div_right
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : y โ 0)
(h2 : y โฃ x)
:
(x + z * y) / y = x / y + z
theorem
EuclideanDomain.sub_mul_div_left
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : y โ 0)
(h2 : y โฃ x)
:
(x - y * z) / y = x / y - z
theorem
EuclideanDomain.sub_mul_div_right
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : y โ 0)
(h2 : y โฃ x)
:
(x - z * y) / y = x / y - z
theorem
EuclideanDomain.mul_add_div_left
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : z โ 0)
(h2 : z โฃ y)
:
(z * x + y) / z = x + y / z
theorem
EuclideanDomain.mul_add_div_right
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : z โ 0)
(h2 : z โฃ y)
:
(x * z + y) / z = x + y / z
theorem
EuclideanDomain.mul_sub_div_left
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : z โ 0)
(h2 : z โฃ y)
:
(z * x - y) / z = x - y / z
theorem
EuclideanDomain.mul_sub_div_right
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : z โ 0)
(h2 : z โฃ y)
:
(x * z - y) / z = x - y / z
theorem
EuclideanDomain.div_mul
{R : Type u}
[EuclideanDomain R]
{x y z : R}
(h1 : y โฃ x)
(h2 : y * z โฃ x)
:
x / (y * z) = x / y / z
theorem
EuclideanDomain.div_div
{R : Type u}
[EuclideanDomain R]
{x y z : R}
(h1 : y โฃ x)
(h2 : z โฃ x / y)
:
x / y / z = x / (y * z)
theorem
EuclideanDomain.div_add_div_of_dvd
{R : Type u}
[EuclideanDomain R]
{x y z t : R}
(h1 : y โ 0)
(h2 : t โ 0)
(h3 : y โฃ x)
(h4 : t โฃ z)
:
x / y + z / t = (t * x + y * z) / (t * y)
theorem
EuclideanDomain.div_sub_div_of_dvd
{R : Type u}
[EuclideanDomain R]
{x y z t : R}
(h1 : y โ 0)
(h2 : t โ 0)
(h3 : y โฃ x)
(h4 : t โฃ z)
:
x / y - z / t = (t * x - y * z) / (t * y)
theorem
EuclideanDomain.div_eq_iff_eq_mul_of_dvd
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : y โ 0)
(h2 : y โฃ x)
:
x / y = z โ x = y * z
theorem
EuclideanDomain.eq_div_iff_mul_eq_of_dvd
{R : Type u}
[EuclideanDomain R]
(x y z : R)
(h1 : z โ 0)
(h2 : z โฃ y)
:
x = y / z โ z * x = y
theorem
EuclideanDomain.div_eq_div_iff_mul_eq_mul_of_dvd
{R : Type u}
[EuclideanDomain R]
{x y z t : R}
(h1 : y โ 0)
(h2 : t โ 0)
(h3 : y โฃ x)
(h4 : t โฃ z)
:
x / y = z / t โ t * x = y * z