<?xml version="1.0" encoding="UTF-8"?>
<Worksheet>
<Version major="13" minor="0"/>
<Label-Scheme value="2" prefix=""/>
<View-Properties presentation="false"></View-Properties>
<MapleNet-Properties warnlevel="3" longdelim="true" plotoptions="" echo="1" errorcursor="false" elisiontermsthreshold="infinity" elisiontermsbefore="100" errorbreak="1" prettyprint="3" prompt="&gt; " latexwidth="6.0" useclientjvm="true" ansi="false" screenheight="25" labelwidth="20" plotdevice="inline" typesetting="standard" displayprecision="-1" indentamount="4" elisiondigitsthreshold="infinity" quiet="false" plotoutput="terminal" rtablesize="10" preplot="" showassumed="1" plotdriver="openviz" elisiontermsafter="100" labelling="true" postplot="" screenwidth="79" elisiondigitsbefore="100" elisiondigitsafter="100" verboseproc="2" imaginaryunit="I" ShowLabels="true"/>
<Styles><Font name="Heading 4" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 5" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 1" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Bullet Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Equation Label" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Author" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Diagnostic" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[40,120,40]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Page Number" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 2" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="16" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 3" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Plot" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Code" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Header and Footer" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="10" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Normal" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[255,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Inert Output" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[144,144,144]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Dictionary Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[147,0,15]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="Dash Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 3" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="true" opaque="false" readonly="false" size="14" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 4" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Output" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="HyperlinkError" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="List Item" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Line Printed Output" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="2D Input" background="[255,255,255]" bold="false" executable="true" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Maple Input Placeholder" background="[255,255,255]" bold="true" executable="true" family="Monospaced" foreground="[200,0,200]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="true"/>
<Font name="2D Math" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Error" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[255,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Warning" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Heading 1" background="[255,255,255]" bold="true" executable="false" family="Serif" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Annotation Text" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Title" background="[255,255,255]" bold="true" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="18" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Ordered List 2" background="[255,255,255]" bold="false" executable="false" family="Times New Roman" foreground="[0,0,0]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="false" placeholder="false"/>
<Font name="Hyperlink" background="[255,255,255]" bold="false" executable="false" family="Serif" foreground="[0,128,128]" italic="false" opaque="false" readonly="false" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Font name="HyperlinkWarning" background="[255,255,255]" bold="false" executable="false" family="Monospaced" foreground="[0,0,255]" italic="false" opaque="false" readonly="true" size="12" subscript="false" superscript="false" underline="true" placeholder="false"/>
<Layout name="Heading 4" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 5" alignment="left" bullet="ROMAN" firstindent="0" leftmargin="144" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Text Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="newline" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 1" alignment="left" bullet="numeric" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Bullet Item" alignment="left" bullet="dot" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Author" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="8" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Diagnostic" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 2" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="2" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 3" alignment="left" bullet="roman" firstindent="0" leftmargin="72" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Maple Plot" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Normal" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Annotation Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Dash Item" alignment="left" bullet="dash" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 3" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 4" alignment="left" bullet="ALPHABETIC" firstindent="0" leftmargin="108" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="Maple Output" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.3" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="HyperlinkError" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Line Printed Output" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="any" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="List Item" alignment="left" bullet="indent" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Error" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Warning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Heading 1" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="8" spacebelow="4" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Title" alignment="centred" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="12" spacebelow="12" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Layout name="Ordered List 2" alignment="left" bullet="alphabetic" firstindent="0" leftmargin="36" rightmargin="0" linespacing="0.0" spaceabove="3" spacebelow="3" linebreak="space" pagebreak-before="false" initial="-1" bulletsuffix=""/>
<Layout name="HyperlinkWarning" alignment="left" bullet="none" firstindent="0" leftmargin="0" rightmargin="0" linespacing="0.0" spaceabove="0" spacebelow="0" linebreak="space" pagebreak-before="false" initial="0" bulletsuffix=""/>
<Pencil-style name="Pencil 3" pen-color="[0,0,0]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 1" pen-color="[0,0,0]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 5" pen-color="[255,0,0]" pen-height="5.0" pen-width="5.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 2" pen-color="[0,0,255]" pen-height="1.0" pen-width="1.0" pen-opacity="1.0"/>
<Pencil-style name="Pencil 4" pen-color="[0,0,255]" pen-height="3.0" pen-width="3.0" pen-opacity="1.0"/>
<Highlighter-style name="Highlighter 2" pen-color="[255,204,0]" pen-height="14.0" pen-width="14.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 4" pen-color="[0,255,255]" pen-height="32.0" pen-width="32.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 3" pen-color="[51,255,0]" pen-height="24.0" pen-width="24.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 1" pen-color="[255,153,255]" pen-height="12.0" pen-width="8.0" pen-opacity="0.8"/>
<Highlighter-style name="Highlighter 5" pen-color="[255,255,0]" pen-height="48.0" pen-width="48.0" pen-opacity="0.8"/>
</Styles>
<Task-table>
    <Task-category name="&lt;default&gt;">
    </Task-category>
</Task-table>
<Annotation-table>
    <Annotation-category name="&lt;default&gt;">
    </Annotation-category>
</Annotation-table>
<Task>
</Task>
<Group labelreference="L4" drawlabel="true">
<Input>
<Text-field style="Title" layout="Title">Sparse Distributed Multivariate Polynomials for Maple</Text-field>
<Text-field style="Author" layout="Author">Roman Pearce, Michael Monagan</Text-field>
<Text-field style="Author" layout="Author">Simon Fraser University</Text-field>
<Text-field style="Author" layout="Author">June 2009</Text-field>
<Text-field style="Author" layout="Author"></Text-field>
</Input>
</Group>
<Group labelreference="L7" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">This library provides a data structure and fast arithmetic for sparse distributed multivariate polynomials.  It is under development at Simon Fraser University in Vancouver, Canada.</Text-field>
</Input>
</Group>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Setup</Text-field></Title>
<Group labelreference="L9" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Download the correct version of SDMP for your computer's architecture from http://www.cecm.sfu.ca/~rpearcea and decompress the files.  Modify one of the paths below to point to the directory where the files are stored and execute the commands in that section.</Text-field>
</Input>
</Group>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 2" layout="Heading 2">Windows (32-bit x86)</Text-field></Title>
<Text-field style="Text" layout="Normal">If you decompressed the files to a folder called sdmp on the desktop.  Change rpearcea to your username.</Text-field>
<Group labelreference="L89" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart; currentdir(&quot;C:/Documents and Settings/rpearce/Desktop/sdmp&quot;):
read &quot;sdmp.mpl&quot;:</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 2" layout="Heading 2">Macintosh (32-bit x86 or PowerPC)</Text-field></Title>
<Text-field style="Text" layout="Normal">If you decompressed the files to a directory named sdmp in your home directory.  Change rpearcea to your username.</Text-field>
<Group labelreference="L96" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart; currentdir(&quot;/Users/rpearce/sdmp&quot;):</Text-field>
</Input>
</Group>
<Group labelreference="L99" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">read &quot;sdmp.mpl&quot;:</Text-field>
</Input>
</Group>
</Section>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 2" layout="Heading 2">Linux (32/64-bit x86)</Text-field></Title>
<Text-field style="Text" layout="Normal">If you decompressed the files to a directory named sdmp in your home directory.  Change rpearcea to your username.</Text-field>
<Group labelreference="L102" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">restart; currentdir(&quot;/home/rpearce/sdmp&quot;):</Text-field>
</Input>
</Group>
<Group labelreference="L101" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">read &quot;sdmp.mpl&quot;:</Text-field>
</Input>
</Group>
</Section>
<Group labelreference="L86" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal">Execute the following statement to test whether the package is working:</Text-field>
</Input>
</Group>
<Group labelreference="L87" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">f := sdmp(x^3+x+1,plex(x));</Text-field>
</Input>
</Group>
<Group labelreference="L11" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Section>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Using SDMP with Maple Polynomials</Text-field></Title>
<Group labelreference="L110" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">The easiest way to try the SDMP package is to use the commands in the AutoPack submodule.  They will automatically convert Maple polynomials to the SDMP datatype, perform a computation, and convert the result back to a Maple polynomial.  Not all of the functionality of SDMP is available through the AutoPack module, but you can multiply and divide polynomials.  The AutoPack:-Multiply command is n-ary, and AutoPack:-Divide behaves exactly like Maple's divide command.</Text-field>
</Input>
</Group>
<Group labelreference="L108" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">f := randpoly([x,y,z],degree=30,terms=100):
g := randpoly([x,y,z],degree=30,terms=100):
h := randpoly([x,y,z],degree=30,terms=100):</Text-field>
</Input>
</Group>
<Group labelreference="L111" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">p := sdmp:-AutoPack:-Multiply(f,g,h):</Text-field>
</Input>
</Group>
<Group labelreference="L112" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">nops(p);</Text-field>
</Input>
</Group>
<Group labelreference="L109" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">sdmp:-AutoPack:-Divide(p,f,'q');</Text-field>
</Input>
</Group>
<Group labelreference="L113" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">nops(q);</Text-field>
</Input>
</Group>
<Group labelreference="L117" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">You can also do computations with coefficients in Zp for p &lt; kernelopts(maximmediate), which is 30 bits on a 32-bit machine or 62 bits on a 64 bit machine.</Text-field>
</Input>
</Group>
<Group labelreference="L116" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">char := characteristic=prevprime(kernelopts(maximmediate)): char;</Text-field>
</Input>
</Group>
<Group labelreference="L118" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">p1 := sdmp:-AutoPack:-Multiply(f,g,h,char):</Text-field>
</Input>
</Group>
<Group labelreference="L119" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">sdmp:-AutoPack:-Divide(p1, f, 'q', char);</Text-field>
</Input>
</Group>
<Group labelreference="L196" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Section>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Importing and Exporting Polynomials</Text-field></Title>
<Group labelreference="L15" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">To use all of the features of SDMP you will need to convert polynomials to its native data structure.  The commands sdmp:-Import and sdmp:-Export will import and export Maple polynomials.  As a shorthand, you can also call the sdmp module itself as if it were a function and it will determine whether to import or export.  To import polynomials you must order the variables with a monomial order.   The following monomial orders are supported:</Text-field>
<Text-field style="Text" layout="Normal">plex - pure lexicographic order</Text-field>
<Text-field style="Text" layout="Normal">grlex - graded lexicographic order</Text-field>
<Text-field style="Text" layout="Normal">tdeg - graded reverse lexicographic order</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L13" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">F := randpoly([x,y,z]);</Text-field>
</Input>
</Group>
<Group labelreference="L16" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">f := sdmp:-Import(F, plex(x,y,z));</Text-field>
</Input>
</Group>
<Group labelreference="L20" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">sdmp:-Export(f);</Text-field>
</Input>
</Group>
<Group labelreference="L26" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">You can also use the sdmp function for both importing and exporting.</Text-field>
</Input>
</Group>
<Group labelreference="L31" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">G := randpoly([x,y,z]);</Text-field>
</Input>
</Group>
<Group labelreference="L23" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">g := sdmp(G, plex(x,y,z));</Text-field>
</Input>
</Group>
<Group labelreference="L24" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">sdmp(g);</Text-field>
</Input>
</Group>
<Group labelreference="L19" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">There is very limited error checking at the moment, so please be careful about what polynomials you import :)</Text-field>
</Input>
</Group>
<Group labelreference="L148" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Section>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">SDMP Arithmetic</Text-field></Title>
<Text-field style="Text" layout="Normal">SDMP supports the following operations (including optional arguments):</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal"># addition (n-ary)</Text-field>
<Text-field style="Text" layout="Normal">sdmp:-Add(f, g, ..., characteristic=p);</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal"># multiplication (n-ary)</Text-field>
<Text-field style="Text" layout="Normal">sdmp:-Multiply(f, g, ..., characteristic=p);</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal"># exact division</Text-field>
<Text-field style="Text" layout="Normal">sdmp:-Divide(f, g, G, 's', 'q', characteristic=p);</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal"># quotient and remainder (presently disabled)</Text-field>
<Text-field style="Text" layout="Normal"># sdmp:-Quo(f, g, G, 's', 'r', characteristic=p);</Text-field>
<Text-field style="Text" layout="Normal"># sdmp:-Rem(f, g, G, 's', 'q', characteristic=p);</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal">f, g - sdmp polynomials</Text-field>
<Text-field style="Text" layout="Normal">G - list of sdmp polynomials (optional)</Text-field>
<Text-field style="Text" layout="Normal">'s' - assigned a common denominator (optional)</Text-field>
<Text-field style="Text" layout="Normal">'r', 'q' - assigned remainder or quotient (optional)</Text-field>
<Text-field style="Text" layout="Normal">characteristic=p  (optional)</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 2" layout="Heading 2">Example 1: Univariate Polynomials</Text-field></Title>
<Group labelreference="L130" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Given three univariate polynomials {f,g,h} we will perform some computations using Maple's builtin commands and SDMP:</Text-field>
</Input>
</Group>
<Group labelreference="L124" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">f := randpoly(x,degree=1000,terms=500): F := sdmp(f,plex(x));</Text-field>
</Input>
</Group>
<Group labelreference="L125" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">g := randpoly(x,degree=1000,terms=500): G := sdmp(g,plex(x));</Text-field>
</Input>
</Group>
<Group labelreference="L126" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">h := randpoly(x,degree=100,terms=50):   H := sdmp(h,plex(x));</Text-field>
</Input>
</Group>
<Group labelreference="L131" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Multiply out f*g and assign it to p.</Text-field>
</Input>
</Group>
<Group labelreference="L128" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">p := expand(f*g):  P := sdmp:-Multiply(F,G);</Text-field>
</Input>
</Group>
<Group labelreference="L135" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">Test whether g divides p exactly and if so, assign the quotient to q.  For SDMP polynomials (which can only have integer coefficients) the quotient is Q/s.</Text-field>
</Input>
</Group>
<Group labelreference="L132" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">divide(p,g,'q'); sdmp:-Divide(P,G,'s','Q'); Q;</Text-field>
</Input>
</Group>
<Group labelreference="L139" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">evalb(q = sdmp(Q)/s);</Text-field>
</Input>
</Group>
<Group labelreference="L138" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal"><Font bold="true">Note:</Font> quotient and remainder commands not available in this release.</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
<Text-field style="Text" layout="Normal">Compute the remainder of p divided by h and assign the quotient to q.  For SDMP polynomials the remainder is R/s and the quotient is Q/s.</Text-field>
</Input>
</Group>
<Group labelreference="L136" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># r := rem(p,h,x,'q'):</Text-field>
</Input>
</Group>
<Group labelreference="L197" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># R := sdmp:-Rem(P,H,'s','Q');</Text-field>
</Input>
</Group>
<Group labelreference="L137" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># evalb(r = sdmp(R)/s);</Text-field>
</Input>
</Group>
<Group labelreference="L140" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># evalb(q = sdmp(Q)/s);</Text-field>
</Input>
</Group>
<Group labelreference="L145" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">The common denominator s can be very large.</Text-field>
</Input>
</Group>
<Group labelreference="L134" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"># length(s);</Text-field>
</Input>
</Group>
<Group labelreference="L142" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Section>
</Section>
<Section collapsed="false" MultipleChoiceAnswerIndex="-1" MultipleChoiceRandomizeChoices="false" TrueFalseAnswerIndex="-1" EssayAnswerRows="5" EssayAnswerColumns="60"><Title>
<Text-field style="Heading 1" layout="Heading 1">Packing Exponents</Text-field></Title>
<Group labelreference="L55" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">For large computations it is useful to pack multiple exponents into each machine word.  This speeds up the computation and reduces the memory required to store the result.  For example, specifying pack=3 on a 32-bit machine will use 10 bits per exponent.  All of the polynomials in a computation must be packed in the same way.  Below we show a multiplication with packed and unpacked exponents.  The size of the result is cut in half.</Text-field>
<Text-field style="Text" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L53" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">f := sdmp(randpoly([x,y,z],degree=100,terms=3000), plex(x,y,z));</Text-field>
</Input>
</Group>
<Group labelreference="L56" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">p := sdmp:-Multiply(f,f,characteristic=32003);</Text-field>
</Input>
</Group>
<Group labelreference="L190" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">length(p)*kernelopts(wordsize)/8/1024.^2;  # size in MB</Text-field>
</Input>
</Group>
<Group labelreference="L57" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">f := sdmp(f, plex(x,y,z), pack=3);</Text-field>
</Input>
</Group>
<Group labelreference="L193" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">p := sdmp:-Multiply(f,f,characteristic=32003);</Text-field>
</Input>
</Group>
<Group labelreference="L192" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">length(p)*kernelopts(wordsize)/8/1024.^2;  # size in MB</Text-field>
</Input>
</Group>
<Group labelreference="L59" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
<Group labelreference="L195" drawlabel="true">
<Input>
<Text-field style="Text" layout="Normal">There is currently no bounds checking in SDMP so be careful not to overflow the exponents.  Below are the sizes of the monomials in various orders, not including one or more words for a coefficient:</Text-field>
<Text-field style="Text" layout="Normal">plex = (# variables) / pack</Text-field>
<Text-field style="Text" layout="Normal">grlex = (# variables + 1) / pack</Text-field>
<Text-field style="Text" layout="Normal">tdeg = (2*(# variables)-1) / pack</Text-field>
</Input>
</Group>
<Group labelreference="L200" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal"></Text-field>
</Input>
</Group>
</Section>
</Worksheet>
