
theorem Th5:
  for n,k being Nat st n < k holds ((Seg k) \ Seg (k -' n)) \/ {k
  -' n} = (Seg k) \ Seg (k -' (n+1))
proof
  let n, k be Nat such that
A1: n < k;
  set Sn1 = (Seg k) \ Seg (k -' (n+1));
  set Sn = (Seg k) \ Seg (k -' n);
  now
    let x be object such that
A2: x in Sn \/ {k -' n};
    per cases by A2,XBOOLE_0:def 3;
    suppose
A3:   x in Sn;
      n <= n+1 by NAT_1:13;
      then Sn c= Sn1 by Th4;
      hence x in Sn1 by A3;
    end;
    suppose
A4:   x in {k -' n};
      then reconsider y = x as Nat;
A5:   n < n + 1 by NAT_1:13;
      n+1 <= k by A1,NAT_1:13;
      then
A6:   k -' (n+1) < k -' n by A5,Th2;
A7:   x = k -' n by A4,TARSKI:def 1;
      then y <= k by NAT_D:35;
      hence x in Sn1 by A7,A6,Th3;
    end;
  end;
  then
A8: Sn \/ {k -' n} c= Sn1;
  now
    let x be object such that
A9: x in Sn1;
    reconsider y = x as Element of NAT by A9;
A10: y <= k by A9,Th3;
A11: k -' (n+1) + 1 = k -' n by A1,NAT_D:59;
    k -' (n+1) < y by A9,Th3;
    then
A12: k -' n <= y by A11,NAT_1:13;
    per cases by A12,XXREAL_0:1;
    suppose
      k -' n = y;
      then y in {k -' n} by TARSKI:def 1;
      hence x in Sn \/ {k -' n} by XBOOLE_0:def 3;
    end;
    suppose
      k -' n < y;
      then y in Sn by A10,Th3;
      hence x in Sn \/ {k -' n} by XBOOLE_0:def 3;
    end;
  end;
  then Sn1 c= Sn \/ {k -' n};
  hence thesis by A8,XBOOLE_0:def 10;
end;
