reserve n,m for Nat,
  r,r1,r2,s,t for Real,
  x,y for set;

theorem Th29:
  for D be non empty set, f be FinSequence of PFuncs(D,REAL), d be
  Element of D, n be Nat holds (f|n)#d = (f#d)|n
proof
  let D1 be non empty set, f be FinSequence of PFuncs(D1,REAL), d1 be Element
  of D1, n be Nat;
A1: len(f#d1) = len f by Def8;
A2: len((f|n)#d1) = len(f|n) by Def8;
  now
    per cases;
    case
A3:   len f<=n;
      then f|n = f by Lm1;
      hence thesis by A1,A3,Lm1;
    end;
    case
A4:   n<len f;
      then
A5:   len(f|n) = n by FINSEQ_1:59;
A6:   len((f#d1)|n) = n by A1,A4,FINSEQ_1:59;
A7:   dom f = Seg len f & dom(f#d1) = Seg len(f#d1) by FINSEQ_1:def 3;
A8:   dom((f|n)#d1) = Seg len((f|n)#d1) by FINSEQ_1:def 3;
      now
        per cases;
        case
A9:       n=0;
          thus thesis by A2,A9;
        end;
        case
A10:      n<>0;
A11:      dom ((f#d1)|n) = Seg len(f|n) by A5,A6,FINSEQ_1:def 3;
          0+1<=n by A10,NAT_1:13;
          then
A12:      n in dom f by A4,FINSEQ_3:25;
          now
            let m be Nat;
            assume
A13:        m in dom ((f#d1)|n);
            then
A14:        m in dom (f#d1) by A1,A5,A7,A12,A11,RFINSEQ:6;
            then reconsider G=f.m as Element of PFuncs(D1,REAL) by A1,A7,
FINSEQ_2:11;
            ((f#d1)|n).m = (f#d1).m by A1,A5,A7,A12,A11,A13,RFINSEQ:6;
            then
A15:        ((f#d1)|n).m = G.d1 by A14,Def8;
            (f|n).m = G by A5,A12,A11,A13,RFINSEQ:6;
            hence ((f#d1)|n).m = ((f|n)#d1).m by A2,A8,A11,A13,A15,Def8;
          end;
          hence thesis by A2,A5,A6,FINSEQ_2:9;
        end;
      end;
      hence thesis;
    end;
  end;
  hence thesis;
end;
