reserve i,j,m,n,k for Nat,
  x,y for set,
  K for Field,
  a,a1,a2 for Element of K,
  D for non empty set,
  d,d1,d2 for Element of D,
  M,M1,M2 for (Matrix of D),
  A,A1,A2,B1,B2 for (Matrix of K),
  f,g for FinSequence of NAT;

theorem Th2:
  for f,g be FinSequence of D st i in dom f holds Del(f^g,i) = Del( f,i)^g
proof
  let f,g be FinSequence of D such that
A1: i in dom f;
  set Df=Del(f,i);
  consider m such that
A2: len f = m + 1 and
A3: len Df = m by A1,FINSEQ_3:104;
  set Dg=Df^g;
  set fg=f^g;
  set Dfg=Del(fg,i);
A4: Seg len fg=dom fg by FINSEQ_1:def 3;
A5: len fg=len f+len g by FINSEQ_1:22;
  then len f <=len fg by NAT_1:12;
  then
A6: Seg len f c= Seg len fg by FINSEQ_1:5;
A7: len fg=len g+m+1 by A2,A5;
A8: Seg len f=dom f by FINSEQ_1:def 3;
A9: now
    let j such that
A10: 1<=j and
A11: j<=m+len g;
    now
      per cases;
      suppose
A12:    j<i;
        i<=len f by A1,FINSEQ_3:25;
        then
A13:    j<len f by A12,XXREAL_0:2;
        then
A14:    j in dom f by A10,FINSEQ_3:25;
        j<=m by A2,A13,NAT_1:13;
        then
A15:    j in dom Df by A3,A10,FINSEQ_3:25;
        thus Dfg.j = fg.j by A12,FINSEQ_3:110
          .= f.j by A14,FINSEQ_1:def 7
          .= Df.j by A12,FINSEQ_3:110
          .= Dg.j by A15,FINSEQ_1:def 7;
      end;
      suppose
A16:    j>=i;
        now
          per cases;
          suppose
A17:        j<=m;
A18:        0+1<=j+1 by XREAL_1:7;
            j+1<=len f by A2,A17,XREAL_1:7;
            then
A19:        j+1 in dom f by A18,FINSEQ_3:25;
A20:        j in dom Df by A3,A10,A17,FINSEQ_3:25;
            thus Dfg.j = fg.(j+1) by A1,A6,A8,A4,A7,A11,A16,FINSEQ_3:111
              .= f.(j+1) by A19,FINSEQ_1:def 7
              .= Df.j by A1,A2,A16,A17,FINSEQ_3:111
              .= Dg.j by A20,FINSEQ_1:def 7;
          end;
          suppose
A21:        j>m;
            then j>=len f by A2,NAT_1:13;
            then j+1>len f by NAT_1:13;
            then reconsider jL=j+1-len f as Element of NAT by NAT_1:21;
            j+1<=m+len g+1 by A11,XREAL_1:7;
            then jL+len f<=len f+len g by A2;
            then
A22:        jL<=len g by XREAL_1:8;
            jL<>0 by A2,A21;
            then jL>=1 by NAT_1:14;
            then
A23:        jL in dom g by A22,FINSEQ_3:25;
            thus Dfg.j = fg.(jL+len f) by A1,A6,A8,A4,A7,A11,A16,FINSEQ_3:111
              .= g.jL by A23,FINSEQ_1:def 7
              .= Dg.(m+jL) by A3,A23,FINSEQ_1:def 7
              .= Dg.j by A2;
          end;
        end;
        hence Dg.j=Dfg.j;
      end;
    end;
    hence Dg.j=Dfg.j;
  end;
A24: len Dg=len Df+len g by FINSEQ_1:22;
  len Dfg=m+len g by A1,A6,A8,A4,A7,FINSEQ_3:109;
  hence thesis by A3,A24,A9;
end;
