reserve x,a for Int_position,
  s for State of SCMPDS;

theorem Th3:
  for a be Int_position holds
   ex f be Function of product the_Values_of SCMPDS,NAT
    st for s being State of SCMPDS holds (s.a <= 0
  implies f.s =0) & (s.a > 0 implies f.s=s.a)
proof
  let a be Int_position;
  defpred P[set,set] means ex t be State of SCMPDS st t=$1 & (t.a <= 0 implies
  $2 =0) & (t.a > 0 implies $2=t.a);
A1: now
    let s be Element of product the_Values_of SCMPDS;
    per cases;
    suppose
A2:   s.a <= 0;
      reconsider y=0 as Element of NAT;
      take y;
      thus P[s,y] by A2;
    end;
    suppose
A3:   s.a > 0;
      then reconsider y=s.a as Element of NAT by INT_1:3;
      take y;
      thus P[s,y] by A3;
    end;
  end;
  consider
  f be Function of product the_Values_of SCMPDS,NAT such that
A4: for s being Element of product the_Values_of SCMPDS holds P[s,f.s]
    from FUNCT_2:sch 3(A1);
A5: for s holds P[s,f.s]
   proof
    let s;
    reconsider s as Element of product the_Values_of SCMPDS by CARD_3:107;
     P[s,f.s] by A4;
   hence thesis;
   end;
  take f;
  hereby
    let s;
    P[s,f.s] by A5;
    hence (s.a <= 0 implies f.s =0) & (s.a > 0 implies f.s=s.a);
  end;
end;
