
theorem lem23d:
for F being Field
for p,q being Polynomial of F
holds (deg p > deg q implies LC(p + q) = LC p) &
      (deg p < deg q implies LC(p + q) = LC q) &
      ((deg p = deg q & LC p + LC q <> 0.F) implies LC(p + q) = LC p + LC q)
proof
let F be Field, p,q be Polynomial of F;
per cases;
suppose p <> 0_.(F) & q <> 0_.(F); then
reconsider p,q as non zero Polynomial of F by UPROOTS:def 5;
  A: now assume A1: deg p > deg q; then
     deg p > len q - 1 by HURWITZ:def 2; then
     deg p >= len q - 1 + 1 by INT_1:7; then
     A2: q.(deg p) = 0.F by ALGSEQ_1:8;
     A3: (p + q).(deg p) = p.(deg p) + q.(deg p) by NORMSP_1:def 2
                        .= LC p by A2,FIELD_6:2; then
     p + q <> 0_.(F); then
     A4: p + q is non zero by UPROOTS:def 5;
     deg(p + q) = deg p by A1,NIVEN:42;
     hence LC(p + q) = LC p by A3,A4,FIELD_6:2;
     end;
  B: now assume A1: deg q > deg p; then
     deg q > len p - 1 by HURWITZ:def 2; then
     deg q >= len p - 1 + 1 by INT_1:7; then
     A2: p.(deg q) = 0.F by ALGSEQ_1:8;
     A3: (p + q).(deg q) = p.(deg q) + q.(deg q) by NORMSP_1:def 2
                        .= LC q by A2,FIELD_6:2; then
     p + q <> 0_.(F); then
     A4: p + q is non zero by UPROOTS:def 5;
     deg(p + q) = deg q by A1,NIVEN:42;
     hence LC(p + q) = LC q by A3,A4,FIELD_6:2;
     end;
  now assume A1: deg p = deg q & LC p + LC q <> 0.F; then
    A2: deg(p + q) = max(deg p, deg p) by lem23a
                  .= deg p; then
    p + q <> 0_.(F) by HURWITZ:20; then
    p + q is non zero by UPROOTS:def 5;
    hence LC(p + q) = (p + q).(deg q) by A1,A2,FIELD_6:2
             .= p.(deg q) + q.(deg q) by NORMSP_1:def 2
             .= LC p + q.(deg q) by A1,FIELD_6:2
             .= LC p + LC q by FIELD_6:2;
    end;
  hence thesis by A,B;
  end;
suppose A: p = 0_.(F) & q <> 0_.(F); then
  reconsider q as non zero Polynomial of F by UPROOTS:def 5;
  deg p = -1 & deg q >= 0 by A,HURWITZ:20;
  hence thesis by A;
  end;
suppose A: q = 0_.(F) & p <> 0_.(F); then
  reconsider p as non zero Polynomial of F by UPROOTS:def 5;
  deg q = -1 & deg p >= 0 by A,HURWITZ:20;
  hence thesis by A;
  end;
suppose A: q = 0_.(F) & p = 0_.(F);
  len 0_.(F) = 0 by POLYNOM4:3; then
  len(0_.(F)) - 1 < 0; then
  C: len(0_.(F)) -' 1 = 0 by XREAL_0:def 2;
  LC(p + q) = (0_.(F)).(len(0_.(F))-'1) by A,RATFUNC1:def 6
           .= 0.F by C;
  hence thesis by A;
  end;
end;
