reserve A,X for non empty set;
reserve f for PartFunc of [:X,X:],REAL;
reserve a for Real;

theorem Th1:
  for p being FinSequence, k being Nat
  st k+1 in dom p & not k in dom p holds k = 0
proof
  let p be FinSequence, k be Nat such that
A1: k+1 in dom p and
A2: not k in dom p;
  assume k <> 0;
  then
A3: k >= 1 by NAT_1:14;
  k <= k+1 & k+1 <= len p by A1,FINSEQ_3:25,NAT_1:12;
  then k <= len p by XXREAL_0:2;
  hence thesis by A2,A3,FINSEQ_3:25;
end;
