let R be EuclidianRing; for a, b being Element of R
for g being a_gcd of a,b ex r, s being Element of R st g = (a * r) + (b * s)
let a, b be Element of R; for g being a_gcd of a,b ex r, s being Element of R st g = (a * r) + (b * s)
let g be a_gcd of a,b; ex r, s being Element of R st g = (a * r) + (b * s)
per cases
( a is zero or not a is zero )
;
suppose S:
not
a is
zero
;
ex r, s being Element of R st g = (a * r) + (b * s)set f = the
DegreeFunction of
R;
defpred S1[
Nat]
means ex
d being
Element of
R st
( $1
= the
DegreeFunction of
R . d &
d in {a,b} -Ideal &
{d} -Ideal <> {(0. R)} );
A:
ex
k being
Nat st
S1[
k]
consider k being
Nat such that B:
(
S1[
k] & ( for
n being
Nat st
S1[
n] holds
k <= n ) )
from NAT_1:sch 5(A);
consider d being
Element of
R such that H1:
( the
DegreeFunction of
R . d = k &
d in {a,b} -Ideal &
{d} -Ideal <> {(0. R)} )
by B;
H2:
(
{d} -Ideal = { (d * r) where r is Element of R : verum } &
{a,b} -Ideal = { ((a * r) + (b * s)) where r, s is Element of R : verum } )
by IDEAL_1:64, IDEAL_1:65;
then consider s,
t being
Element of
R such that H3:
d = (a * s) + (b * t)
by H1;
d is
a_gcd of
a,
b
then H3:
{g} -Ideal = {d} -Ideal
by RING_2:21, RING_4:49;
H5:
{d} -Ideal c= {a,b} -Ideal
by H1, IDEAL_1:67;
g in {a,b} -Ideal
by H3, H5, IDEAL_1:66;
hence
ex
r,
s being
Element of
R st
g = (a * r) + (b * s)
by H2;
verum end; end;