reserve a, b for Int_position,
  i for Instruction of SCMPDS,
  l for Element of NAT,
  k, k1, k2 for Integer;

theorem
  NIC((a,k1)>=0_goto k2,l) = { l+1, |. (k2+ l) .| }
proof
  set s = the State of SCMPDS;
  set i = (a,k1)>=0_goto k2;
  set t = |.(k2+ l).|;
  set I = i;
  reconsider n = l as Element of NAT;
  reconsider u = the n-started State of SCMPDS
     as Element of product the_Values_of SCMPDS by CARD_3:107;
  hereby
    let x be object;
    assume x in NIC(i,l);
    then consider s being Element of product the_Values_of SCMPDS
    such that
A1: x = IC Exec(i,s) and
A2: IC s = l;
A3: ex m1 being Element of NAT st m1 = IC s & ICplusConst(s, k2) = |.m1+
    k2.| by SCMPDS_2:def 18;
    per cases;
    suppose
A4:   s.DataLoc(s.a,k1) >= 0;
      x = t by A1,A2,A3,A4,SCMPDS_2:57;
      hence x in {l+1,t} by TARSKI:def 2;
    end;
    suppose
A5:   s.DataLoc(s.a,k1) < 0;
      x = l+1 by A1,A2,A5,SCMPDS_2:57;
      hence x in {l+1,t} by TARSKI:def 2;
    end;
  end;
  let x be object;
  assume
A6: x in {l+1,t};
  per cases by A6,TARSKI:def 2;
  suppose
A7: x = l+1;
A8: -1 < 0;
  reconsider u1 = u +* (a.-->-1) as State of SCMPDS;
  reconsider u1 = u +* (a.-->-1)
     as Element of product the_Values_of SCMPDS by CARD_3:107;
  reconsider u2 = u1 +* (DataLoc(u1.a,k1).-->-1)
     as Element of product the_Values_of SCMPDS by CARD_3:107;
A9: IC u2 = u1.IC SCMPDS by FUNCT_4:83,SCMPDS_2:43
      .= IC u by FUNCT_4:83,SCMPDS_2:43
      .= n by MEMSTR_0:def 11;
A10: u2.DataLoc(u1.a,k1) = -1 by FUNCT_7:94;
    u2.DataLoc(u2.a,k1) < 0
    proof
      per cases;
      suppose
        a = DataLoc(u1.a,k1);
        hence thesis by A10;
      end;
      suppose
        a <> DataLoc(u1.a,k1);
        then u2.a = u1.a by FUNCT_4:83;
        hence thesis by A8,FUNCT_7:94;
      end;
    end;
    then x = IC Exec(i,u2) by A7,A9,SCMPDS_2:57;
    hence thesis by A9;
  end;
  suppose
A11: x = t;
  reconsider u1 = u +* (a.-->-1) as State of SCMPDS;
  reconsider u1 = u +* (a.-->0)
     as Element of product the_Values_of SCMPDS by CARD_3:107;
  reconsider u2 = u1 +* (DataLoc(u1.a,k1).-->0)
     as Element of product the_Values_of SCMPDS by CARD_3:107;
A12: u2.DataLoc(u1.a,k1) = 0 by FUNCT_7:94;
A13: u2.DataLoc(u2.a,k1) >= 0
    proof
      per cases;
      suppose
        a = DataLoc(u1.a,k1);
        hence thesis by A12;
      end;
      suppose
        a <> DataLoc(u1.a,k1);
        then u2.a = u1.a by FUNCT_4:83;
        hence thesis by FUNCT_7:94;
      end;
    end;
A14: IC u2 = u1.IC SCMPDS by FUNCT_4:83,SCMPDS_2:43
      .= IC u by FUNCT_4:83,SCMPDS_2:43
      .= n by MEMSTR_0:def 11;
    ex m1 being Element of NAT st m1 = IC u2 & ICplusConst(u2,k2) = |.
    m1+k2.| by SCMPDS_2:def 18;
    then x = IC Exec(i,u2) by A11,A14,A13,SCMPDS_2:57;
    hence thesis by A14;
  end;
end;
