
theorem finP:
for F being ordered Field,
    E being FieldExtension of F
for P being Ordering of F
for f being FinSequence of E st
for i being Nat st i in dom f holds f.i in P holds Sum f in P
proof
let F be ordered Field, E be FieldExtension of F, P be Ordering of F,
    f be FinSequence of E;
assume AS: for i being Nat st i in dom f holds f.i in P;
I1: F is Subring of E by FIELD_4:def 1;
defpred P[Nat] means
   for f being FinSequence of E st len f = $1 &
   for i being Nat st i in dom f holds f.i in P holds Sum f in P;
IA: P[0]
    proof
    now let f be FinSequence of E;
    assume len f = 0 &
           for i being Nat st i in dom f holds f.i in P;
    then f = <*>(the carrier of F);
    then Sum f = Sum <*>(the carrier of F) by I1,FIELD_4:2
              .= 0.F by RLVECT_1:43;
    hence Sum f in P by REALALG1:25;
    end;
    hence thesis;
    end;
IS: now let k be Nat;
    assume IV: P[k];
    now let f be FinSequence of E;
    assume AS: len f = k+1 &
               for i being Nat st i in dom f holds f.i in P;
    then f <> {};
    then consider G being FinSequence, y being object such that
    B2: f = G^<*y*> by FINSEQ_1:46;
    rng G c= rng f by B2,FINSEQ_1:29; then
    reconsider G as FinSequence of E by XBOOLE_1:1,FINSEQ_1:def 4;
    B10: len f = len G + len<*y*> by B2,FINSEQ_1:22
              .= len G + 1 by FINSEQ_1:39;
    C: dom G c= dom f by B2,FINSEQ_1:26;
    D: now let i be Nat;
       assume C0: i in dom G;
       then G.i = f.i by B2,FINSEQ_1:def 7;
       hence G.i in P by C,C0,AS;
       end;
    E: now let o be object;
       assume o in rng G; then
       consider u being object such that
       D1: u in dom G & G.u = o by FUNCT_1:def 3;
       reconsider u as Element of NAT by D1;
       thus o in P by D,D1;
       end;
    rng<*y*> = {y} by FINSEQ_1:39;
    then G5: y in rng<*y*> by TARSKI:def 1;
    rng<*y*> c= rng f by B2,FINSEQ_1:30;
    then consider u being object such that
    G6: u in dom f & f.u = y by G5,FUNCT_1:def 3;
    reconsider u as Element of NAT by G6;
    G7: f.u in P by AS,G6; then
    reconsider y1 = y as Element of F by G6;
    the carrier of F c= the carrier of E by I1,C0SP1:def 3; then
    reconsider y as Element of E by G6,G7;
    now let o be object;
      assume o in rng G;
      then o in P by E;
      hence o in the carrier of F;
      end;
    then rng G c= the carrier of F; then
    reconsider G1 = G as FinSequence of F by FINSEQ_1:def 4;
    B6: Sum G = Sum G1 by I1,FIELD_4:2; then
    B5: P is add-closed & Sum G1 in P & y1 in P by G6,D,IV,B10,AS;
    Sum f = Sum G + Sum <*y*> by B2,RLVECT_1:41
         .= Sum G + y by RLVECT_1:44
         .= Sum G1 + y1 by I1,B6,FIELD_6:15;
    hence Sum f in P by B5;
    end;
    hence P[k+1];
    end;
I: for k being Nat holds P[k] from NAT_1:sch 2(IA,IS);
consider n being Nat such that H: len f = n;
thus thesis by AS,I,H;
end;
