
theorem NF600:
  for a, b being Nat, s being set holds
  Seg a \/ {s} = Seg b implies a = b or a + 1 = b
  proof
    let a, b be Nat, s be set;

    assume L000: Seg b = Seg a \/ {s}; then

    L300: card (Seg a \/ {s}) = b by FINSEQ_1:57;

    L500: b - a <= 1
    proof
      assume L505: b - a > 1; then

      b - a + a > 1 + a by XREAL_1:8;
      then L519: b - 0 > a + 1 - 1 by XREAL_1:14;

      per cases;
      suppose s in Seg a;
        then card ((Seg a) \/ {s}) = card Seg a by ZFMISC_1:40
        .= a by FINSEQ_1:57;
        hence contradiction by L519,L000,FINSEQ_1:57;
      end;
      suppose not s in Seg a;
        then card ((Seg a) \/ {s})
        =  (card (Seg a)) + 1 by CARD_2:41
        .= a + 1 by FINSEQ_1:57;
        hence contradiction by L505,L300;
      end;
    end;

    set d = b - a;

    a <= b - 0 by L000,XBOOLE_1:11,FINSEQ_1:5;
    then d in NAT by XREAL_1:11,INT_1:3;
    then reconsider d as Nat;

    d = 0 or d = 1 by L500,NAT_1:25;
    hence a = b or a + 1 = b;
  end;
