
theorem
  for A,B being Element of NAT, X being non empty set for F being
sequence of  X st F is one-to-one holds card {F.w where w is Element of NAT
  : A <= w & w <= A + B} = B+1
proof
  let A,B be Element of NAT, X be non empty set;
  let F be sequence of  X such that
A1: F is one-to-one;
  defpred P[Nat] means card { F.w where w is Element of NAT: A<= w
  & w<=A+$1 } = $1+1;
A2: dom F = NAT by FUNCT_2:def 1;
A3: for k being Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A4: P[k];
    set Fwk = {F.w where w is Element of NAT: A<=w & w<=A+k};
    reconsider Fwk as finite set by A4;
    set Fwk1 = {F.w where w is Element of NAT: A<=w & w<=A+k+1};
A5: now
      let x be object;
      hereby
        assume x in Fwk1;
        then consider w being Element of NAT such that
A6:     x = F.w and
A7:     A <= w and
A8:     w<=A+k+1;
A9:     w = A+k+1 or w < A+k+1 by A8,XXREAL_0:1;
        per cases by A9,NAT_1:13;
        suppose
          w = A+k+1;
          then x in {F.(A+k+1)} by A6,TARSKI:def 1;
          hence x in Fwk \/ {F.(A+k+1)} by XBOOLE_0:def 3;
        end;
        suppose
          w <= A + k;
          then x in Fwk by A6,A7;
          hence x in Fwk \/ {F.(A+k+1)} by XBOOLE_0:def 3;
        end;
      end;
      assume
A10:  x in Fwk \/ {F.(A+k+1)};
      per cases by A10,XBOOLE_0:def 3;
      suppose
        x in Fwk;
        then consider w being Element of NAT such that
A11:    x = F.w and
A12:    A <= w and
A13:    w<=A+k;
        w <= A+k+1 by A13,NAT_1:13;
        hence x in Fwk1 by A11,A12;
      end;
      suppose
A14:    x in {F.(A+k+1)};
A15:    A <= A+(k+1) by NAT_1:11;
        x = F.(A+k+1) by A14,TARSKI:def 1;
        hence x in Fwk1 by A15;
      end;
    end;
    now
      assume F.(A+k+1) in Fwk;
      then consider w being Element of NAT such that
A16:  F.(A+k+1) = F.w and
      A <= w and
A17:  w <= A+k;
      A+k+1 = w by A1,A2,A16,FUNCT_1:def 4;
      hence contradiction by A17,NAT_1:13;
    end;
    then card (Fwk \/ {F.(A+k+1)}) = (k+1)+1 by A4,CARD_2:41;
    hence thesis by A5,TARSKI:2;
  end;
  now
    let x be object;
    hereby
      assume x in { F.w where w is Element of NAT: A <= w & w <= A+0};
      then consider w being Element of NAT such that
A18:  F.w = x and
A19:  A<=w and
A20:  w<=A+0;
      w = A by A19,A20,XXREAL_0:1;
      hence x in {F.A} by A18,TARSKI:def 1;
    end;
    assume x in {F.A};
    then x = F.A by TARSKI:def 1;
    hence x in {F.w where w is Element of NAT: A<=w & w<=A+0};
  end;
  then {F.w where w is Element of NAT: A<=w & w<=A+0} = {F.A} by TARSKI:2;
  then
A21: P[ 0 ] by CARD_1:30;
  for k being Nat holds P[k] from NAT_1:sch 2(A21,A3);
  hence thesis;
end;
