diff --git a/changelog b/changelog
index 067f955..ec89d21 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,6 @@
+20091029 tpd src/axiom-website/patches.html 20091029.01.tpd.patch
+20091029 tpd src/input/Makefile add distexpr.input 
+20091029 tpd src/input/distexpr.input added
 20091028 tpd src/axiom-website/patches.html 20091028.06.tpd.patch
 20091028 tpd books/bookvol10.3 Product makeprod example
 20091028 tpd src/axiom-website/patches.html 20091028.05.tpd.patch
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 35f51b9..4e7d3b6 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -2191,5 +2191,7 @@ src/input/finitegraph.input added<br/>
 books/bookvol10.3 Product.input, Product.help<br/>
 <a href="patches/20091028.06.tpd.patch">20091028.06.tpd.patch</a>
 books/bookvol10.3 Product add makeprod example<br/>
+<a href="patches/20091029.01.tpd.patch">20091029.01.tpd.patch</a>
+src/input/distexpr.input added<br/>
  </body>
 </html>
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 4412128..cc94fbd 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -302,7 +302,8 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     danzwill.regress  danzwill2.regress  \
     decimal.regress   defintef.regress defintrf.regress \
     derham.regress    dfloat.regress   dhmatrix.regress \
-    dhtri.regress     directproduct.regress divisor.regress \
+    dhtri.regress     directproduct.regress distexpr.regress \
+    divisor.regress \
     dmp.regress       dop.regress      dpol.regress     \
     e1.regress        ei.regress \
     easter.regress    efi.regress \
@@ -574,7 +575,7 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/de2re.input \
        ${OUT}/dfloat.input   ${OUT}/dhmatrix.input \
        ${OUT}/dhtri.input  ${OUT}/directproduct.input \
-       ${OUT}/divisor.input \
+       ${OUT}/distexpr.input ${OUT}/divisor.input \
        ${OUT}/dmp.input      ${OUT}/dop.input \
        ${OUT}/dpol.input     ${OUT}/draw2dsf.input \
        ${OUT}/drawalg.input  ${OUT}/drawcfn.input \
@@ -823,7 +824,7 @@ DOCFILES= \
   ${DOC}/defs.input.dvi        ${DOC}/derham.input.dvi     \
   ${DOC}/dfloat.input.dvi      ${DOC}/dhmatrix.input.dvi \
   ${DOC}/dhtri.input.dvi      \
-  ${DOC}/directproduct.input.dvi \
+  ${DOC}/directproduct.input.dvi ${DOC}/distexpr.input.dvi \
   ${DOC}/divisor.input.dvi     ${DOC}/dmp.input.dvi        \
   ${DOC}/dop.input.dvi         ${DOC}/dpol.input.dvi       \
   ${DOC}/draw2dsf.input.dvi    ${DOC}/drawalg.input.dvi    \
diff --git a/src/input/distexpr.input.pamphlet b/src/input/distexpr.input.pamphlet
new file mode 100644
index 0000000..d31ce4b
--- /dev/null
+++ b/src/input/distexpr.input.pamphlet
@@ -0,0 +1,142 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/input distexpr.input}
+\author{Francois Maltey, Bill Page, Martin Rubey}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+\begin{chunk}{distexpr.spad}
+)abbrev domain DEXPR DistributedExpression
+DistributedExpression(R:Join(Ring,OrderedSet)): Exports == Implementation where
+  EXPRR ==> Expression R
+  AN    ==> AlgebraicNumber
+  SUP   ==> SparseUnivariatePolynomial
+
+  Exports == FunctionSpace R with
+    if R has IntegralDomain then
+      AlgebraicallyClosedFunctionSpace R
+      TranscendentalFunctionCategory
+      CombinatorialOpsCategory
+      LiouvillianFunctionCategory
+      SpecialFunctionCategory
+      reduce: % -> %
+        ++ reduce(f) simplifies all the unreduced algebraic quantities
+        ++ present in f by applying their defining relations.
+      number?: % -> Boolean
+        ++ number?(f) tests if f is rational
+      simplifyPower: (%,Integer) -> %
+        ++ simplifyPower(f,n) \undocumented
+      if R has GcdDomain then
+        factorPolynomial: SUP % -> Factored SUP %
+          ++ factorPolynomial(p) \undocumented
+        squareFreePolynomial: SUP % -> Factored SUP %
+          ++ squareFreePolynomial(p) \undocumented
+      if R has RetractableTo Integer then RetractableTo AN
+    coerce: EXPRR -> %
+
+  Implementation == EXPRR add
+    Rep := EXPRR
+
+    out: (Polynomial R, List %, List %) -> OutputForm
+      -- coerces the polynomial to OutputForm completely expanded and
+      -- replaces the variables in vl with the kernels in kl
+
+    out(p,kl,vl) ==
+      ex := leadingMonomial(p)::%
+      if reductum p = 0
+      then coerce(eval(ex,vl,kl))$Rep
+      else coerce(eval(ex,vl,kl))$Rep + out(reductum p, kl, vl)
+
+    coerce(ex:%):OutputForm ==
+      kl:=kernels ex
+      vl:List %:=[subscript('x,[i::OutputForm])::Symbol::% for i in 1..#kl]
+      exl:%:=subst(ex,kl,vl)$%
+      kll:=map(coerce(#1)$%,kl)$ListFunctions2(Kernel %,%)
+      if R has IntegralDomain then
+        if denominator exl = 1 then
+          out(retract(numerator exl)@Polynomial(R), kll,vl)
+        else
+          out(retract(numerator exl)@Polynomial(R), kll,vl)
+           /out(retract(denominator exl)@Polynomial(R), kll,vl)
+      else
+        out(retract(exl)@Polynomial(R),kll,vl)
+
+    coerce(p:EXPRR):% == p
+
+\end{chunk}
+\begin{chunk}{*}
+)set break resume
+)sys rm -f distexpr.output
+)spool distexpr.output
+)set message test on
+)set message auto off
+)clear all
+)sys cp $AXIOM/../../src/input/distexpr.input.pamphlet .
+)lisp (tangle "distexpr.input.pamphlet" "distexpr.spad" "distexpr.spad")
+)co distexpr
+ 
+--S 1 of 6
+ex1:=(2*log(x)+3*exp(y))*(4*sin(z)+2*log(x))
+--R 
+--R
+--R                       y                 2      y
+--R   (1)  (8log(x) + 12%e )sin(z) + 4log(x)  + 6%e log(x)
+--R                                                     Type: Expression Integer
+--E 1
+
+--S 2 of 6
+ex2:=8*log(x)*sin(z)+4*log(x)^2+12*exp(y)*sin(z)+6*exp(y)*log(x)
+--R 
+--R
+--R                       y                 2      y
+--R   (2)  (8log(x) + 12%e )sin(z) + 4log(x)  + 6%e log(x)
+--R                                                     Type: Expression Integer
+--E 2
+
+--S 3 of 6
+subst(ex1, kernels ex1, [x1,x2,x3])::DMP([x1,x2,x3],INT)
+--R 
+--R
+--R                              2
+--R   (3)  8x1 x2 + 12x1 x3 + 4x2  + 6x2 x3
+--R                  Type: DistributedMultivariatePolynomial([x1,x2,x3],Integer)
+--E 3
+
+--S 4 of 6
+ex1::DistributedExpression(Integer)
+--R 
+--R
+--R           y             y                2
+--R   (4)  6%e log(x) + 12%e sin(z) + 4log(x)  + 8log(x)sin(z)
+--R                                          Type: DistributedExpression Integer
+--E 4
+
+--S 5 of 6
+((1+2*a+3*b)*(4*c+5*d))::DEXPR INT
+--R 
+--R
+--R   (5)  8a c + 10a d + 12b c + 15b d + 4c + 5d
+--R                                          Type: DistributedExpression Integer
+--E 5
+
+--S 6 of 6
+((1+2*a+3*b)*(4*c+5*d))::POLY INT
+--R 
+--R
+--R   (6)  (15b + 10a + 5)d + (12b + 8a + 4)c
+--R                                                     Type: Polynomial Integer
+--E 6
+
+)spool 
+)lisp (bye)
+ 
+\end{chunk}
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} http://axiom-wiki.newsynthesis.org/SandBoxDistributedExpression
+\end{thebibliography}
+\end{document}
