modify-combinator1(f) ==
  u,p.
   (f 
    (i.if (i = 0)
          then case u 0
               of inl(xy) => if oob-hasleft(xy)
                             then inl oob-getleft(xy) 
                             else ff
                             fi 
                | inr(_) => ff
        if (i = 1)
          then case u 0
               of inl(xy) => if oob-hasright(xy)
                             then inl oob-getright(xy) 
                             else ff
                             fi 
                | inr(_) => ff
        else u (i - 1)
        fi ) 
    p)



Definitions :  lambda: x.A[x],  oob-hasleft: oob-hasleft(x),  oob-getleft: oob-getleft(x),  eq_int: (i = j),  decide: case b of inl(x) => s[x] | inr(y) => t[y],  ifthenelse: if b then t else f fi ,  oob-hasright: oob-hasright(x),  inl: inl x ,  oob-getright: oob-getright(x),  bfalse: ff,  apply: f a,  subtract: n - m,  natural_number: $n
FDL editor aliases :  modify-combinator1

modify-combinator1(f)  ==
    \mlambda{}u,p.
      (f 
        (\mlambda{}i.if  (i  =\msubz{}  0)
                    then  case  u  0
                              of  inl(xy)  =>  if  oob-hasleft(xy)  then  inl  oob-getleft(xy)    else  ff  fi 
                                |  inr($_{}$)  =>  ff
                if  (i  =\msubz{}  1)
                    then  case  u  0
                              of  inl(xy)  =>  if  oob-hasright(xy)  then  inl  oob-getright(xy)    else  ff  fi 
                                |  inr($_{}$)  =>  ff
                else  u  (i  -  1)
                fi  ) 
        p)


Date html generated: 2010_08_27-AM-09_37_04
Last ObjectModification: 2009_12_16-AM-08_34_35

Home Index