reserve X,Y for set;
reserve R for domRing-like commutative Ring;
reserve c for Element of R;
reserve R for gcdDomain;

theorem Th39:
  for Amp being AmpleSet of R for a,b,c being Element of R holds
  gcd((a + (b * c)),c,Amp) = gcd(a,c,Amp)
proof
  let Amp be AmpleSet of R;
  let A,B,C be Element of R;
  set D = gcd(A,C,Amp);
  D divides A by Def12;
  then consider E being Element of R such that
A1: D * E = A;
A2: D divides C by Def12;
  then consider F being Element of R such that
A3: D * F = C;
A4: for z being Element of R st z divides (A + (B * C)) & z divides C holds
  z divides D
  proof
    let Z be Element of R;
    assume that
A5: Z divides (A + (B * C)) and
A6: Z divides C;
    consider X being Element of R such that
A7: Z * X = C by A6;
    consider Y being Element of R such that
A8: Z * Y = A + (B * C) by A5;
    Z * (Y + (-(B * X))) = (Z * Y) + (Z * (-(B * X))) by VECTSP_1:def 2
      .= (Z * Y) + (-(Z * (X * B))) by VECTSP_1:8
      .= (A + (B * C)) + (-(C * B)) by A7,A8,GROUP_1:def 3
      .= A + ((B * C) + (-(C * B))) by RLVECT_1:def 3
      .= A + 0.R by RLVECT_1:def 10
      .= A by RLVECT_1:4;
    then Z divides A;
    hence thesis by A6,Def12;
  end;
  D * (E + (F * B)) = (D * E) + (D * (F * B)) by VECTSP_1:def 2
    .= A + (B * C) by A1,A3,GROUP_1:def 3;
  then
A9: D divides (A + (B * C));
  D is Element of Amp by Def12;
  hence thesis by A2,A9,A4,Def12;
end;
