[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] 20080229.01.tpd.patch (add additonial hyperdoc page tr
From: |
daly |
Subject: |
[Axiom-developer] 20080229.01.tpd.patch (add additonial hyperdoc page translations) |
Date: |
Sat, 1 Mar 2008 01:49:55 -0600 |
This patch extends the available firefox hyperdoc pages.
Tim
========================================================================
diff --git a/changelog b/changelog
index 78b70dc..52e3269 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,4 @@
+20080229 tpd src/hyper/bookvol11 add additional hyperdoc page translations
20080222 tpd src/Makefile move hyperdoc bitmaps location
20080222 tpd src/hyper/Makefile move hyperdoc bitmaps location
20080222 tpd src/hyper/bookvol11 add additional hyperdoc page translations
diff --git a/src/hyper/bookvol11.pamphlet b/src/hyper/bookvol11.pamphlet
index 1bfc01b..7afa4e8 100644
--- a/src/hyper/bookvol11.pamphlet
+++ b/src/hyper/bookvol11.pamphlet
@@ -232,7 +232,6 @@ all: ${PAGES}
@ ${TANGLE} -R"signatures.txt" bookvol11.pamphlet >signatures.txt
clean:
- @ rm -rf bitmaps
@ rm -f *.xhtml
@ rm -f rcm3720.input
@ rm -f signatures.txt
@@ -458,7 +457,6 @@ PAGES=rootpage.xhtml \
dbexpressioninteger.xhtml \
dbfractioninteger.xhtml \
dbfractionpolynomialinteger.xhtml \
- dbopbinary.xhtml \
dbopacos.xhtml \
dbopacosh.xhtml \
dbopacot.xhtml \
@@ -480,6 +478,7 @@ PAGES=rootpage.xhtml \
dbopbesselk.xhtml \
dbopbessely.xhtml \
dbopbeta.xhtml \
+ dbopbinary.xhtml \
dbopcardinalnumber.xhtml \
dbopcoefficient.xhtml \
dbopcoefficients.xhtml \
@@ -515,13 +514,14 @@ PAGES=rootpage.xhtml \
dbopdigits.xhtml \
dbopdimension.xhtml \
dbopdivide.xhtml \
+ dbopdivisors.xhtml \
dbopei.xhtml \
dbopeigenmatrix.xhtml \
dbopeigenvalues.xhtml \
dbopeigenvector.xhtml \
dbopeigenvectors.xhtml \
dbopelt.xhtml \
- dbopequalsign.xhtml \
+ dbopequal.xhtml \
dbopeulerphi.xhtml \
dbopeval.xhtml \
dbopevenq.xhtml \
@@ -624,7 +624,7 @@ PAGES=rootpage.xhtml \
dbopsetrowbang.xhtml \
dbopsetsubmatrixbang.xhtml \
dbopsign.xhtml \
- dbopsimplify.xhtml \
+ dbopsimplify.xhtml\
dbopsec.xhtml \
dbopsech.xhtml \
dbopseries.xhtml \
@@ -643,6 +643,7 @@ PAGES=rootpage.xhtml \
dbopsubmatrix.xhtml \
dbopsubmatrix.xhtml \
dbopsubmod.xhtml \
+ dbopsumofkthpowerdivisors.xhtml \
dboptan.xhtml \
dboptanh.xhtml \
dboptaylor.xhtml \
@@ -657,9 +658,9 @@ PAGES=rootpage.xhtml \
dbopvertconcat.xhtml \
dbopwholepart.xhtml \
dbopwholeragits.xhtml \
- dbopzeroq.xhtml \
dbopzeroof.xhtml \
dbopzerosof.xhtml \
+ dbopzeroq.xhtml \
dbpolynomialinteger.xhtml \
dbpolynomialfractioninteger.xhtml \
systemvariables.xhtml \
@@ -670,10 +671,9 @@ PAGES=rootpage.xhtml \
numberspage.xhtml \
numintegers.xhtml \
numgeneralinfo.xhtml \
- basicfunctions.xhtml \
- primesandfactorization.xhtml \
- somenumbertheoreticfunctions.xhtml \
- integernumbertheoryfunctions.xhtml \
+ numbasicfunctions.xhtml \
+ numintegerfractions.xhtml \
+ numnumbertheoreticfunctions.xhtml \
numfactorization.xhtml \
numfunctions.xhtml \
numexamples.xhtml \
@@ -3687,293 +3687,6 @@ abstract algebra
<<page foot>>
@
-\subsection{basicfunctions.xhtml}
-<<basicfunctions.xhtml>>=
-<<standard head>>
- <script type="text/javascript">
-<<handlefreevars>>
-<<axiom talker>>
- </script>
- </head>
- <body>
-<<page head>>
-The size of an integer in Axiom is only limited by the amount of
-computer storage you have available. The usual arithmetic operations
-are available.
-<ul>
- <li>
- <input type="submit" id="p1" class="subbut"
- onclick="makeRequest('p1');"
- value="2^(5678-4856+2*17)" />
- <div id="ansp1"><div></div></div>
- </li>
-</ul>
-There are a number of ways of working with the sign of an integer.
-Let's use this x as an example.
-<ul>
- <li>
- <input type="submit" id="p2" class="subbut"
- onclick="makeRequest('p2');"
- value="x:=-101" />
- <div id="ansp2"><div></div></div>
- </li>
-</ul>
-First of all, there is the absolute value function.
-<ul>
- <li>
- <input type="submit" id="p3" class="subbut"
- onclick="handleFree(['p2','p3']);"
- value="abs(x)" />
- <div id="ansp3"><div></div></div>
- </li>
-</ul>
-The <a href="dbopsign.xhtml">sign</a> operation returns -1 if its
-argument is negative, 0 if zero and 1 if positive.
-<ul>
- <li>
- <input type="submit" id="p4" class="subbut"
- onclick="handleFree(['p2','p4']);"
- value="sign(x)" />
- <div id="ansp4"><div></div></div>
- </li>
-</ul>
-You can determine if an integer is negative in several other ways.
-<ul>
- <li>
- <input type="submit" id="p5" class="subbut"
- onclick="handleFree(['p2','p5']);"
- value="x < 0" />
- <div id="ansp5"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p6" class="subbut"
- onclick="handleFree(['p2','p6']);"
- value="x <= -1" />
- <div id="ansp6"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p7" class="subbut"
- onclick="handleFree(['p2','p7']);"
- value="negative?(x)" />
- <div id="ansp7"><div></div></div>
- </li>
-</ul>
-Similarly, you can find out if it is positive.
-<ul>
- <li>
- <input type="submit" id="p8" class="subbut"
- onclick="handleFree(['p2','p8']);"
- value="x > 0" />
- <div id="ansp8"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p9" class="subbut"
- onclick="handleFree(['p2','p9']);"
- value="x >= 1" />
- <div id="ansp9"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p10" class="subbut"
- onclick="handleFree(['p2','p10']);"
- value="positive?(x)" />
- <div id="ansp10"><div></div></div>
- </li>
-</ul>
-This is the recommended way of determining whether an integer is zero.
-<ul>
- <li>
- <input type="submit" id="p11" class="subbut"
- onclick="handleFree(['p2','p11']);"
- value="zero?(x)" />
- <div id="ansp11"><div></div></div>
- </li>
-</ul>
-<hr/>
-Use the <a href="dbopzeroq.xhtml">zero?</a> operation whenever you are
-testing any mathematical object for equality with zero. This is usually
-more efficient than using <a href="dbopequalsign.xhtml">=</a> (think of
-matrices; it is easier to tell if a matrix is zero by just checking term
-by term than constructing another ``zero'' matrix and comparing the
-two matrices term by term) and also avoids the problem that
-<a href="dbopequalsign.xhtml">=</a> is usually used for creating equations.
-<hr/>
-This is the recommended way of determining whether an integer is
-equal to one.
-<ul>
- <li>
- <input type="submit" id="p12" class="subbut"
- onclick="handleFree(['p2','p12']);"
- value="one?(x)" />
- <div id="ansp12"><div></div></div>
- </li>
-</ul>
-This syntax is used to test equality using <a href="dbopequalsign.xhtml">=</a>.
-It says that you want a <a href="db.xhtml?Boolean">Boolean</a> (true or
-false) answer rather than an equation.
-<ul>
- <li>
- <input type="submit" id="p13" class="subbut"
- onclick="handleFree(['p2','p13']);"
- value="(x=-101)@Boolean" />
- <div id="ansp13"><div></div></div>
- </li>
-</ul>
-The operations <a href="dbopoddq.xhtml">odd?</a> and
-<a href="dbopevenq.xhtml">even?</a> determine whether an integer is odd
-or even, respectively. They each return a
-<a href="db.xhtml?Boolean">Boolean</a> object.
-<ul>
- <li>
- <input type="submit" id="p14" class="subbut"
- onclick="handleFree(['p2','p14']);"
- value="odd?(x)" />
- <div id="ansp14"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p15" class="subbut"
- onclick="handleFree(['p2','p15']);"
- value="even?(x)" />
- <div id="ansp15"><div></div></div>
- </li>
-</ul>
-The operation <a href="dbopgcd.xhtml">gcd</a> computes the greatest
-common divisor of two integers.
-<ul>
- <li>
- <input type="submit" id="p16" class="subbut"
- onclick="makeRequest('p16');"
- value="gcd(56788,43688)" />
- <div id="ansp16"><div></div></div>
- </li>
-</ul>
-The operation <a href="dboplcm.xhtml">lcm</a> computes their least
-common multiple.
-<ul>
- <li>
- <input type="submit" id="p17" class="subbut"
- onclick="makeRequest('p17');"
- value="lcm(56788,43688)" />
- <div id="ansp17"><div></div></div>
- </li>
-</ul>
-To determine the maximum of two integers, use <a href="dbopmax.xhtml">max</a>.
-<ul>
- <li>
- <input type="submit" id="p18" class="subbut"
- onclick="makeRequest('p18');"
- value="max(678,567)" />
- <div id="ansp18"><div></div></div>
- </li>
-</ul>
-To determine the minimum, use <a href="dbopmin.xhtml">min</a>.
-<ul>
- <li>
- <input type="submit" id="p19" class="subbut"
- onclick="makeRequest('p19');"
- value="min(678,567)" />
- <div id="ansp19"><div></div></div>
- </li>
-</ul>
-The <a href="dbopreduce.xhtml">reduce</a> operation is used to extend
-binary operations to more than two arguments. For example, you can use
-<a href="dbopreduce.xhtml">reduce</a> to find the maximum integer in a
-list or compute the least common multiple of all integers in the list.
-<ul>
- <li>
- <input type="submit" id="p20" class="subbut"
- onclick="makeRequest('p20');"
- value="reduce(max,[2,45,-89,78,100,-45])" />
- <div id="ansp20"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p21" class="subbut"
- onclick="makeRequest('p21');"
- value="reduce(min,[2,45,-89,78,100,-45])" />
- <div id="ansp21"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p22" class="subbut"
- onclick="makeRequest('p22');"
- value="reduce(gcd,[2,45,-89,78,100,-45])" />
- <div id="ansp22"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p23" class="subbut"
- onclick="makeRequest('p23');"
- value="reduce(lcm,[2,45,-89,78,100,-45])" />
- <div id="ansp23"><div></div></div>
- </li>
-</ul>
-The infix operator "/" is not used to compute the quotient of integers.
-Rather, it is used to create rational numbers as described in
-<a href="db.xhtml?Fraction">Fraction</a>.
-<ul>
- <li>
- <input type="submit" id="p24" class="subbut"
- onclick="makeRequest('p24');"
- value="13/4" />
- <div id="ansp24"><div></div></div>
- </li>
-</ul>
-The infix operation <a href="dbopquo.xhtml">quo</a> computes the integer
-quotient.
-<ul>
- <li>
- <input type="submit" id="p25" class="subbut"
- onclick="makeRequest('p25');"
- value="13 quo 4" />
- <div id="ansp25"><div></div></div>
- </li>
-</ul>
-The infix operation <a href="dboprem.xhtml">rem</a> computes the integer
-remainder.
-<ul>
- <li>
- <input type="submit" id="p26" class="subbut"
- onclick="makeRequest('p26');"
- value="13 rem 4" />
- <div id="ansp26"><div></div></div>
- </li>
-</ul>
-One integer is evenly divisible by another if the remainder is zero.
-The operation <a href="dbopexquo.xhtml">exquo</a> can also be used.
-See <a href="axbook/section-2.5.xhtml">Unions</a>. for an example.
-<ul>
- <li>
- <input type="submit" id="p27" class="subbut"
- onclick="makeRequest('p27');"
- value="zero?(167604736446952 rem 2003644)" />
- <div id="ansp27"><div></div></div>
- </li>
-</ul>
-The operation <a href="dbopdivide.xhtml">divide</a> returns a record of
-the quotient and remainder and thus is more efficient when both are needed.
-<ul>
- <li>
- <input type="submit" id="p28" class="subbut"
- onclick="makeRequest('p28');"
- value="d:=divide(13,4)" />
- <div id="ansp28"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p29" class="subbut"
- onclick="handleFree(['p28','p29']);"
- value="d.quotient" />
- <div id="ansp29"><div></div></div>
- </li>
-</ul>
-Records are discussed in detail in
-<a href="axbook/section-2.4.xhtml">Records</a>.
-<ul>
- <li>
- <input type="submit" id="p30" class="subbut"
- onclick="handleFree(['p28','p30']);"
- value="d.remainder" />
- <div id="ansp30"><div></div></div>
- </li>
-</ul>
-<<page foot>>
-@
\subsection{basiclimit.xhtml}
<<basiclimit.xhtml>>=
<<standard head>>
@@ -8736,6 +8449,16 @@ the operations will have extra ones added at some stage.
<<page foot>>
@
+\subsection{dbopdivisors.xhtml}
+<<dbopdivisors.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+ dbopdivisors not implemented
+<<page foot>>
+@
+
\subsection{dbopei.xhtml}
<<dbopei.xhtml>>=
<<standard head>>
@@ -8786,23 +8509,23 @@ the operations will have extra ones added at some stage.
<<page foot>>
@
-\subsection{dbopequalsign.xhtml}
-<<dbopequalsign.xhtml>>=
+\subsection{dbopelt.xhtml}
+<<dbopelt.xhtml>>=
<<standard head>>
</head>
<body>
<<page head>>
- dbopequalsign not implemented
+ dbopelt not implemented
<<page foot>>
@
-\subsection{dbopelt.xhtml}
-<<dbopelt.xhtml>>=
+\subsection{dbopequal.xhtml}
+<<dbopequal.xhtml>>=
<<standard head>>
</head>
<body>
<<page head>>
- dbopelt not implemented
+ dbopequal not implemented
<<page foot>>
@
@@ -9026,6 +8749,7 @@ the operations will have extra ones added at some stage.
<<page foot>>
@
+
\subsection{dbopjacobi.xhtml}
<<dbopjacobi.xhtml>>=
<<standard head>>
@@ -9076,6 +8800,7 @@ the operations will have extra ones added at some stage.
<<page foot>>
@
+
\subsection{dboplegendre.xhtml}
<<dboplegendre.xhtml>>=
<<standard head>>
@@ -9222,7 +8947,7 @@ the operations will have extra ones added at some stage.
</head>
<body>
<<page head>>
- dbopmoebiusmu not implemented
+ dbopmoebiusmu.xhtml not implemented
<<page foot>>
@
@@ -10006,6 +9731,16 @@ the operations will have extra ones added at some stage.
<<page foot>>
@
+\subsection{dbopsumofkthpowerdivisors.xhtml}
+<<dbopsumofkthpowerdivisors.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+ dbopsumofkthpowerdivisors.xhtml not implemented
+<<page foot>>
+@
+
\subsection{dboptan.xhtml}
<<dboptan.xhtml>>=
<<standard head>>
@@ -10116,33 +9851,33 @@ the operations will have extra ones added at some
stage.
<<page foot>>
@
-\subsection{dbopzeroq.xhtml}
-<<dbopzeroq.xhtml>>=
+\subsection{dbopzeroof.xhtml}
+<<dbopzeroof.xhtml>>=
<<standard head>>
</head>
<body>
<<page head>>
- dbopzeroq not implemented
+ dbopzeroof not implemented
<<page foot>>
@
-\subsection{dbopzeroof.xhtml}
-<<dbopzeroof.xhtml>>=
+\subsection{dbopzerosof.xhtml}
+<<dbopzerosof.xhtml>>=
<<standard head>>
</head>
<body>
<<page head>>
- dbopzeroof not implemented
+ dbopzerosof not implemented
<<page foot>>
@
-\subsection{dbopzerosof.xhtml}
-<<dbopzerosof.xhtml>>=
+\subsection{dbopzeroq.xhtml}
+<<dbopzeroq.xhtml>>=
<<standard head>>
</head>
<body>
<<page head>>
- dbopzerosof not implemented
+ dbopzeroq not implemented
<<page foot>>
@
@@ -34690,16 +34425,6 @@ lists of points in the plane.
<<page foot>>
@
-\subsection{integernumbertheoryfunctions.xhtml}
-<<integernumbertheoryfunctions.xhtml>>=
-<<standard head>>
- </head>
- <body>
-<<page head>>
-integernumbertheoryfunctions not implemented
-<<page foot>>
-@
-
%%J
\subsection{jenks.xhtml}
<<jenks.xhtml>>=
@@ -36154,6 +35879,295 @@ Enter search string (use <b>*</b> for wild card
unless counter-indicated):
@
%%N
+\subsection{numbasicfunctions.xhtml}
+<<numbasicfunctions.xhtml>>=
+<<standard head>>
+ <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+ </script>
+ </head>
+ <body>
+<<page head>>
+ <div align="center">Basic Functions</div>
+ <hr/>
+The size of an integer in Axiom is only limited by the amount of computer
+storage you have available. The usual arithmetic operations are available.
+<ul>
+ <li>
+ <input type="submit" id="p1" class="subbut"
+ onclick="makeRequest('p1');"
+ value="2^(5678-4856+2*17)" />
+ <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+There are a number of ways of working with the sign of an integer. Let's
+use the x as an example.
+<ul>
+ <li>
+ <input type="submit" id="p2" class="subbut"
+ onclick="makeRequest('p2');"
+ value="x:=-101" />
+ <div id="ansp2"><div></div></div>
+ </li>
+</ul>
+First of all, there is the absolute value function.
+<ul>
+ <li>
+ <input type="submit" id="p3" class="subbut"
+ onclick="handleFree(['p2','p3']);"
+ value="abs(x)" />
+ <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+The <a href="dbopsign.xhtml">sign</a> operation returns -1 if its argument
+is negative, 0 if zero and 1 if positive.
+<ul>
+ <li>
+ <input type="submit" id="p4" class="subbut"
+ onclick="handleFree(['p2','p4']);"
+ value="sign(x)" />
+ <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+You can determine if an integer is negative in several other ways.
+<ul>
+ <li>
+ <input type="submit" id="p5" class="subbut"
+ onclick="handleFree(['p2','p5']);"
+ value="x < 0" />
+ <div id="ansp5"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p6" class="subbut"
+ onclick="handleFree(['p2','p6']);"
+ value="x <= -1" />
+ <div id="ansp6"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p7" class="subbut"
+ onclick="handleFree(['p2','p7']);"
+ value="negative?(x)" />
+ <div id="ansp7"><div></div></div>
+ </li>
+</ul>
+Similarly, you can find out if it is positive.
+<ul>
+ <li>
+ <input type="submit" id="p8" class="subbut"
+ onclick="handleFree(['p2','p8']);"
+ value="x > 0" />
+ <div id="ansp8"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p9" class="subbut"
+ onclick="handleFree(['p2','p9']);"
+ value="x >= 1" />
+ <div id="ansp9"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p10" class="subbut"
+ onclick="handleFree(['p2','p10']);"
+ value="positive?(x)" />
+ <div id="ansp10"><div></div></div>
+ </li>
+</ul>
+This is the recommended way of determining whether an integer is zero.
+<ul>
+ <li>
+ <input type="submit" id="p11" class="subbut"
+ onclick="handleFree(['p1','p11']);"
+ value="zero?(x)" />
+ <div id="ansp11"><div></div></div>
+ </li>
+</ul>
+<hr/>
+Use the <a href="dbopzeroq.xhtml">zero?</a> whenever you are testing any
+mathematical object for equality with zero. This is usually more efficient
+than using <a href="dbopequal.xhtml">=</a> (think of matrices: it is easier
+to tell if a matrix is zero by just checking term by term than constructing
+another "zero" amtrix and comparing the two matrices term by term) and also
+avoids the problem that <a href="dbopequal.xhtml">=</a> is usually used
+for creating equations.
+<hr/>
+This is the recommended way of determining whether an integer is equal to one.
+<ul>
+ <li>
+ <input type="submit" id="p12" class="subbut"
+ onclick="handleFree(['p2','p12']);"
+ value="one?(x)" />
+ <div id="ansp12"><div></div></div>
+ </li>
+</ul>
+This syntax is used to test equality using <a href="dbopequal.xhtml">=</a>.
+It says that you want a <a href="db.xhtml?Boolean">Boolean</a> (true or false)
+answer rather than an equation.
+<ul>
+ <li>
+ <input type="submit" id="p13" class="subbut"
+ onclick="handleFree(['p2','p13']);"
+ value="(x=-101)@Boolean" />
+ <div id="ansp13"><div></div></div>
+ </li>
+</ul>
+The operations <a href="dbopoddq.xhtml">odd?</a> and
+<a href="dbopevenq.xhtml">even?</a> determine whether an integer is odd
+or even, respectively. They each return a
+<a href="db.xhtml?Boolean">Boolean</a>
+object.
+<ul>
+ <li>
+ <input type="submit" id="p14" class="subbut"
+ onclick="handleFree(['p2','p14']);"
+ value="odd?(x)" />
+ <div id="ansp14"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p15" class="subbut"
+ onclick="handleFree(['p2','p15']);"
+ value="even?(x)" />
+ <div id="ansp15"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopgcd.xhtml">gcd</a> computes the greatest common
+divisor of two integers.
+<ul>
+ <li>
+ <input type="submit" id="p16" class="subbut"
+ onclick="makeRequest('p16');"
+ value="gcd(56788,43688)" />
+ <div id="ansp16"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dboplcm.xhtml">lcm</a> computes their least common
+multiple.
+<ul>
+ <li>
+ <input type="submit" id="p17" class="subbut"
+ onclick="makeRequest('p17');"
+ value="lcm(56788,43688)" />
+ <div id="ansp17"><div></div></div>
+ </li>
+</ul>
+To determine the maximum of two integers, use <a href="dbopmax.xhtml">max</a>.
+<ul>
+ <li>
+ <input type="submit" id="p18" class="subbut"
+ onclick="makeRequest('p18');"
+ value="max(678,567)" />
+ <div id="ansp18"><div></div></div>
+ </li>
+</ul>
+To determine the minimum, use <a href="dbopmin.xhtml">min</a>.
+<ul>
+ <li>
+ <input type="submit" id="p20" class="subbut"
+ onclick="makeRequest('p20');"
+ value="min(678,567)" />
+ <div id="ansp20"><div></div></div>
+ </li>
+</ul>
+The <a href="dbopreduce.xhtml">reduce</a> operation is used to extend
+binary operations to more than two arguments. For example, you can use
+<a href="dbopreduce.xhtml">reduce</a> to find the maximum integer in a
+list or compute the least common multiple of all integers in a list.
+<ul>
+ <li>
+ <input type="submit" id="p21" class="subbut"
+ onclick="makeRequest('p21');"
+ value="reduce(max,[2,45,-89,78,100,-45])" />
+ <div id="ansp21"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p22" class="subbut"
+ onclick="makeRequest('p22');"
+ value="reduce(min,[2,45,-89,78,100,-45])" />
+ <div id="ansp22"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p23" class="subbut"
+ onclick="makeRequest('p23');"
+ value="reduce(gcd,[2,45,-89,78,100,-45])" />
+ <div id="ansp23"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p24" class="subbut"
+ onclick="makeRequest('p24');"
+ value="reduce(lcm,[2,45,-89,78,100,-45])" />
+ <div id="ansp24"><div></div></div>
+ </li>
+</ul>
+The infix operator "/" is not used to compute the quotient of integers.
+Rather , it is used to create rational numbers as described in
+<a href="numintegerfractions.xhtml">Fractions</a>.
+<ul>
+ <li>
+ <input type="submit" id="p25" class="subbut"
+ onclick="makeRequest('p25');"
+ value="13/4" />
+ <div id="ansp25"><div></div></div>
+ </li>
+</ul>
+The infix operator <a href="dbopquo.xhtml">quo</a> computes the integer
+quotient.
+<ul>
+ <li>
+ <input type="submit" id="p26" class="subbut"
+ onclick="makeRequest('p26');"
+ value="13 quo 4" />
+ <div id="ansp26"><div></div></div>
+ </li>
+</ul>
+The infix operation <a href="dboprem.xhtml">rem</a> computes the integer
+remainder.
+<ul>
+ <li>
+ <input type="submit" id="p27" class="subbut"
+ onclick="makeRequest('p27');"
+ value="13 rem 4" />
+ <div id="ansp27"><div></div></div>
+ </li>
+</ul>
+One integer is evenly divisible by another if the remainder is zero.
+The operation <a href="dbopexquo.xhtml">exquo</a> can also be used. See
+<a href="axbook/section-2.5.xhtml">Unions</a> for an example.
+<ul>
+ <li>
+ <input type="submit" id="p28" class="subbut"
+ onclick="makeRequest('p28');"
+ value="zero?(167604736446952 rem 2003644)" />
+ <div id="ansp28"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopdivide.xhtml">divide</a> returns a record of
+the quotient and remainder and thus is more efficient when both are needed.
+<ul>
+ <li>
+ <input type="submit" id="p29" class="subbut"
+ onclick="makeRequest('p29');"
+ value="d:=divide(13,4)" />
+ <div id="ansp29"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p30" class="subbut"
+ onclick="handleFree(['p29','p30']);"
+ value="d.quotient" />
+ <div id="ansp30"><div></div></div>
+ </li>
+</ul>
+Records are discussed in detail in
+<a href="axbook/section-2.4.xhtml">Records</a>.
+<ul>
+ <li>
+ <input type="submit" id="p31" class="subbut"
+ onclick="handleFree(['p29','p31']);"
+ value="d.remainder" />
+ <div id="ansp31"><div></div></div>
+ </li>
+</ul>
+<<page foot>>
+@
+
\subsection{numberspage.xhtml}
<<numberspage.xhtml>>=
<<standard head>>
@@ -36943,20 +36957,138 @@ is the expansion of the square root of 11.
\subsection{numexamples.xhtml}
<<numexamples.xhtml>>=
<<standard head>>
+ <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+ </script>
</head>
<body>
<<page head>>
- numexamples not implemented
+ <div align="center">Examples</div>
+ <hr/>
+One can show that if an integer of the form 2**k+1 is prime, then k
+must be a power of two.
+
+Pierre Fermat conjectured that every integer of the form 2**(2**n)+1
+is prime. Let's look for a counterexample. First define a function:
+<ul>
+ <li>
+ <input type="submit" id="p1" class="noresult"
+ onclick="makeRequest('p1');"
+ value="f(n:NNI):INT == 2^(2^n)+1" />
+ <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+Now try commands like:
+<ul>
+ <li>
+ <input type="submit" id="p2" class="subbut"
+ onclick="handleFree(['p1','p2']);"
+ value="factor f(1)" />
+ <div id="ansp2"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p3" class="subbut"
+ onclick="handleFree(['p1','p3']);"
+ value="factor f(2)" />
+ <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+until you find an integer of this form which is composite. You can also
+try the following command:
+<ul>
+ <li>
+ <input type="submit" id="p4" class="subbut"
+ onclick="handleFree(['p1','p4']);"
+ value="[factor f(n) for n in 1..6]" />
+ <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+Obviously, Fermat didn't have access to Axiom.
<<page foot>>
@
\subsection{numfactorization.xhtml}
<<numfactorization.xhtml>>=
<<standard head>>
+ <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+ </script>
</head>
<body>
<<page head>>
- numfactorization not implemented
+ <div align="center">Primes and Factorization</div>
+ <hr/>
+Use the operation <a href="dbopfactor.xhtml">factor</a> to factor integers.
+It returns an object of type <a href="db.xhtml?Factored(Integer)">
+Factored Integer</a>. See <a href="factored.xhtml">Factored</a> for a
+discussion of the manipulation of factored objects.
+<ul>
+ <li>
+ <input type="submit" id="p1" class="subbut"
+ onclick="makeRequest('p1');"
+ value="factor 102400" />
+ <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopprimeq.xhtml">prime?</a> returns true or false
+depending on whether its argument is a prime.
+<ul>
+ <li>
+ <input type="submit" id="p2" class="subbut"
+ onclick="makeRequest('p2');"
+ value="prime? 7" />
+ <div id="ansp2"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p3" class="subbut"
+ onclick="makeRequest('p3');"
+ value="prime? 8" />
+ <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopnextprime.xhtml">nextPrime</a> returns the
+least prime number greater than its argument.
+<ul>
+ <li>
+ <input type="submit" id="p4" class="subbut"
+ onclick="makeRequest('p4');"
+ value="nextPrime 100" />
+ <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopprevprime.xhtml">prevPrime</a> returns the
+greatest prime number less than its argument.
+<ul>
+ <li>
+ <input type="submit" id="p5" class="subbut"
+ onclick="makeRequest('p5');"
+ value="prevPrime 100" />
+ <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+To compute all primes between two integers (inclusively), use the
+operation <a href="dbopprimes.xhtml">primes</a>.
+<ul>
+ <li>
+ <input type="submit" id="p6" class="subbut"
+ onclick="makeRequest('p6');"
+ value="primes(100,175)" />
+ <div id="ansp6"><div></div></div>
+ </li>
+</ul>
+You might sometimes want to see the factorization of an integer
+when it is considered a Gaussian (that is, complex) integer. See
+<a href="dbcomplexcomplex.xhtml">Complex</a> for more details.
+<ul>
+ <li>
+ <input type="submit" id="p8" class="subbut"
+ onclick="makeRequest('p8');"
+ value="factor(2::Complex Integer)" />
+ <div id="ansp8"><div></div></div>
+ </li>
+</ul>
<<page foot>>
@
@@ -37151,10 +37283,281 @@ Additional Topics:
\subsection{numfunctions.xhtml}
<<numfunctions.xhtml>>=
<<standard head>>
+ <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+ </script>
</head>
<body>
<<page head>>
- numfunctions not implemented
+ <div align="center">Integer Number Theory Functions</div>
+ <hr/>
+The <a href="db.xhtml?IntegerNumberTheoryFunctions">
+IntegerNumberTheoryFunctions</a> package contains a variety of
+operations of interest to number theorists. Many of these operations
+deal with divisibility properties of integers (Recall that an integer
+a divides an integer b if there is an integer c such that b=a*c.)
+
+The operation <a href="dbopdivisors.xhtml">divisors</a> returns a list
+of the divisors of an integer
+<ul>
+ <li>
+ <input type="submit" id="p1" class="subbut"
+ onclick="makeRequest('p1');"
+ value="div144:=divisors(144)" />
+ <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+You can now compute the number of divisors of 144 and the sum of the
+divisors of 144 by counting and summing the elements of the list we
+just created.
+<ul>
+ <li>
+ <input type="submit" id="p2" class="subbut"
+ onclick="handleFree(['p1','p2']);"
+ value="#(div144)" />
+ <div id="ansp2"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p3" class="subbut"
+ onclick="handleFree(['p1','p3']);"
+ value="reduce(+,div144)" />
+ <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+Of course, you can compute the number of divisors of an integer n,
+usually denoted d(n), and the sum of the divisors of an integer n,
+usually denoted ς(n), without ever listing the divisors of n.
+
+In Axiom, you can simply call the operations
+<ul>
+ <li>
+ <input type="submit" id="p4" class="subbut"
+ onclick="makeRequest('p4');"
+ value="numberOfDivisors(144)" />
+ <div id="ansp4"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p5" class="subbut"
+ onclick="makeRequest('p5');"
+ value="sumOfDivisors(144)" />
+ <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+The key is that d(n) and ς(n) are "multiplicative functions".
+This means that when n and m are relatively prime, that is, when n and
+m have no factors in common, then d(nm)=d(n)d(m) and ς(nm)=
+ς(n)ς(m). Note that these functions are trivial to
+compute when n is a prime power and are computed for general n from
+the prime factorization of n. Other examples of multiplicative functions
+are ς_k(n), the sum of the k-th powers of the divisors of n and
+φ(n), the number of integers between 1 and n which are prime to n.
+The corresponding Axiom operations are called
+<a href="dbopsumofkthpowerdivisors.xhtml">sumOfKthPowerDivisors</a> and
+<a href="dbopeulerphi.xhtml">eulerPhi</a>.
+<ul>
+ <li>
+ <input type="submit" id="p6" class="subbut"
+ onclick="makeRequest('p6');"
+ value="sumOfKthPowerDivisors(144,2)" />
+ <div id="ansp6"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p7" class="subbut"
+ onclick="makeRequest('p7');"
+ value="eulerPhi(144)" />
+ <div id="ansp7"><div></div></div>
+ </li>
+</ul>
+
+An interesting function is called μ(n), the Moebius mu function,
+defined as
+<pre>
+ 0 if n has a repeated prime factor
+ (i.e. is divisible by a square)
+ μ(n)= 1 if n is 1
+ (-1)^k if n is the product of k distinct primes
+</pre>
+The corresponding Axiom operation is
+<ul>
+ <li>
+ <input type="submit" id="p8" class="subbut"
+ onclick="makeRequest('p8');"
+ value="moebiusMu(2*2*2)" />
+ <div id="ansp8"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p9" class="subbut"
+ onclick="makeRequest('p9');"
+ value="moebiusMu(1)" />
+ <div id="ansp9"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p10" class="subbut"
+ onclick="makeRequest('p10');"
+ value="moebiusMu(5*7*13)" />
+ <div id="ansp10"><div></div></div>
+ </li>
+</ul>
+This function occurs in the following theorem:
+<br/>
+<b>Theorem</b>(Moebius Inversion Formula):<br/>
+Let f(n) be a function on the positive integers and let F(n) be defined
+by F(n)=sum of f(n) over d | n where the sum is taken over the positive
+divisors of n. Then the values of f(n) can be recovered from the values
+of F(n):f(n) = sum of μF(n/d) over d|n, where the sum is taken
+over the positive divisors of n.
+
+When f(n)=1, the F(n)=d(n). Thus, if you sum μ(d)*d(n/d) over
+the positive divisors of d of n, you should always get 1.
+<ul>
+ <li>
+ <input type="submit" id="p11" class="noresult"
+ onclick="makeRequest('p11');"
+ value="f1(n)==reduce(+,[moebiusMu(d)*numberOfDivisors(quo(n,d)) for d in
divisors(n)])" />
+ <div id="ansp11"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p12" class="subbut"
+ onclick="handleFree(['p11','p12']);"
+ value="f1(200)" />
+ <div id="ansp12"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p13" class="subbut"
+ onclick="handleFree(['p11','p13']);"
+ value="f1(846)" />
+ <div id="ansp13"><div></div></div>
+ </li>
+</ul>
+Similarly, when f(n)=n, then F(n)=ς(n). Thus, if you sum
+μ(d)*ς(n/d) over the positive divisors d of n, you
+should always get n.
+<ul>
+ <li>
+ <input type="submit" id="p14" class="noresult"
+ onclick="makeRequest('p14');"
+ value="f2(n)==reduce(+,[moebiusMu(d)*sumOfDivisors(quo(n,d)) for d in
divisors(n)])" />
+ <div id="ansp14"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p15" class="subbut"
+ onclick="handleFree(['p14','p15']);"
+ value="f2(200)" />
+ <div id="ansp15"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p16" class="subbut"
+ onclick="handleFree(['p14','p16']);"
+ value="f2(846)" />
+ <div id="ansp16"><div></div></div>
+ </li>
+</ul>
+The Fibonacci numbers are defined by
+<pre>
+ F(1)=1
+ F(2)=1
+ F(n)=F(n-1)+F(n-2) for n=3,4,...
+</pre>
+The operation <a href="dbopfibonacci.xhtml">fibonacci</a> computes the
+nth Fibonacci number.
+<ul>
+ <li>
+ <input type="submit" id="p17" class="subbut"
+ onclick="makeRequest('p17');"
+ value="fibonacci(25)" />
+ <div id="ansp17"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p18" class="subbut"
+ onclick="makeRequest('p18');"
+ value="[fibonacci(n) for n in 1..15]" />
+ <div id="ansp18"><div></div></div>
+ </li>
+</ul>
+Fibonacci numbers can also be expressed as sums of binomial
+coefficients.
+<ul>
+ <li>
+ <input type="submit" id="p19" class="noresult"
+ onclick="makeRequest('p19');"
+ value="fib(n)==reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)])" />
+ <div id="ansp19"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p20" class="subbut"
+ onclick="handleFree(['p19','p20']);"
+ value="fib(25)" />
+ <div id="ansp20"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p21" class="subbut"
+ onclick="handleFree(['p19','p21']);"
+ value="[fib(n) for n in 1..15]" />
+ <div id="ansp21"><div></div></div>
+ </li>
+</ul>
+
+Quadratic symbols can be computed with the operations
+<a href="dboplegendre.xhtml">legendre</a> and
+<a href="dbopjacobi.xhtml">jacobi</a>. The Legendre symbol (a/p) is
+defined for integers a and p with p an odd prime number. By definition,
+<pre>
+ = -1 when a is not a square (mod p)
+ (a/p) = 0 when a is divisible by p
+ = +1 when a is a square (mod p)
+</pre>
+You compute (a/p) via the command legendre(a,p)
+<ul>
+ <li>
+ <input type="submit" id="p22" class="subbut"
+ onclick="makeRequest('p22');"
+ value="legendre(3,5)" />
+ <div id="ansp22"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p23" class="subbut"
+ onclick="makeRequest('p23');"
+ value="legendre(23,691)" />
+ <div id="ansp23"><div></div></div>
+ </li>
+</ul>
+
+The Jacobi symbol (a/n) is the usual extension of the Legendre symbol,
+where n is an arbitrary integer. The most important property of the
+Jacobi symbol is the following: if K is a quadratic field with
+discriminant d and quadratic character χ, the χ(n)=(d/n).
+Thus, you can use the Jacobi symbol to compute, say, the class numbers
+of imaginary quadratic fields from a standard class number formula. This
+function computes the class number of the imaginary quadratic field with
+discriminant d.
+<ul>
+ <li>
+ <input type="submit" id="p24" class="noresult"
+ onclick="makeRequest('p24');"
+ value="h(d)==quo(reduce(+,[jacobi(d,k) for k in
1..quo(-d,2)]),2-jacobi(d,2))" />
+ <div id="ansp24"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p25" class="subbut"
+ onclick="handleFree(['p24','p25']);"
+ value="h(-163)" />
+ <div id="ansp25"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p26" class="subbut"
+ onclick="handleFree(['p24','p26']);"
+ value="h(-499)" />
+ <div id="ansp26"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p27" class="subbut"
+ onclick="handleFree(['p24','p27']);"
+ value="h(-1832)" />
+ <div id="ansp27"><div></div></div>
+ </li>
+</ul>
+
<<page foot>>
@
@@ -37164,37 +37567,36 @@ Additional Topics:
</head>
<body>
<<page head>>
-Axiom provides many operations for manipulating arbitrary precision
-integers. In this section we will show some of those that come from
-<a href="db.xhtml?Integer">Integer</a> itself plus some that are
-implemented in other packages. More examples of using integers are in
-the following sections:
-More examples of expansions are available in
-<a href="integernumbertheoryfunctions.xhtml">IntegerNumberTheoryFunctions</a>,
+ <div align="center">General Integer Information</div>
+ <hr/>
+Axiom provides many operations for manipulating arbitrary precision integers.
+In this section we will show some of those that come from
+<a href="db.html?Integer">Integer</a> itself plus some that are implemented
+in other packages. More examples of integers are in the following sections:
+<a href="axbook/section-1.4.xhtml">Numbers</a>.
+<a href="numfunctions.xhtml">IntegerNumberTheoryFunctions</a>,
<a href="numrepeatingdecimals.xhtml">DecimalExpansion</a>,
<a href="numrepeatingbinaryexpansions.xhtml">BinaryExpansion</a>,
<a href="numrepeatinghexexpansions.xhtml">HexadecimalExpansion</a>, and
-<a href="db.xhtml?RadixExpansion">RadixExpansion</a>.
+<a href="numotherbases.xhtml">RadixExpansion</a>
<ul>
- <li>
- <a href="basicfunctions.xhtml">
- Basic Functions
- </a>
- </li>
- <li>
- <a href="primesandfactorization.xhtml">
- Primes and Factorization
- </a>
- </li>
- <li>
- <a href="somenumbertheoreticfunctions.xhtml">
- Some Number Theoretic Functions
- </a>
- </li>
+ <li> <a href="numbasicfunctions.xhtml">Basic Functions</a></li>
+ <li> <a href="numnumbertheoreticfunctions.xhtml">
+ Some Number Theoretic Functions</a></li>
</ul>
<<page foot>>
@
+\subsection{numintegerfractions.xhtml}
+<<numintegerfractions.xhtml>>=
+<<standard head>>
+ </head>
+ <body>
+<<page head>>
+ numintegerfractions not implemented
+<<page foot>>
+@
+
\subsection{numintegers.xhtml}
<<numintegers.xhtml>>=
<<standard head>>
@@ -37278,7 +37680,7 @@ Additional topics
</tr>
<tr>
<td>
- <a href="numexamples.xhtml">Functions</a>
+ <a href="numexamples.xhtml">Examples</a>
</td>
<td>
Examples from number theory
@@ -37579,6 +37981,114 @@ To see other operations use the system command
<<page foot>>
@
+\subsection{numnumbertheoreticfunctions.xhtml}
+<<numnumbertheoreticfunctions.xhtml>>=
+<<standard head>>
+ <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+ </script>
+ </head>
+ <body>
+<<page head>>
+ <div align="center">Some Number Theoretic Functions</div>
+ <hr/>
+Axiom provides several number theoretic operations for integers.
+More examples are in
+<a href="numfunctions.xhtml">IntegerNumberTheoryFunctions</a>,
+
+The operation <a href="dbopfibonacci.xhtml">fibonacci</a> computes the
+Fibonacci numbers. The algorithm has a running time O(log(n)**3) for
+argument n.
+<ul>
+ <li>
+ <input type="submit" id="p1" class="subbut"
+ onclick="makeRequest('p1');"
+ value="[fibonacci(k) for k in 0..]" />
+ <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dboplegendre.xhtml">legendre</a> computes the
+Legendre symbol for its two integer arguments where the second one is
+prime. If you know the second argument to be prime, use
+<a href="dbopjacobi.xhtml">jacobi</a> instead where no check is made.
+<ul>
+ <li>
+ <input type="submit" id="p2" class="subbut"
+ onclick="makeRequest('p2');"
+ value="[legendre(i,11) for i in 0..10]" />
+ <div id="ansp2"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopjacobi.xhtml">jacobi</a> computes the Jacobi symbol
+for its two integer arguments. By convention, 0 is returned if the greatest
+common divisor of the numerator and denominator is not 1.
+<ul>
+ <li>
+ <input type="submit" id="p3" class="subbut"
+ onclick="makeRequest('p3');"
+ value="[jacobi(i,15) for i in 0..9]" />
+ <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopeulerphi.xhtml">eulerPhi</a> compute the values
+of Euler's φ-function where φ(n) equals the number of
+positive integers less than or equal to n that are relatively prime to the
+positive integer n.
+<ul>
+ <li>
+ <input type="submit" id="p4" class="subbut"
+ onclick="makeRequest('p4');"
+ value="[eulerPhi i for i in 1..]" />
+ <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+The operation <a href="dbopmoebiusmu.xhtml">moebiusMu</a> computes the
+Moebius μ function.
+<ul>
+ <li>
+ <input type="submit" id="p5" class="subbut"
+ onclick="makeRequest('p5');"
+ value="[moebiusMu i for i in 1..]" />
+ <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+Although they have somewhat limited utility, Axiom provides Roman numerals.
+<ul>
+ <li>
+ <input type="submit" id="p6" class="subbut"
+ onclick="makeRequest('p6');"
+ value="a:=roman(78)" />
+ <div id="ansp6"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p7" class="subbut"
+ onclick="makeRequest('p7');"
+ value="b:=roman(87)" />
+ <div id="ansp7"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p8" class="subbut"
+ onclick="handleFree(['p6','p7','p8']);"
+ value="a+b" />
+ <div id="ansp8"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p9" class="subbut"
+ onclick="handleFree(['p6','p7','p9']);"
+ value="a*b" />
+ <div id="ansp9"><div></div></div>
+ </li>
+ <li>
+ <input type="submit" id="p10" class="subbut"
+ onclick="handleFree(['p6','p7','p10']);"
+ value="b rem a" />
+ <div id="ansp10"><div></div></div>
+ </li>
+</ul>
+<<page foot>>
+@
+
\subsection{numnumericfunctions.xhtml}
<<numnumericfunctions.xhtml>>=
<<standard head>>
@@ -38092,7 +38602,7 @@ Issue the system command
</li>
</ul>
to display the full list of operations defined by
-<a href="db.xhtml"?RadixExpansion>RadixExpansion</a>. More examples of
+<a href="db.xhtml?RadixExpansion">RadixExpansion</a>. More examples of
expansions are available in
<a href="numrepeatingdecimals.xhtml">DecimalExpansion</a>,
<a href="numrepeatingbinaryexpansions.xhtml">BinaryExpansion</a>, and
@@ -38274,10 +38784,135 @@ to display the full list of operations defined by
\subsection{numproblems.xhtml}
<<numproblems.xhtml>>=
<<standard head>>
+ <script type="text/javascript">
+<<handlefreevars>>
+<<axiom talker>>
+ </script>
</head>
<body>
<<page head>>
- numproblems not implemented
+ <div align="center">Problems</div>
+ <hr/>
+One can show that if an integer of the form 2**k-1 is prime then
+k must be prime.
+<br/>
+<b>Proof</b>
+Suppose that k=m*n is a non-trivial factorization. Then
+<pre>
+ 2^m = 1 (mod (2^m-1))
+ 2^(m*n) = 1 (mod (2^m-1))
+ so 2^m-1 is a non-trivial factor of 2^k-1
+</pre>
+
+<b>Problem</b> Find the smallest prime p such that 2**p-1 is not prime
+<br/>
+<b>Answer</b>
+<br/>
+First, define a function:
+<ul>
+ <li>
+ <input type="submit" id="p1" class="noresult"
+ onclick="makeRequest('p1');"
+ value="f(n:NNI):INT == 2^n-1" />
+ <div id="ansp1"><div></div></div>
+ </li>
+</ul>
+You can try factoring f(p) as p ranges through the set of primes.
+For example,
+<ul>
+ <li>
+ <input type="submit" id="p2" class="subbut"
+ onclick="handleFree(['p1','p2']);"
+ value="factor f(7)" />
+ <div id="ansp2"><div></div></div>
+ </li>
+</ul>
+This gets tedious after a while, so let's use Axiom's stream facility.
+A streamm is essentially an infinite sequence. First, we create a stream
+consisting of the positive integers:
+<ul>
+ <li>
+ <input type="submit" id="p3" class="subbut"
+ onclick="makeRequest('p3');"
+ value="ints:=[n for n in 1..]" />
+ <div id="ansp3"><div></div></div>
+ </li>
+</ul>
+Now, we create a stream consisting of the primes:
+<ul>
+ <li>
+ <input type="submit" id="p4" class="subbut"
+ onclick="handleFree(['p2','p4']);"
+ value="primes:=[x for x in ints | prime? x]" />
+ <div id="ansp4"><div></div></div>
+ </li>
+</ul>
+Here is the 25th prime:
+<ul>
+ <li>
+ <input type="submit" id="p5" class="subbut"
+ onclick="handleFree(['p2','p5']);"
+ value="primes.25" />
+ <div id="ansp5"><div></div></div>
+ </li>
+</ul>
+Next, create the stream of numbers of the form 2**p-1 with p prime:
+<ul>
+ <li>
+ <input type="submit" id="p6" class="subbut"
+ onclick="handleFree(['p1','p2','p3','p4','p6']);"
+ value="numbers:=[f(n) for n in primes]" />
+ <div id="ansp6"><div></div></div>
+ </li>
+</ul>
+Finally, form the stream of factorizations of the elements of numbers:
+<ul>
+ <li>
+ <input type="submit" id="p7" class="subbut"
+ onclick="handleFree(['p1','p2','p3','p4','p6','p7']);"
+ value="factors:=[factor n for n in numbers]" />
+ <div id="ansp7"><div></div></div>
+ </li>
+</ul>
+You can see that the fifth number in the stream (2047=23*89) is the first
+one that has a non-trivial factorization. Since 2**11=2048, the solution
+to the problem is 11.
+
+Here is another way to see that 2047 is the first number in the stream
+that is composite:
+<ul>
+ <li>
+ <input type="submit" id="p8" class="subbut"
+ onclick="handleFree(['p3','p4','p6','p8']);"
+ value="nums:=[x for x in numbers | not prime? x]" />
+ <div id="ansp8"><div></div></div>
+ </li>
+</ul>
+<br/><br/>
+<b>Problem</b>: Find the smallest positive integer n such that
+n**2-n+41 is not prime.
+<br/>
+<b>Answer</b>: When n=41, n**2-n+41=41**2, which certainly isn't prime.
+Is there any smaller integer that works? Here are the first 40 values:
+<ul>
+ <li>
+ <input type="submit" id="p9" class="subbut"
+ onclick="makeRequest('p9');"
+ value="numbs:=[n**2-n+41 for n in 0..40]" />
+ <div id="ansp9"><div></div></div>
+ </li>
+</ul>
+Now have Axiom factor the numbers on this list:
+<ul>
+ <li>
+ <input type="submit" id="p10" class="subbut"
+ onclick="handleFree(['p9','p10']);"
+ value="[factor n for n in numbs]" />
+ <div id="ansp10"><div></div></div>
+ </li>
+</ul>
+You can see that 41 is the smallest positive integer n such that
+n**2-n+41 is not prime.
<<page foot>>
@
@@ -38430,6 +39065,8 @@ to display the full list of operations defined by
</head>
<body>
<<page head>>
+ <div align="center">Quotient Fields</div>
+ <hr/>
The <a href="db.xhtml?Fraction">Fraction</a> domain implements quotients.
The elements must belong to a domain of category
<a href="db.xhtml?IntegralDomain">IntegralDomain</a>: multiplication
@@ -38579,6 +39216,8 @@ Conversion is discussed in detail in
</head>
<body>
<<page head>>
+ <div align="center">Rational Numbers</div>
+ <hr/>
Like integers, rational numbers can be arbitrarily large. For example:
<ul>
<li>
@@ -42119,88 +42758,6 @@ You can also substitute numerical values for some or
all of the variables.
<<page foot>>
@
-\subsection{primesandfactorization.xhtml}
-<<primesandfactorization.xhtml>>=
-<<standard head>>
- <script type="text/javascript">
-<<handlefreevars>>
-<<axiom talker>>
- </script>
- </head>
- <body>
-<<page head>>
-Use the operation <a href="dbopfactor.xhtml">factor</a> to factor integers.
-It returns an object of type <a href="db.xhtml?Factored(Integer)">
-Factored Integer</a>. See <a href="factored.xhtml">Factored</a> for a
-discussion of the manipulation of factored objects.
-<ul>
- <li>
- <input type="submit" id="p1" class="subbut"
- onclick="makeRequest('p1');"
- value="factor 102400" />
- <div id="ansp1"><div></div></div>
- </li>
-</ul>
-The operation <a href="dbopprimeq.xhtml">prime?</a> returns true or false
-depending on whether its argument is a prime.
-<ul>
- <li>
- <input type="submit" id="p2" class="subbut"
- onclick="makeRequest('p2');"
- value="prime? 7" />
- <div id="ansp2"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p3" class="subbut"
- onclick="makeRequest('p3');"
- value="prime? 8" />
- <div id="ansp3"><div></div></div>
- </li>
-</ul>
-The operation <a href="dbopnextprime.xhtml">nextPrime</a> returns the
-least prime greater than its argument.
-<ul>
- <li>
- <input type="submit" id="p4" class="subbut"
- onclick="makeRequest('p4');"
- value="nextPrime 100" />
- <div id="ansp4"><div></div></div>
- </li>
-</ul>
-The operation <a href="dbopprevprime.xhtml">prevPrime</a> returns the
-greatest prime less than its argument
-<ul>
- <li>
- <input type="submit" id="p5" class="subbut"
- onclick="makeRequest('p5');"
- value="prevPrime 100" />
- <div id="ansp5"><div></div></div>
- </li>
-</ul>
-To compute all primes between two integers (inclusively), use the
-operation <a href="dbopprimes.xhtml">primes</a>.
-<ul>
- <li>
- <input type="submit" id="p6" class="subbut"
- onclick="makeRequest('p6');"
- value="primes(100,175)" />
- <div id="ansp6"><div></div></div>
- </li>
-</ul>
-You might sometimes want to see the factorization of an integer when it is
-considered a Gaussian integer. See <a href="db.xhtml?Complex">Complex</a>
-for more details.
-<ul>
- <li>
- <input type="submit" id="p7" class="subbut"
- onclick="makeRequest('p7');"
- value="factor(2::Complex Integer)" />
- <div id="ansp7"><div></div></div>
- </li>
-</ul>
-
-<<page foot>>
-@
\subsection{puiseuxseries.xhtml}
<<puiseuxseries.xhtml>>=
@@ -43096,103 +43653,6 @@ Enter the size of the matrix:
@
-\subsection{somenumbertheoreticfunctions.xhtml}
-<<somenumbertheoreticfunctions.xhtml>>=
-<<standard head>>
- <script type="text/javascript">
-<<handlefreevars>>
-<<axiom talker>>
- </script>
- </head>
- <body>
-<<page head>>
-Axiom provides several number theoretic operations for integers.
-More examples are in <a href="integernumbertheoryfunctions.xhtml">
-IntegerNumberTheoryFunctions</a>.
-
-The operation <a href="dbopfibonacci.xhtml">fibonacci</a> computes the
-Fibonacci numbers. The algorithm has running time O(log(n)^3) for
-argument n.
-<ul>
- <li>
- <input type="submit" id="p1" class="subbut"
- onclick="makeRequest('p1');"
- value="[fibonacci(i) for i in 0..]" />
- <div id="ansp1"><div></div></div>
- </li>
-</ul>
-The operation <a href="dboplegendre.xhtml">legendre</a> computes the
-Legendre symbol for its two integer arguments where the second one is prime.
-If you know the second argument to be prime, use
-<a href="dbopjacobi.xhtml">jacobi</a> instead where no check is made.
-<ul>
- <li>
- <input type="submit" id="p2" class="subbut"
- onclick="makeRequest('p2');"
- value="[legendre(i,11) for i in 0..10]" />
- <div id="ansp2"><div></div></div>
- </li>
-</ul>
-The operation <a href="dbopjacobi.xhtml">jacobi</a> computes the Jacobi
-symbol for its two integer arguments. By convention, 0 is returned if
-the greatest common divisor of the numerator and denominator is not 1.
-<ul>
- <li>
- <input type="submit" id="p3" class="subbut"
- onclick="makeRequest('p3');"
- value="[jacobi(i,15) for i in 0..9]" />
- <div id="ansp3"><div></div></div>
- </li>
-</ul>
-The operation <a href="dbopeulerphi.xhtml">eulerPhi</a> computes the
-values of Euler's phi function where phi(n) equals the number of positive
-integers less than or equal to n that are relatively prime to the positive
-integer n.
-<ul>
- <li>
- <input type="submit" id="p4" class="subbut"
- onclick="makeRequest('p4');"
- value="[eulerPhi i for i in 1..]" />
- <div id="ansp4"><div></div></div>
- </li>
-</ul>
-The operation <a href="dbopmoebiusmu.xhtml">moebiusMu</a>
-computes the Moebius mu function.
-<ul>
- <li>
- <input type="submit" id="p5" class="subbut"
- onclick="makeRequest('p5');"
- value="[moebiusMu i for i in 1..]" />
- <div id="ansp5"><div></div></div>
- </li>
-</ul>
-The Ei function computes the <a href="dbopei.xhtml">Exponential Integral</a>.
-<ul>
- <li>
- <input type="submit" id="p6" class="subbut"
- onclick="makeRequest('p6');"
- value="[Ei(x/10.0) for x in 1..10]" />
- <div id="ansp6"><div></div></div>
- </li>
-</ul>
-Although they have somewhat limited utility, Axiom provides Roman numerals.
-<ul>
- <li>
- <input type="submit" id="p7" class="subbut"
- onclick="makeRequest('p7');"
- value="a:=roman(78)" />
- <div id="ansp7"><div></div></div>
- </li>
- <li>
- <input type="submit" id="p8" class="subbut"
- onclick="makeRequest('p8');"
- value="b:=roman(87)" />
- <div id="ansp8"><div></div></div>
- </li>
-</ul>
-<<page foot>>
-@
-
\subsection{summation.xhtml}
<<summation.xhtml>>=
<<standard head>>
@@ -43962,5 +44422,3 @@ static char axiom_bits[] = {
\bibitem{1} nothing
\end{thebibliography}
\end{document}
-
-
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Axiom-developer] 20080229.01.tpd.patch (add additonial hyperdoc page translations),
daly <=