
theorem Th2:
  for A being set, f being FinSequence of bool A
  st (for i being Nat st 1 <= i & i < len f holds f/.i c= f/.(i+1))
 for i, j being Nat st 1 <= i & j <= len f & f/.j c= f/.i
 for k being Nat st i <= k <= j holds f/.j = f/.k
proof
  let A be set;
  let f be FinSequence of bool A such that
A1: for i being Nat st 1 <= i < len f holds f/.i c= f/.(i +1);
  let i, j be Nat;
  assume that
A2: 1 <= i and
A3: j <= len f and
A4: f/.j c= f/.i;
  let k be Nat;
  assume that
A5: i <= k and
A6: k <= j;
  1 <= k by A2,A5,XXREAL_0:2;
  then
A7: f/.k c= f/.j by A1,A3,A6,Th1;
  defpred P[Nat] means i+$1 <= j implies f/.j c= f/.(i+$1);
A8: now
    let k be Nat           ;
    assume
A9: P[k];
A10: i+k+1 = i+(k+1);
    thus P[k+1]
    proof
      i+k >= i by NAT_1:11;
      then
A11:  i+k >= 1 by A2,XXREAL_0:2;
      assume
A12:  i+(k+1) <= j;
      then i+k < j by A10,NAT_1:13;
      then i+k < len f by A3,XXREAL_0:2;
      then f/.(i+k) c= f/.(i+k+1) by A1,A11;
      hence thesis by A9,A12,NAT_1:13;
    end;
  end;
A13: P[0] by A4;
A14: for k being Nat holds P[k] from NAT_1:sch 2(A13,A8);
  consider m be Nat such that
A15: k = i + m by A5,NAT_1:10;
  reconsider m as Element of NAT by ORDINAL1:def 12;
  k=i+m by A15;
  then f/.j c= f/.k by A14,A6;
  hence thesis by A7;
end;
