
theorem Th28:
  for R being add-associative right_zeroed right_complementable
  associative Abelian distributive well-unital non trivial
  doubleLoopStr holds ex P being Function of R, Polynom-Ring (0,R) st P is
  RingIsomorphism
proof
  deffunc F(object)=Bags {}--> $1;
  let R be add-associative right_zeroed right_complementable associative
  Abelian distributive well-unital non trivial doubleLoopStr;
  consider P being Function such that
A1: dom P = the carrier of R and
A2: for x being object st x in the carrier of R holds P.x=F(x)
    from FUNCT_1:sch 3;
  now
    let y be object;
    hereby
      assume y in rng P;
      then consider x being object such that
A3:   x in the carrier of R and
A4:   y = P.x by A1,FUNCT_1:def 3;
      reconsider x as Element of R by A3;
      reconsider y9 = Bags {} --> x as Function of (Bags {}), R;
      Support y9 is finite by PRE_POLY:51;
      then y9 is finite-Support Series of 0, R by POLYNOM1:def 5;
      then y9 in the carrier of Polynom-Ring (0,R) by POLYNOM1:def 11;
      hence y in the carrier of Polynom-Ring (0,R) by A2,A4;
    end;
    assume y in the carrier of Polynom-Ring (0,R);
    then reconsider y9=y as Function of (Bags {}), R by POLYNOM1:def 11;
 dom y9 = Bags {} by FUNCT_2:def 1;
    then
 rng y9 = {y9.{}} by FUNCT_1:4,PRE_POLY:51;
    then y9.{} in rng y9 by TARSKI:def 1;
    then reconsider x = y9.{} as Element of R;
    y9 = Bags {} --> y9.{};
    then y = P.x by A2;
    hence y in rng P by A1,FUNCT_1:def 3;
  end;
  then
A7: rng P = the carrier of Polynom-Ring (0,R) by TARSKI:2;
  then reconsider P as Function of R, Polynom-Ring (0,R) by A1,FUNCT_2:1;
A8: P is onto by A7;
A9: EmptyBag {} = {} --> 0;
  now
    let x,y be Element of R;
    reconsider Px = P.x, Py = P.y, Pxy = P.(x+y) as Polynomial of 0, R by
POLYNOM1:def 11;
    now
      let z be bag of 0;
A10:   z in Bags {} by PRE_POLY:def 12;
A11:  Py.z = (Bags {} --> y).z by A2
        .= y by A10,FUNCOP_1:7;
A12:  Px.z = (Bags {} --> x).z by A2
        .= x by A10,FUNCOP_1:7;
      Pxy.z = (Bags {} --> x+y).z by A2
        .= x+y by A10,FUNCOP_1:7;
      hence Pxy.z = Px.z + Py.z by A12,A11;
    end;
    then Pxy = Px + Py by POLYNOM1:16;
    hence P.x+P.y = P.(x+y) by POLYNOM1:def 11;
  end;
  then
A13: P is additive;
  now
    let x,y be Element of R;
    reconsider Px = P.x, Py = P.y, Pxy = P.(x*y) as Polynomial of 0, R by
POLYNOM1:def 11;
    now
      reconsider s = <* x*y *> as FinSequence of the carrier of R;
      let b be bag of 0;
      take s;
A14:  b in Bags {} by PRE_POLY:def 12;
      thus Pxy.b = (Bags {} --> x*y).b by A2
        .= x*y by A14,FUNCOP_1:7
        .= Sum s by RLVECT_1:44;
A15:  decomp b = <* <* {}, {} *> *> by Th2;
A16:  len s = 1 by FINSEQ_1:39;
      hence len s = len decomp b by A15,FINSEQ_1:39;
A17:  len decomp b = 1 by A15,FINSEQ_1:39;
      now
        set b1 = {}, b2 = {};
        let k be Element of NAT;
A18:    b1 in Bags {} by PRE_POLY:51,TARSKI:def 1;
        then reconsider b1, b2 as bag of 0;
A19:    Px.b1 = (Bags {} --> x).b1 by A2
          .= x by A18,FUNCOP_1:7;
A20:    Py.b2 = (Bags {} --> y).b2 by A2
          .= y by A18,FUNCOP_1:7;
        assume
A21:    k in dom s;
        then
A22:    1 <= k & k <= 1 by A16,FINSEQ_3:25;
        then
A23:    k = 1 by XXREAL_0:1;
        take b1, b2;
        k in dom decomp b by A17,A22,FINSEQ_3:25;
        hence (decomp b)/.k = (decomp b).1 by A23,PARTFUN1:def 6
          .= <*b1, b2*> by A15;
        thus s/.k = s.1 by A21,A23,PARTFUN1:def 6
          .= Px.b1*Py.b2 by A19,A20;
      end;
      hence for k being Element of NAT st k in dom s ex b1, b2 being bag of 0
      st (decomp b)/.k = <*b1, b2*> & s/.k = Px.b1*Py.b2;
    end;
    then Pxy = Px *' Py by POLYNOM1:def 10;
    hence P.x*P.y = P.(x*y) by POLYNOM1:def 11;
  end;
  then
A24: P is multiplicative;
  take P;
  reconsider f0 = {{}} --> 0.R, f1 = {{}} --> 1_R as Function of {{}},the
  carrier of R;
A25: dom f1 = {{}};
A26: dom f0 = {{}};
A27: {} in dom ({{}} --> 0.R) by TARSKI:def 1;
  1_Polynom-Ring (0, R) = 1_ (0,R) by POLYNOM1:31
    .= 0_ (0,R)+*({},1_R) by A9,POLYNOM1:def 9
    .= ({{}} --> 0.R)+*({},1_R) by POLYNOM1:def 8,PRE_POLY:51
    .= ({{}} --> 0.R)+*({} .--> 1_R) by A27,FUNCT_7:def 3
    .= ({{}} --> 1_R) by A26,A25,FUNCT_4:19
    .= P.(1_R)by A2,PRE_POLY:51;
  then P is unity-preserving by GROUP_1:def 13;
  then
A28: P is RingHomomorphism by A13,A24;
  then
A29: P is RingEpimorphism by A8;
  now
    let x1,x2 be object;
    assume that
A30: x1 in dom P and
A31: x2 in dom P;
    assume P.x1 = P.x2;
    then (Bags {} --> x1) = P.x2 by A2,A30;
    then (Bags {} --> x1) = (Bags {} --> x2) by A2,A31;
    hence x1 = x2 by FUNCT_4:6;
  end;
  then P is one-to-one by FUNCT_1:def 4;
  then P is RingMonomorphism by A28;
  hence thesis by A29;
end;
