reserve A,B,C for Ordinal;
reserve a,b,c,d for natural Ordinal;
reserve l,m,n for natural Ordinal;

theorem Th17:
  (a*^c) hcf (b*^c) = (a hcf b)*^c
proof
  per cases;
  suppose
A1: c = {};
    then
A2: (a hcf b)*^c = {} by ORDINAL2:35;
    a*^c = {} & b*^c = {} by A1,ORDINAL2:35;
    hence thesis by A2,Th16;
  end;
  suppose
A3: c <> {} & a <> {};
    reconsider d = (a hcf b)*^c as Element of omega by ORDINAL1:def 12;
    set e = ((a*^c) hcf (b*^c)) div^ d;
    a hcf b divides b by Def5;
    then b = (a hcf b)*^(b div^ (a hcf b)) by Th7;
    then b*^c = d*^(b div^ (a hcf b)) by ORDINAL3:50;
    then
A4: d divides b*^c;
    a hcf b divides a by Def5;
    then a = (a hcf b)*^(a div^ (a hcf b)) by Th7;
    then a*^c = d*^(a div^ (a hcf b)) by ORDINAL3:50;
    then d divides a*^c;
    then d divides (a*^c) hcf (b*^c) by A4,Def5;
    then
A5: (a*^c) hcf (b*^c) = d*^e by Th7
      .= (a hcf b)*^e*^c by ORDINAL3:50;
    then (a hcf b)*^e*^c divides b*^c by Def5;
    then (a hcf b)*^e*^c*^((b*^c)div^((a hcf b)*^e*^c)) = b*^c by Th7;
    then (a hcf b)*^e*^((b*^c)div^((a hcf b)*^e*^c))*^c = b*^c by ORDINAL3:50;
    then (a hcf b)*^e*^((b*^c)div^((a hcf b)*^e*^c)) = b by A3,ORDINAL3:33;
    then
A6: (a hcf b)*^e divides b;
    (a hcf b)*^e*^c divides a*^c by A5,Def5;
    then (a hcf b)*^e*^c*^((a*^c)div^((a hcf b)*^e*^c)) = a*^c by Th7;
    then (a hcf b)*^e*^((a*^c)div^((a hcf b)*^e*^c))*^c = a*^c by ORDINAL3:50;
    then (a hcf b)*^e*^((a*^c)div^((a hcf b)*^e*^c)) = a by A3,ORDINAL3:33;
    then (a hcf b)*^e divides a;
    then (a hcf b)*^e divides a hcf b by A6,Def5;
    then (a hcf b)*^e*^((a hcf b) div^ ((a hcf b)*^e)) = a hcf b by Th7;
    then (a hcf b)*^(e*^((a hcf b) div^ ((a hcf b)*^e))) = a hcf b by
ORDINAL3:50
      .= (a hcf b)*^1 by ORDINAL2:39;
    then a hcf b = {} or e*^((a hcf b) div^ ((a hcf b)*^e)) = 1 by ORDINAL3:33;
    then e = 1 by A3,Th15,ORDINAL3:37;
    hence thesis by A5,ORDINAL2:39;
  end;
  suppose
    a = {};
    then a hcf b = b & a*^c = {} by Th14,ORDINAL2:35;
    hence thesis by Th14;
  end;
end;
