reserve a,b,c for set;

theorem
  for D being non empty set,f being FinSequence of D, i,j,n being
  Element of NAT st 1<=i & i<=j & i<=len (f|n) & j<=len (f|n) holds mid(f,i,j)=
  mid(f|n,i,j)
proof
  let D be non empty set,f be FinSequence of D,i,j,n be Element of NAT;
  assume that
A1: 1<=i and
A2: i<=j and
A3: i<=len (f|n) and
A4: j<=len (f|n);
A5: j-'i+1 = j-i+1 by A2,XREAL_1:233;
A6: len (f|n) <= n by FINSEQ_5:17;
  then n>=i by A3,XXREAL_0:2;
  then
A7: n-0>=i-1 by XREAL_1:13;
  j<=n by A4,A6,XXREAL_0:2;
  then j-i <= n-i by XREAL_1:9;
  then
A8: j-i+1<=n-i+1 by XREAL_1:6;
  i-'1 = i-1 by A1,XREAL_1:233;
  then
A9: n-'(i-'1) = n-(i-1) by A7,XREAL_1:233
    .= n-i+1;
  mid(f|n,i,j)= ((f|n)/^(i-'1))|(j-'i+1) by A2,FINSEQ_6:def 3
    .= ((f/^(i-'1))|(n-'(i-'1)))|(j-'i+1) by FINSEQ_5:80
    .= (f/^(i-'1))|(j-'i+1) by A9,A5,A8,FINSEQ_5:77;
  hence thesis by A2,FINSEQ_6:def 3;
end;
