reserve i,j,k,l,m,n for Nat,
  D for non empty set,
  f for FinSequence of D;

theorem Th6:
  i in dom f & j in dom f & len mid(f,i,j) = 1 implies i = j
proof
  assume
A1: i in dom f;
  then
A2: 1 <= i by FINSEQ_3:25;
A3: i <= len f by A1,FINSEQ_3:25;
  assume
A4: j in dom f;
  then
A5: 1 <= j by FINSEQ_3:25;
A6: j <= len f by A4,FINSEQ_3:25;
  assume
A7: len mid(f,i,j) = 1;
  per cases;
  suppose
A8: i <= j;
    then 0 + 1 = j -' i + 1 by A2,A6,A7,FINSEQ_6:186;
    then 0 = j - i by A8,XREAL_1:233;
    hence thesis;
  end;
  suppose
A9: i >= j;
    then 0 + 1 = i -' j + 1 by A3,A5,A7,FINSEQ_6:187;
    then 0 = i - j by A9,XREAL_1:233;
    hence thesis;
  end;
end;
