Nuprl Definition : trial-division
trial-division(n;L) ==
  rec-case(L) of
  [] => inr ⋅ 
  a::as =>
   r.case r
   of inl(x) =>
   inl x
   | inr(x) =>
   if a <z n then eval g = better-gcd(a;n) in if 1 <z g then inl g else inr x  fi  else inr x  fi 
Definitions occuring in Statement : 
list_ind: list_ind, 
better-gcd: better-gcd(a;b)
, 
callbyvalue: callbyvalue, 
ifthenelse: if b then t else f fi 
, 
lt_int: i <z j
, 
it: ⋅
, 
decide: case b of inl(x) => s[x] | inr(y) => t[y]
, 
inr: inr x 
, 
inl: inl x
, 
natural_number: $n
Definitions occuring in definition : 
list_ind: list_ind, 
it: ⋅
, 
decide: case b of inl(x) => s[x] | inr(y) => t[y]
, 
callbyvalue: callbyvalue, 
better-gcd: better-gcd(a;b)
, 
ifthenelse: if b then t else f fi 
, 
lt_int: i <z j
, 
natural_number: $n
, 
inl: inl x
, 
inr: inr x 
FDL editor aliases : 
trial-division
Latex:
trial-division(n;L)  ==
    rec-case(L)  of
    []  =>  inr  \mcdot{} 
    a::as  =>
      r.case  r
      of  inl(x)  =>
      inl  x
      |  inr(x)  =>
      if  a  <z  n  then  eval  g  =  better-gcd(a;n)  in  if  1  <z  g  then  inl  g  else  inr  x    fi    else  inr  x    fi 
Date html generated:
2016_05_15-PM-06_09_52
Last ObjectModification:
2015_09_23-AM-08_01_42
Theory : general
Home
Index