Nuprl Definition : norm-factors

norm-factors(L) ==
  let L,x,n = accumulate (with value Z and list item y):
               let L,x,n = Z in 
               if (x =z y) then eval n' = n + 1 in <L, x, n'>
               if (x =z 1) then <L, y, 1>
               if (n =z 1) then <[x / L], y, 1>
               else <[x^n / L], y, 1>
               fi 
              over list:
                L
              with starting value:
               <[], 1, 0>) in 
  if (n =z 1) then [x / L] else [x^n / L] fi 



Definitions occuring in Statement :  exp: i^n,  list_accum: list_accum,  cons: [a / b],  nil: [],  callbyvalue: callbyvalue,  ifthenelse: if b then t else f fi ,  eq_int: (i =z j),  spreadn: spread3,  pair: <a, b>,  add: n + m,  natural_number: $n
Definitions occuring in definition :  list_accum: list_accum,  spreadn: spread3,  callbyvalue: callbyvalue,  add: n + m,  nil: [],  pair: <a, b>,  ifthenelse: if b then t else f fi ,  eq_int: (i =z j),  natural_number: $n,  cons: [a / b],  exp: i^n
FDL editor aliases :  norm-factors

Latex:
norm-factors(L)  ==
    let  L,x,n  =  accumulate  (with  value  Z  and  list  item  y):
                              let  L,x,n  =  Z  in 
                              if  (x  =\msubz{}  y)  then  eval  n'  =  n  +  1  in  <L,  x,  n'>
                              if  (x  =\msubz{}  1)  then  <L,  y,  1>
                              if  (n  =\msubz{}  1)  then  <[x  /  L],  y,  1>
                              else  <[x\^{}n  /  L],  y,  1>
                              fi 
                            over  list:
                                L
                            with  starting  value:
                              <[],  1,  0>)  in 
    if  (n  =\msubz{}  1)  then  [x  /  L]  else  [x\^{}n  /  L]  fi 



Date html generated: 2016_05_15-PM-04_03_24
Last ObjectModification: 2015_09_23-AM-07_46_17

Theory : general


Home Index