
theorem Th28:
  for L being Field
  for p being non-zero Polynomial of L
  for a being Element of L
  for b being non zero Element of L
  holds SumRoots(<%a,b%>*'p) = -a/b + SumRoots(p)
  proof
    let L be Field;
    let p be non-zero Polynomial of L;
    let a be Element of L;
    let b be non zero Element of L;
    set q = <%a,b%>;
    set B = BRoots p;
    set C = canFS Roots(p);
    set E = canFS Roots(q*'p);
    set F = BRoots(q*'p)(++)E;
    set G = B(++)C;
    consider g being sequence of L such that
A1: SumRoots(p) = g.(len G) and
A2: g.0 = 0.L and
A3: for j being Nat, v being Element of L st j < len G & v = G.(j+1)
    holds g.(j+1) = g.j + v by RLVECT_1:def 12;
A4: len G = len C by Def1;
A5: len C = card Roots(p) by FINSEQ_1:93;
A6: dom g = NAT by FUNCT_2:def 1;
    per cases;
    suppose
A7:   not -a/b in Roots(p);
      then reconsider N = C^<*-a/b*> as Enumeration of Roots(q*'p) by Th16;
A8:   len N = 1 + card Roots(p) by Th17;
      set BN = BRoots(q*'p)(++)N;
A9:   len BN = len N by Def1;
A10:  Sum(BN) = SumRoots(q*'p) by A7,Th24;
      set f = g+*(1+len G,-a/b+SumRoots(p));
A11:  f.0 = g.0 by FUNCT_7:32;
A12:  f.(len BN) = -a/b+SumRoots(p) by A5,A9,A8,A4,A6,FUNCT_7:31;
      now
        let j be Nat, v be Element of L such that
A13:    j < len BN and
A14:    v = BN.(j+1);
        reconsider C as Enumeration of Roots(p) by Th2;
A15:    f.j = g.j by A5,A9,A8,A4,A13,FUNCT_7:32;
A16:    j+1 <= len BN by A13,NAT_1:13;
        then
A17:    BN.(j+1) = (BRoots(q*'p)*N).(j+1) * (N/.(j+1)) by Def1,NAT_1:11;
A18:    j+1 in dom N by A9,A16,NAT_1:11,FINSEQ_3:25;
        then
A19:    N.(j+1) = N/.(j+1) by PARTFUN1:def 6;
A20:    multiplicity(q*'p,N/.(j+1)) =
        multiplicity(q,N/.(j+1))+multiplicity(p,N/.(j+1)) by UPROOTS:55;
        j <= len G by A5,A9,A8,A4,A13,NAT_1:13;
        then per cases by XXREAL_0:1;
        suppose
A21:      j < len G;
          then j+1 < 1+len G by XREAL_1:8;
          then
A22:      f.(j+1) = g.(j+1) by FUNCT_7:32;
A23:      j+1 <= len G by A21,NAT_1:13;
A24:      j+1 in dom C by A4,A23,NAT_1:11,FINSEQ_3:25;
          then
A25:      C.(j+1) = C/.(j+1) by PARTFUN1:def 6;
A26:      N/.(j+1) = C/.(j+1) by A4,A5,A23,A19,A25,Th17,NAT_1:11;
          now
            assume N/.(j+1) is_a_root_of q;
            then
A27:        N/.(j+1) in Roots(q) by POLYNOM5:def 10;
            Roots(<%a,b%>) = {-a/b} by Th10;
            then
A28:        N/.(j+1) = -a/b by A27,TARSKI:def 1;
A29:        C.(j+1) in rng C by A24,FUNCT_1:def 3;
            rng C c= Roots(p) by FINSEQ_1:def 4;
            hence contradiction by A7,A25,A26,A28,A29;
          end;
          then
A30:      multiplicity(q,N/.(j+1)) = 0 by NAT_1:14,UPROOTS:52;
A31:      (BRoots(q*'p)*N).(j+1) = (BRoots(q*'p)).(N.(j+1)) by A18,FUNCT_1:13
          .= multiplicity(q*'p,N/.(j+1)) by A19,UPROOTS:def 9
          .= (BRoots(p)).(C.(j+1)) by A25,A26,A20,A30,UPROOTS:def 9
          .= (BRoots(p)*C).(j+1) by A24,FUNCT_1:13;
          BN.(j+1) = G.(j+1) by A23,A26,A31,A17,Def1,NAT_1:11;
          hence f.(j+1) = f.j + v by A21,A3,A14,A15,A22;
        end;
        suppose
A32:      j = len G;
          then
A33:      f.(j+1) = -a/b+SumRoots(p) by A6,FUNCT_7:31;
A34:      (BRoots(q*'p)*N).(j+1) = (BRoots(q*'p)).(N.(j+1)) by A18,FUNCT_1:13;
          not -a/b is_a_root_of p by A7,POLYNOM5:def 10;
          then
A35:      multiplicity(p,-a/b) = 0 by NAT_1:14,UPROOTS:52;
          (BRoots(q*'p)).(N.(j+1)) = multiplicity(q,-a/b)+multiplicity(p,-a/b)
          by A4,A19,A20,A32,UPROOTS:def 9
          .= 1 by A35,Th11;
          hence f.(j+1) = f.j + v
          by A1,A4,A14,A15,A17,A19,A32,A33,A34,BINOM:13;
        end;
      end;
      hence thesis by A2,A12,A11,A10,RLVECT_1:def 12;
    end;
    suppose
A36:  -a/b in Roots(p);
      Roots(q) = {-a/b} by Th10;
      then
A37:  Roots(p) = Roots(q) \/ Roots(p) by A36,XBOOLE_1:12,ZFMISC_1:31
      .= Roots(q*'p) by UPROOTS:23;
      reconsider E as Enumeration of Roots(q*'p) by Th2;
A38:  len(B(++)E) = len E by Def1;
A39:  Sum(BRoots(q)(++)E) = -a/b by Th25;
      len(BRoots(q)(++)E) = len E by Def1;
      then
A40:  (BRoots(q)(++)E) is Element of (len E)-tuples_on the carrier of L
      by FINSEQ_2:92;
A41:  (B(++)E) is Element of (len E)-tuples_on the carrier of L
      by A38,FINSEQ_2:92;
      BRoots(q*'p) = BRoots(q) + BRoots(p) by UPROOTS:56;
      hence SumRoots(q*'p) = Sum((BRoots(q)(++)E)+(BRoots(p)(++)E)) by Th19
      .= -a/b + SumRoots(p) by A37,A39,A40,A41,FVSUM_1:76;
    end;
  end;
