reserve i,j,k,n,m for Nat,
        X for set,
        b,s for bag of X,
        x for object;
reserve O for Ordinal,
        R for right_zeroed add-associative right_complementable
          right_unital distributive non trivial doubleLoopStr,
        p for Polynomial of O, R;
reserve O for Ordinal,
        R for right_zeroed add-associative right_complementable
             right_unital distributive non trivial doubleLoopStr,
        p for Polynomial of O, R;

theorem Th53:
  for X be Ordinal
  for S be right_zeroed add-associative right_complementable
    well-unital distributive non trivial doubleLoopStr
  for p be Polynomial of X, S, i be object
  for x be Function of X, S st i in X\vars p
  for s be Element of S holds
    eval(p,x) = eval(p, x+*(i,s))
proof
  let X be Ordinal;
  let S be right_zeroed add-associative right_complementable
    well-unital distributive non trivial doubleLoopStr;
  let p be Polynomial of X, S, o be object;
  let x be Function of X, S such that
A1: o in X\vars p;
  let s be Element of S;
  set xo=x+*(o,s);set SB=SgmX(BagOrder X,Support p);
  consider y be FinSequence of the carrier of S such that
A2: len y = len SB & eval(p,x) = Sum y and
A3: for i be Element of NAT st 1 <= i & i <= len y holds
  y/.i = (p * SB)/.i * eval(SB/.i,x) by POLYNOM2:def 4;
  consider yo be FinSequence of the carrier of S such that
A4: len yo = len SB & eval(p,xo) = Sum yo and
A5: for i be Element of NAT st 1 <= i & i <= len yo holds
  yo/.i = (p * SB)/.i * eval(SB/.i,xo) by POLYNOM2:def 4;
  for i be Nat st 1<=i <= len SB holds y.i = yo.i
  proof
    let i be Nat such that
A6: 1<=i <= len SB;
    reconsider i as Element of NAT by ORDINAL1:def 12;
A7: i in dom SB & i in dom y & i in dom yo by A6,A2,A4,FINSEQ_3:25;
    then
A8:  SB/.i = SB.i in rng SB by PARTFUN1:def 6,FUNCT_1:def 3;
    BagOrder X linearly_orders Support p by POLYNOM2:18;
    then
A9: SB/.i in Support p by A8,PRE_POLY:def 2;
    not o in vars p by A1,XBOOLE_0:def 5;
    then (SB/.i).o = 0 by A9,Def5;
    then eval(SB/.i,x) = eval(SB/.i,xo) by Th18;
    then yo/.i = (p * SB)/.i * eval(SB/.i,x) by A4,A5,A6;
    then yo/.i = y/.i =y.i by A2,A3,A6,A7,PARTFUN1:def 6;
    hence thesis by A7,PARTFUN1:def 6;
  end;
  hence thesis by A4,A2,FINSEQ_1:14;
end;
