Article GCD_1, MML version 4.99.1005

:: GCD_1:condreg 1
registration
  cluster non empty commutative right_unital -> left_unital (multLoopStr);
end;

:: GCD_1:condreg 2
registration
  cluster non empty commutative right-distributive -> distributive (doubleLoopStr);
end;

:: GCD_1:condreg 3
registration
  cluster non empty commutative left-distributive -> distributive (doubleLoopStr);
end;

:: GCD_1:condreg 4
registration
  cluster non empty right_complementable associative well-unital distributive Abelian add-associative right_zeroed -> (doubleLoopStr);
end;

:: GCD_1:funcreg 1
registration
  cluster F_Real -> strict domRing-like;
end;

:: GCD_1:exreg 1
registration
  cluster non empty non degenerated right_complementable almost_left_invertible strict associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr;
end;

:: GCD_1:th 1
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b2 <> 0. b1
   holds (b2 * b3 = b2 * b4 implies b3 = b4) & (b3 * b2 = b4 * b2 implies b3 = b4);

:: GCD_1:prednot 1 => GCD_1:pred 1
definition
  let a1 be non empty multMagma;
  let a2, a3 be Element of the carrier of a1;
  pred A2 divides A3 means
    ex b1 being Element of the carrier of a1 st
       a3 = a2 * b1;
end;

:: GCD_1:dfs 1
definiens
  let a1 be non empty multMagma;
  let a2, a3 be Element of the carrier of a1;
To prove
     a2 divides a3
it is sufficient to prove
  thus ex b1 being Element of the carrier of a1 st
       a3 = a2 * b1;

:: GCD_1:def 1
theorem
for b1 being non empty multMagma
for b2, b3 being Element of the carrier of b1 holds
   b2 divides b3
iff
   ex b4 being Element of the carrier of b1 st
      b3 = b2 * b4;

:: GCD_1:prednot 2 => GCD_1:pred 2
definition
  let a1 be non empty right_unital multLoopStr;
  let a2, a3 be Element of the carrier of a1;
  redefine pred a2 divides a3;
  reflexivity;
::  for a1 being non empty right_unital multLoopStr
::  for a2 being Element of the carrier of a1 holds
::     a2 divides a2;
end;

:: GCD_1:attrnot 1 => GCD_1:attr 1
definition
  let a1 be non empty multLoopStr;
  let a2 be Element of the carrier of a1;
  attr a2 is unital means
    a2 divides 1. a1;
end;

:: GCD_1:dfs 2
definiens
  let a1 be non empty multLoopStr;
  let a2 be Element of the carrier of a1;
To prove
     a2 is unital
it is sufficient to prove
  thus a2 divides 1. a1;

:: GCD_1:def 2
theorem
for b1 being non empty multLoopStr
for b2 being Element of the carrier of b1 holds
      b2 is unital(b1)
   iff
      b2 divides 1. b1;

:: GCD_1:prednot 3 => GCD_1:pred 3
definition
  let a1 be non empty multLoopStr;
  let a2, a3 be Element of the carrier of a1;
  pred A2 is_associated_to A3 means
    a2 divides a3 & a3 divides a2;
  symmetry;
::  for a1 being non empty multLoopStr
::  for a2, a3 being Element of the carrier of a1
::        st a2 is_associated_to a3
::     holds a3 is_associated_to a2;
end;

:: GCD_1:dfs 3
definiens
  let a1 be non empty multLoopStr;
  let a2, a3 be Element of the carrier of a1;
To prove
     a2 is_associated_to a3
it is sufficient to prove
  thus a2 divides a3 & a3 divides a2;

:: GCD_1:def 3
theorem
for b1 being non empty multLoopStr
for b2, b3 being Element of the carrier of b1 holds
   b2 is_associated_to b3
iff
   b2 divides b3 & b3 divides b2;

:: GCD_1:prednot 4 => not GCD_1:pred 3
notation
  let a1 be non empty multLoopStr;
  let a2, a3 be Element of the carrier of a1;
  antonym a2 is_not_associated_to a3 for a2 is_associated_to a3;
end;

:: GCD_1:prednot 5 => GCD_1:pred 4
definition
  let a1 be non empty well-unital multLoopStr;
  let a2, a3 be Element of the carrier of a1;
  redefine pred a2 is_associated_to a3;
  symmetry;
::  for a1 being non empty well-unital multLoopStr
::  for a2, a3 being Element of the carrier of a1
::        st a2 is_associated_to a3
::     holds a3 is_associated_to a2;
  reflexivity;
::  for a1 being non empty well-unital multLoopStr
::  for a2 being Element of the carrier of a1 holds
::     a2 is_associated_to a2;
end;

:: GCD_1:funcnot 1 => GCD_1:func 1
definition
  let a1 be non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr;
  let a2, a3 be Element of the carrier of a1;
  assume a3 divides a2 & a3 <> 0. a1;
  func A2 / A3 -> Element of the carrier of a1 means
    it * a3 = a2;
end;

:: GCD_1:def 4
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3 being Element of the carrier of b1
   st b3 divides b2 & b3 <> 0. b1
for b4 being Element of the carrier of b1 holds
      b4 = b2 / b3
   iff
      b4 * b3 = b2;

:: GCD_1:th 2
theorem
for b1 being non empty associative multLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b2 divides b3 & b3 divides b4
   holds b2 divides b4;

:: GCD_1:th 3
theorem
for b1 being non empty associative commutative multLoopStr
for b2, b3, b4, b5 being Element of the carrier of b1
      st b3 divides b2 & b5 divides b4
   holds b3 * b5 divides b2 * b4;

:: GCD_1:th 4
theorem
for b1 being non empty associative multLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b2 is_associated_to b3 & b3 is_associated_to b4
   holds b2 is_associated_to b4;

:: GCD_1:th 5
theorem
for b1 being non empty associative multLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b2 divides b3
   holds b4 * b2 divides b4 * b3;

:: GCD_1:th 6
theorem
for b1 being non empty multLoopStr
for b2, b3 being Element of the carrier of b1 holds
b2 divides b2 * b3 & (b1 is commutative implies b3 divides b2 * b3);

:: GCD_1:th 7
theorem
for b1 being non empty associative multLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b2 divides b3
   holds b2 divides b3 * b4;

:: GCD_1:th 8
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3 being Element of the carrier of b1
      st b3 divides b2 & b3 <> 0. b1
   holds    b2 / b3 = 0. b1
   iff
      b2 = 0. b1;

:: GCD_1:th 9
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Element of the carrier of b1
      st b2 <> 0. b1
   holds b2 / b2 = 1. b1;

:: GCD_1:th 10
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Element of the carrier of b1 holds
   b2 / 1. b1 = b2;

:: GCD_1:th 11
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b4 <> 0. b1
   holds (b4 divides b2 * b3 & b4 divides b2 implies (b2 * b3) / b4 = (b2 / b4) * b3) &
    (b4 divides b2 * b3 & b4 divides b3 implies (b2 * b3) / b4 = b2 * (b3 / b4));

:: GCD_1:th 12
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b4 <> 0. b1 & b4 divides b2 & b4 divides b3 & b4 divides b2 + b3
   holds (b2 / b4) + (b3 / b4) = (b2 + b3) / b4;

:: GCD_1:th 13
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b4 <> 0. b1 & b4 divides b2 & b4 divides b3
   holds    b2 / b4 = b3 / b4
   iff
      b2 = b3;

:: GCD_1:th 14
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3, b4, b5 being Element of the carrier of b1
      st b3 <> 0. b1 & b5 <> 0. b1 & b3 divides b2 & b5 divides b4
   holds (b2 / b3) * (b4 / b5) = (b2 * b4) / (b3 * b5);

:: GCD_1:th 15
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b2 <> 0. b1 & b2 * b3 divides b2 * b4
   holds b3 divides b4;

:: GCD_1:th 16
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being Element of the carrier of b1
      st b2 is_associated_to 0. b1
   holds b2 = 0. b1;

:: GCD_1:th 17
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3 being Element of the carrier of b1
      st b2 <> 0. b1 & b2 * b3 = b2
   holds b3 = 1. b1;

:: GCD_1:th 18
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3 being Element of the carrier of b1 holds
   b2 is_associated_to b3
iff
   ex b4 being Element of the carrier of b1 st
      b4 is unital(b1) & b2 * b4 = b3;

:: GCD_1:th 19
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2, b3, b4 being Element of the carrier of b1
      st b4 <> 0. b1 & b4 * b2 is_associated_to b4 * b3
   holds b2 is_associated_to b3;

:: GCD_1:funcnot 2 => GCD_1:func 2
definition
  let a1 be non empty multLoopStr;
  let a2 be Element of the carrier of a1;
  func Class A2 -> Element of bool the carrier of a1 means
    for b1 being Element of the carrier of a1 holds
          b1 in it
       iff
          b1 is_associated_to a2;
end;

:: GCD_1:def 5
theorem
for b1 being non empty multLoopStr
for b2 being Element of the carrier of b1
for b3 being Element of bool the carrier of b1 holds
      b3 = Class b2
   iff
      for b4 being Element of the carrier of b1 holds
            b4 in b3
         iff
            b4 is_associated_to b2;

:: GCD_1:funcreg 2
registration
  let a1 be non empty well-unital multLoopStr;
  let a2 be Element of the carrier of a1;
  cluster Class a2 -> non empty;
end;

:: GCD_1:th 20
theorem
for b1 being non empty associative multLoopStr
for b2, b3 being Element of the carrier of b1
      st Class b2 meets Class b3
   holds Class b2 = Class b3;

:: GCD_1:funcnot 3 => GCD_1:func 3
definition
  let a1 be non empty multLoopStr;
  func Classes A1 -> Element of bool bool the carrier of a1 means
    for b1 being Element of bool the carrier of a1 holds
          b1 in it
       iff
          ex b2 being Element of the carrier of a1 st
             b1 = Class b2;
end;

:: GCD_1:def 6
theorem
for b1 being non empty multLoopStr
for b2 being Element of bool bool the carrier of b1 holds
      b2 = Classes b1
   iff
      for b3 being Element of bool the carrier of b1 holds
            b3 in b2
         iff
            ex b4 being Element of the carrier of b1 st
               b3 = Class b4;

:: GCD_1:funcreg 3
registration
  let a1 be non empty multLoopStr;
  cluster Classes a1 -> non empty;
end;

:: GCD_1:th 21
theorem
for b1 being non empty well-unital multLoopStr
for b2 being Element of bool the carrier of b1
      st b2 in Classes b1
   holds b2 is not empty;

:: GCD_1:modenot 1 => GCD_1:mode 1
definition
  let a1 be non empty associative well-unital multLoopStr;
  mode Am of A1 -> non empty Element of bool the carrier of a1 means
    (for b1 being Element of the carrier of a1 holds
        ex b2 being Element of it st
           b2 is_associated_to b1) &
     (for b1, b2 being Element of it
           st b1 <> b2
        holds b1 is_not_associated_to b2);
end;

:: GCD_1:dfs 7
definiens
  let a1 be non empty associative well-unital multLoopStr;
  let a2 be non empty Element of bool the carrier of a1;
To prove
     a2 is Am of a1
it is sufficient to prove
  thus (for b1 being Element of the carrier of a1 holds
        ex b2 being Element of a2 st
           b2 is_associated_to b1) &
     (for b1, b2 being Element of a2
           st b1 <> b2
        holds b1 is_not_associated_to b2);

:: GCD_1:def 7
theorem
for b1 being non empty associative well-unital multLoopStr
for b2 being non empty Element of bool the carrier of b1 holds
      b2 is Am of b1
   iff
      (for b3 being Element of the carrier of b1 holds
          ex b4 being Element of b2 st
             b4 is_associated_to b3) &
       (for b3, b4 being Element of b2
             st b3 <> b4
          holds b3 is_not_associated_to b4);

:: GCD_1:modenot 2 => GCD_1:mode 2
definition
  let a1 be non empty associative well-unital multLoopStr;
  mode AmpleSet of A1 -> non empty Element of bool the carrier of a1 means
    it is Am of a1 & 1. a1 in it;
end;

:: GCD_1:dfs 8
definiens
  let a1 be non empty associative well-unital multLoopStr;
  let a2 be non empty Element of bool the carrier of a1;
To prove
     a2 is AmpleSet of a1
it is sufficient to prove
  thus a2 is Am of a1 & 1. a1 in a2;

:: GCD_1:def 8
theorem
for b1 being non empty associative well-unital multLoopStr
for b2 being non empty Element of bool the carrier of b1 holds
      b2 is AmpleSet of b1
   iff
      b2 is Am of b1 & 1. b1 in b2;

:: GCD_1:th 22
theorem
for b1 being non empty associative well-unital multLoopStr
for b2 being AmpleSet of b1 holds
   1. b1 in b2 &
    (for b3 being Element of the carrier of b1 holds
       ex b4 being Element of b2 st
          b4 is_associated_to b3) &
    (for b3, b4 being Element of b2
          st b3 <> b4
       holds b3 is_not_associated_to b4);

:: GCD_1:th 23
theorem
for b1 being non empty associative well-unital multLoopStr
for b2 being AmpleSet of b1
for b3, b4 being Element of b2
      st b3 is_associated_to b4
   holds b3 = b4;

:: GCD_1:th 24
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being AmpleSet of b1 holds
   0. b1 is Element of b2;

:: GCD_1:funcnot 4 => GCD_1:func 4
definition
  let a1 be non empty associative well-unital multLoopStr;
  let a2 be AmpleSet of a1;
  let a3 be Element of the carrier of a1;
  func NF(A3,A2) -> Element of the carrier of a1 means
    it in a2 & it is_associated_to a3;
end;

:: GCD_1:def 9
theorem
for b1 being non empty associative well-unital multLoopStr
for b2 being AmpleSet of b1
for b3, b4 being Element of the carrier of b1 holds
   b4 = NF(b3,b2)
iff
   b4 in b2 & b4 is_associated_to b3;

:: GCD_1:th 25
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being AmpleSet of b1 holds
   NF(0. b1,b2) = 0. b1 & NF(1. b1,b2) = 1. b1;

:: GCD_1:th 26
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being AmpleSet of b1
for b3 being Element of the carrier of b1 holds
      b3 in b2
   iff
      b3 = NF(b3,b2);

:: GCD_1:attrnot 2 => GCD_1:attr 2
definition
  let a1 be non empty associative well-unital multLoopStr;
  let a2 be AmpleSet of a1;
  attr a2 is multiplicative means
    for b1, b2 being Element of a2 holds
    b1 * b2 in a2;
end;

:: GCD_1:dfs 10
definiens
  let a1 be non empty associative well-unital multLoopStr;
  let a2 be AmpleSet of a1;
To prove
     a2 is multiplicative
it is sufficient to prove
  thus for b1, b2 being Element of a2 holds
    b1 * b2 in a2;

:: GCD_1:def 10
theorem
for b1 being non empty associative well-unital multLoopStr
for b2 being AmpleSet of b1 holds
      b2 is multiplicative(b1)
   iff
      for b3, b4 being Element of b2 holds
      b3 * b4 in b2;

:: GCD_1:th 27
theorem
for b1 being non empty right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like doubleLoopStr
for b2 being AmpleSet of b1
   st b2 is multiplicative(b1)
for b3, b4 being Element of b2
      st b4 divides b3 & b4 <> 0. b1
   holds b3 / b4 in b2;

:: GCD_1:attrnot 3 => GCD_1:attr 3
definition
  let a1 be non empty multLoopStr;
  attr a1 is gcd-like means
    for b1, b2 being Element of the carrier of a1 holds
    ex b3 being Element of the carrier of a1 st
       b3 divides b1 &
        b3 divides b2 &
        (for b4 being Element of the carrier of a1
              st b4 divides b1 & b4 divides b2
           holds b4 divides b3);
end;

:: GCD_1:dfs 11
definiens
  let a1 be non empty multLoopStr;
To prove
     a1 is gcd-like
it is sufficient to prove
  thus for b1, b2 being Element of the carrier of a1 holds
    ex b3 being Element of the carrier of a1 st
       b3 divides b1 &
        b3 divides b2 &
        (for b4 being Element of the carrier of a1
              st b4 divides b1 & b4 divides b2
           holds b4 divides b3);

:: GCD_1:def 11
theorem
for b1 being non empty multLoopStr holds
      b1 is gcd-like
   iff
      for b2, b3 being Element of the carrier of b1 holds
      ex b4 being Element of the carrier of b1 st
         b4 divides b2 &
          b4 divides b3 &
          (for b5 being Element of the carrier of b1
                st b5 divides b2 & b5 divides b3
             holds b5 divides b4);

:: GCD_1:exreg 2
registration
  cluster non empty non degenerated non trivial right_complementable unital associative commutative right-distributive left-distributive right_unital well-unital distributive left_unital Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr;
end;

:: GCD_1:exreg 3
registration
  cluster non empty associative commutative well-unital gcd-like multLoopStr;
end;

:: GCD_1:exreg 4
registration
  cluster non empty associative commutative well-unital gcd-like multLoopStr_0;
end;

:: GCD_1:condreg 5
registration
  cluster non empty right_complementable almost_left_invertible commutative right-distributive left-distributive well-unital left_unital add-associative right_zeroed -> gcd-like (doubleLoopStr);
end;

:: GCD_1:exreg 5
registration
  cluster non empty non degenerated right_complementable unital associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr;
end;

:: GCD_1:modenot 3
definition
  mode gcdDomain is non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr;
end;

:: GCD_1:funcnot 5 => GCD_1:func 5
definition
  let a1 be non empty associative well-unital gcd-like multLoopStr;
  let a2 be AmpleSet of a1;
  let a3, a4 be Element of the carrier of a1;
  func gcd(A3,A4,A2) -> Element of the carrier of a1 means
    it in a2 &
     it divides a3 &
     it divides a4 &
     (for b1 being Element of the carrier of a1
           st b1 divides a3 & b1 divides a4
        holds b1 divides it);
end;

:: GCD_1:def 12
theorem
for b1 being non empty associative well-unital gcd-like multLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5 being Element of the carrier of b1 holds
   b5 = gcd(b3,b4,b2)
iff
   b5 in b2 &
    b5 divides b3 &
    b5 divides b4 &
    (for b6 being Element of the carrier of b1
          st b6 divides b3 & b6 divides b4
       holds b6 divides b5);

:: GCD_1:th 29
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5 being Element of the carrier of b1
      st b5 divides gcd(b3,b4,b2)
   holds b5 divides b3 & b5 divides b4;

:: GCD_1:th 30
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4 being Element of the carrier of b1 holds
gcd(b3,b4,b2) = gcd(b4,b3,b2);

:: GCD_1:th 31
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3 being Element of the carrier of b1 holds
   gcd(b3,0. b1,b2) = NF(b3,b2) & gcd(0. b1,b3,b2) = NF(b3,b2);

:: GCD_1:th 32
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1 holds
   gcd(0. b1,0. b1,b2) = 0. b1;

:: GCD_1:th 33
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3 being Element of the carrier of b1 holds
   gcd(b3,1. b1,b2) = 1. b1 & gcd(1. b1,b3,b2) = 1. b1;

:: GCD_1:th 34
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4 being Element of the carrier of b1 holds
   gcd(b3,b4,b2) = 0. b1
iff
   b3 = 0. b1 & b4 = 0. b1;

:: GCD_1:th 35
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5 being Element of the carrier of b1
      st b4 is_associated_to b5
   holds gcd(b3,b4,b2) is_associated_to gcd(b3,b5,b2) & gcd(b4,b3,b2) is_associated_to gcd(b5,b3,b2);

:: GCD_1:th 36
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5 being Element of the carrier of b1 holds
gcd(gcd(b3,b4,b2),b5,b2) = gcd(b3,gcd(b4,b5,b2),b2);

:: GCD_1:th 37
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5 being Element of the carrier of b1 holds
gcd(b3 * b5,b4 * b5,b2) is_associated_to b5 * gcd(b3,b4,b2);

:: GCD_1:th 38
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5 being Element of the carrier of b1
      st gcd(b3,b4,b2) = 1. b1
   holds gcd(b3,b4 * b5,b2) = gcd(b3,b5,b2);

:: GCD_1:th 39
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5 being Element of the carrier of b1
      st b5 = gcd(b3,b4,b2) & b5 <> 0. b1
   holds gcd(b3 / b5,b4 / b5,b2) = 1. b1;

:: GCD_1:th 40
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5 being Element of the carrier of b1 holds
gcd(b3 + (b4 * b5),b5,b2) = gcd(b3,b5,b2);

:: GCD_1:th 41
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st gcd(b3,b4,b2) = 1. b1 & gcd(b5,b6,b2) = 1. b1 & b4 <> 0. b1 & b6 <> 0. b1
   holds gcd((b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2))),b4 * (b6 / gcd(b4,b6,b2)),b2) = gcd((b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2))),gcd(b4,b6,b2),b2);

:: GCD_1:th 42
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st gcd(b3,b4,b2) = 1. b1 & gcd(b5,b6,b2) = 1. b1 & b4 <> 0. b1 & b6 <> 0. b1
   holds gcd((b3 / gcd(b3,b6,b2)) * (b5 / gcd(b5,b4,b2)),(b4 / gcd(b5,b4,b2)) * (b6 / gcd(b3,b6,b2)),b2) = 1. b1;

:: GCD_1:prednot 6 => GCD_1:pred 5
definition
  let a1 be non empty associative well-unital gcd-like multLoopStr;
  let a2 be AmpleSet of a1;
  let a3, a4 be Element of the carrier of a1;
  pred A3,A4 are_canonical_wrt A2 means
    gcd(a3,a4,a2) = 1. a1;
end;

:: GCD_1:dfs 13
definiens
  let a1 be non empty associative well-unital gcd-like multLoopStr;
  let a2 be AmpleSet of a1;
  let a3, a4 be Element of the carrier of a1;
To prove
     a3,a4 are_canonical_wrt a2
it is sufficient to prove
  thus gcd(a3,a4,a2) = 1. a1;

:: GCD_1:def 13
theorem
for b1 being non empty associative well-unital gcd-like multLoopStr
for b2 being AmpleSet of b1
for b3, b4 being Element of the carrier of b1 holds
   b3,b4 are_canonical_wrt b2
iff
   gcd(b3,b4,b2) = 1. b1;

:: GCD_1:th 43
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2, b3 being AmpleSet of b1
for b4, b5 being Element of the carrier of b1
      st b4,b5 are_canonical_wrt b2
   holds b4,b5 are_canonical_wrt b3;

:: GCD_1:prednot 7 => GCD_1:pred 6
definition
  let a1 be non empty associative well-unital gcd-like multLoopStr;
  let a2, a3 be Element of the carrier of a1;
  pred A2,A3 are_co-prime means
    ex b1 being AmpleSet of a1 st
       gcd(a2,a3,b1) = 1. a1;
end;

:: GCD_1:dfs 14
definiens
  let a1 be non empty associative well-unital gcd-like multLoopStr;
  let a2, a3 be Element of the carrier of a1;
To prove
     a2,a3 are_co-prime
it is sufficient to prove
  thus ex b1 being AmpleSet of a1 st
       gcd(a2,a3,b1) = 1. a1;

:: GCD_1:def 14
theorem
for b1 being non empty associative well-unital gcd-like multLoopStr
for b2, b3 being Element of the carrier of b1 holds
   b2,b3 are_co-prime
iff
   ex b4 being AmpleSet of b1 st
      gcd(b2,b3,b4) = 1. b1;

:: GCD_1:prednot 8 => GCD_1:pred 7
definition
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr;
  let a2, a3 be Element of the carrier of a1;
  redefine pred a2,a3 are_co-prime;
  symmetry;
::  for a1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
::  for a2, a3 being Element of the carrier of a1
::        st a2,a3 are_co-prime
::     holds a3,a2 are_co-prime;
end;

:: GCD_1:th 44
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4 being Element of the carrier of b1
      st b3,b4 are_co-prime
   holds gcd(b3,b4,b2) = 1. b1;

:: GCD_1:prednot 9 => GCD_1:pred 8
definition
  let a1 be non empty associative well-unital gcd-like multLoopStr_0;
  let a2 be AmpleSet of a1;
  let a3, a4 be Element of the carrier of a1;
  pred A3,A4 are_normalized_wrt A2 means
    gcd(a3,a4,a2) = 1. a1 & a4 in a2 & a4 <> 0. a1;
end;

:: GCD_1:dfs 15
definiens
  let a1 be non empty associative well-unital gcd-like multLoopStr_0;
  let a2 be AmpleSet of a1;
  let a3, a4 be Element of the carrier of a1;
To prove
     a3,a4 are_normalized_wrt a2
it is sufficient to prove
  thus gcd(a3,a4,a2) = 1. a1 & a4 in a2 & a4 <> 0. a1;

:: GCD_1:def 15
theorem
for b1 being non empty associative well-unital gcd-like multLoopStr_0
for b2 being AmpleSet of b1
for b3, b4 being Element of the carrier of b1 holds
   b3,b4 are_normalized_wrt b2
iff
   gcd(b3,b4,b2) = 1. b1 & b4 in b2 & b4 <> 0. b1;

:: GCD_1:funcnot 6 => GCD_1:func 6
definition
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr;
  let a2 be AmpleSet of a1;
  let a3, a4, a5, a6 be Element of the carrier of a1;
  assume a3,a4 are_co-prime & a5,a6 are_co-prime & a4 = NF(a4,a2) & a6 = NF(a6,a2);
  func add1(A3,A4,A5,A6,A2) -> Element of the carrier of a1 equals
    a5
    if a3 = 0. a1,
a3
    if a5 = 0. a1,
(a3 * a6) + (a4 * a5)
    if gcd(a4,a6,a2) = 1. a1,
0. a1
    if (a3 * (a6 / gcd(a4,a6,a2))) + (a5 * (a4 / gcd(a4,a6,a2))) = 0. a1
    otherwise ((a3 * (a6 / gcd(a4,a6,a2))) + (a5 * (a4 / gcd(a4,a6,a2)))) / gcd((a3 * (a6 / gcd(a4,a6,a2))) + (a5 * (a4 / gcd(a4,a6,a2))),gcd(a4,a6,a2),a2);
end;

:: GCD_1:def 16
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st b3,b4 are_co-prime & b5,b6 are_co-prime & b4 = NF(b4,b2) & b6 = NF(b6,b2)
   holds (b3 = 0. b1 implies add1(b3,b4,b5,b6,b2) = b5) &
    (b5 = 0. b1 implies add1(b3,b4,b5,b6,b2) = b3) &
    (gcd(b4,b6,b2) = 1. b1 implies add1(b3,b4,b5,b6,b2) = (b3 * b6) + (b4 * b5)) &
    ((b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2))) = 0. b1 implies add1(b3,b4,b5,b6,b2) = 0. b1) &
    (b3 <> 0. b1 &
     b5 <> 0. b1 &
     gcd(b4,b6,b2) <> 1. b1 &
     (b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2))) <> 0. b1 implies add1(b3,b4,b5,b6,b2) = ((b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2)))) / gcd((b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2))),gcd(b4,b6,b2),b2));

:: GCD_1:funcnot 7 => GCD_1:func 7
definition
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr;
  let a2 be AmpleSet of a1;
  let a3, a4, a5, a6 be Element of the carrier of a1;
  assume a3,a4 are_co-prime & a5,a6 are_co-prime & a4 = NF(a4,a2) & a6 = NF(a6,a2);
  func add2(A3,A4,A5,A6,A2) -> Element of the carrier of a1 equals
    a6
    if a3 = 0. a1,
a4
    if a5 = 0. a1,
a4 * a6
    if gcd(a4,a6,a2) = 1. a1,
1. a1
    if (a3 * (a6 / gcd(a4,a6,a2))) + (a5 * (a4 / gcd(a4,a6,a2))) = 0. a1
    otherwise (a4 * (a6 / gcd(a4,a6,a2))) / gcd((a3 * (a6 / gcd(a4,a6,a2))) + (a5 * (a4 / gcd(a4,a6,a2))),gcd(a4,a6,a2),a2);
end;

:: GCD_1:def 17
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st b3,b4 are_co-prime & b5,b6 are_co-prime & b4 = NF(b4,b2) & b6 = NF(b6,b2)
   holds (b3 = 0. b1 implies add2(b3,b4,b5,b6,b2) = b6) &
    (b5 = 0. b1 implies add2(b3,b4,b5,b6,b2) = b4) &
    (gcd(b4,b6,b2) = 1. b1 implies add2(b3,b4,b5,b6,b2) = b4 * b6) &
    ((b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2))) = 0. b1 implies add2(b3,b4,b5,b6,b2) = 1. b1) &
    (b3 <> 0. b1 &
     b5 <> 0. b1 &
     gcd(b4,b6,b2) <> 1. b1 &
     (b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2))) <> 0. b1 implies add2(b3,b4,b5,b6,b2) = (b4 * (b6 / gcd(b4,b6,b2))) / gcd((b3 * (b6 / gcd(b4,b6,b2))) + (b5 * (b4 / gcd(b4,b6,b2))),gcd(b4,b6,b2),b2));

:: GCD_1:th 45
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st b2 is multiplicative(b1) & b3,b4 are_normalized_wrt b2 & b5,b6 are_normalized_wrt b2
   holds add1(b3,b4,b5,b6,b2),add2(b3,b4,b5,b6,b2) are_normalized_wrt b2;

:: GCD_1:th 46
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st b2 is multiplicative(b1) & b3,b4 are_normalized_wrt b2 & b5,b6 are_normalized_wrt b2
   holds (add1(b3,b4,b5,b6,b2)) * (b4 * b6) = (add2(b3,b4,b5,b6,b2)) * ((b3 * b6) + (b5 * b4));

:: GCD_1:funcnot 8 => GCD_1:func 8
definition
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr;
  let a2 be AmpleSet of a1;
  let a3, a4, a5, a6 be Element of the carrier of a1;
  func mult1(A3,A4,A5,A6,A2) -> Element of the carrier of a1 equals
    0. a1
    if (a3 = 0. a1 or a5 = 0. a1),
a3 * a5
    if a4 = 1. a1 & a6 = 1. a1,
(a3 * a5) / gcd(a3,a6,a2)
    if a6 <> 0. a1 & a4 = 1. a1,
(a3 * a5) / gcd(a5,a4,a2)
    if a4 <> 0. a1 & a6 = 1. a1
    otherwise (a3 / gcd(a3,a6,a2)) * (a5 / gcd(a5,a4,a2));
end;

:: GCD_1:def 18
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1 holds
(b3 <> 0. b1 & b5 <> 0. b1 or mult1(b3,b4,b5,b6,b2) = 0. b1) &
 (b4 = 1. b1 & b6 = 1. b1 implies mult1(b3,b4,b5,b6,b2) = b3 * b5) &
 (b6 <> 0. b1 & b4 = 1. b1 implies mult1(b3,b4,b5,b6,b2) = (b3 * b5) / gcd(b3,b6,b2)) &
 (b4 <> 0. b1 & b6 = 1. b1 implies mult1(b3,b4,b5,b6,b2) = (b3 * b5) / gcd(b5,b4,b2)) &
 (b3 <> 0. b1 & b5 <> 0. b1 & (b4 = 1. b1 implies b6 <> 1. b1) & (b6 <> 0. b1 implies b4 <> 1. b1) & (b4 <> 0. b1 implies b6 <> 1. b1) implies mult1(b3,b4,b5,b6,b2) = (b3 / gcd(b3,b6,b2)) * (b5 / gcd(b5,b4,b2)));

:: GCD_1:funcnot 9 => GCD_1:func 9
definition
  let a1 be non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr;
  let a2 be AmpleSet of a1;
  let a3, a4, a5, a6 be Element of the carrier of a1;
  assume a3,a4 are_co-prime & a5,a6 are_co-prime & a4 = NF(a4,a2) & a6 = NF(a6,a2);
  func mult2(A3,A4,A5,A6,A2) -> Element of the carrier of a1 equals
    1. a1
    if (a3 = 0. a1 or a5 = 0. a1),
1. a1
    if a4 = 1. a1 & a6 = 1. a1,
a6 / gcd(a3,a6,a2)
    if a6 <> 0. a1 & a4 = 1. a1,
a4 / gcd(a5,a4,a2)
    if a4 <> 0. a1 & a6 = 1. a1
    otherwise (a4 / gcd(a5,a4,a2)) * (a6 / gcd(a3,a6,a2));
end;

:: GCD_1:def 19
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st b3,b4 are_co-prime & b5,b6 are_co-prime & b4 = NF(b4,b2) & b6 = NF(b6,b2)
   holds (b3 <> 0. b1 & b5 <> 0. b1 or mult2(b3,b4,b5,b6,b2) = 1. b1) &
    (b4 = 1. b1 & b6 = 1. b1 implies mult2(b3,b4,b5,b6,b2) = 1. b1) &
    (b6 <> 0. b1 & b4 = 1. b1 implies mult2(b3,b4,b5,b6,b2) = b6 / gcd(b3,b6,b2)) &
    (b4 <> 0. b1 & b6 = 1. b1 implies mult2(b3,b4,b5,b6,b2) = b4 / gcd(b5,b4,b2)) &
    (b3 <> 0. b1 & b5 <> 0. b1 & (b4 = 1. b1 implies b6 <> 1. b1) & (b6 <> 0. b1 implies b4 <> 1. b1) & (b4 <> 0. b1 implies b6 <> 1. b1) implies mult2(b3,b4,b5,b6,b2) = (b4 / gcd(b5,b4,b2)) * (b6 / gcd(b3,b6,b2)));

:: GCD_1:th 47
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st b2 is multiplicative(b1) & b3,b4 are_normalized_wrt b2 & b5,b6 are_normalized_wrt b2
   holds mult1(b3,b4,b5,b6,b2),mult2(b3,b4,b5,b6,b2) are_normalized_wrt b2;

:: GCD_1:th 48
theorem
for b1 being non empty non degenerated right_complementable associative commutative well-unital distributive Abelian add-associative right_zeroed domRing-like gcd-like doubleLoopStr
for b2 being AmpleSet of b1
for b3, b4, b5, b6 being Element of the carrier of b1
      st b2 is multiplicative(b1) & b3,b4 are_normalized_wrt b2 & b5,b6 are_normalized_wrt b2
   holds (mult1(b3,b4,b5,b6,b2)) * (b4 * b6) = (mult2(b3,b4,b5,b6,b2)) * (b3 * b5);

:: GCD_1:th 51
theorem
for b1 being non empty right_complementable distributive Abelian add-associative right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1 holds
(- b2) * b3 = - (b2 * b3) & b2 * - b3 = - (b2 * b3);

:: GCD_1:th 53
theorem
for b1 being non empty right_complementable almost_left_invertible associative commutative well-unital distributive Abelian add-associative right_zeroed doubleLoopStr
for b2, b3 being Element of the carrier of b1
      st b2 <> 0. b1 & b3 <> 0. b1
   holds b2 " * (b3 ") = (b3 * b2) ";