Liu Xiaojun wrote:
> Hi,
>
> I'm trying to write an example page of skew polynomial for hyperdoc, and
> there are several questions:
>
> 1. How to construct an univariate skew polynomial domain with user defined
> 'sigma' and 'delta': for example:
> a. if 'sigma' is an ring automorphism *other than* identity map; or,
> b. if 'delta' is an inner derivation defined by using any fixed element
> of coefficient ring?
> I have no idea about both of them. Currently, for b, if I want to give a
> OREUP over R:=SQMATRIX(2, INT), with sigma := 1 and delta(r:R):R == y*r-r*y,
> where y : R is a fixed element, it says:
> >> System error:
> The function MAP is undefined.
>
> Here is the code:
>
> (1) -> )set expose add constructor SquareMatrix
> SquareMatrix is now explicitly exposed in frame frame0
> (1) -> R := SQMATRIX( 2 , INT )
>
> (1) SquareMatrix(2,Integer)
>
> Type: Domain
> (2) -> y :R := matrix[[1,0],[1,1]]
> +1 0+
> (2) | |
> +1 1+
>
> Type: SquareMatrix(2,Integer)
> (3) -> delta(r:R):R == y*r - r*y
> Function declaration delta : SquareMatrix(2,Integer) ->
> SquareMatrix(2,Integer) has been added to workspace.
>
> Type: Void
> (4) -> S := OREUP('x, R, 1, delta)
>
> >> System error:
> The function MAP is undefined.
>
> As I said, how to define S correctly ?
>
What you do is correct, the error is due to a bug (will be fixed
soon). As a workaround before defining S use the following
command:
)lisp (defmacro map (&rest args) `'(map ,@args))
> 2. I was able to construct OREUP over an univariate polynomial ring
> R:=UP('t, INT), with sigma:=1 and delta be the usual derivation d/dt, like
> this
>
> (1) -> R:= UP('t, INT)
>
> (1) UnivariatePolynomial(t,Integer)
>
> Type: Domain
> (2) -> W:= OREUP('x, R, 1, D)
>
> (2) UnivariateSkewPolynomial(x,UnivariatePolynomial(t,Integer),R ->
> R,theMap(DIFRING-;D;2S;1,723))
>
> Type: Domain
> (3) -> x: W := 'x
> (3) x
> (4) -> t: W:= 't
> (4) t
> (5) -> x*t
> (5) t x + 1
>
> Everything goes right. But HOW does the interpretor know that D is a
> derivation ? I just want to know the mechanism behind this code :-)
>
Interpreter does not know about derivation. All that interpreter knows
is that x and t is from OREUP('x, R, 1, D), so interpreter searches
OREUP('x, R, 1, D) for operation called '*' and uses it to compute
x*t. Now, one important thing is that all operations in FriCAS belong
to some domain (or package or category). When operation is called
it not only receives explicit arguments (that is x and t in your case)
but also one extra hidden argument specifying domain to which operation
belong. Thanks to this extra argument for parametrized domains
operation can access domian parameters. In your case this extra
argument is OREUP('x, R, 1, D), so operation has access to D.
Note: the code for '*' star does not really know what D is: D is
passed as a function (more precisely piece of code to comput its value)
and the code just blindly calls this function.
> 3. I'm using REGSET.ht as a templete to write my example page for OREUP. How
> to compile my .ht file so that I can see my page in hyperdoc system?
>
You need to do this in three steps:
1) Add page to database used by HyperDoc. For this change to
directory contaning ht.db file (this directory also contains .ht
and .pht files) -- relative to top of you installation this is
target/platform/share/hyperdoc/pages subdirectory
where platform is name of your platform (something like
x86_64-unknown-linux or i386-pc-mingw32). Next
rm ht.db # remove the old ht.db file.
/path/to/your/fricas/installation/target/platform/bin/htadd *.ht
Note: htadd program only add things to database. So, to avoid
keeping old entries (which may be wrong if you change a page)
we remove database first.
2) Generate the .pht file (this file contains output from examples).
To do this use command like:
(export AXIOM=/path/to/your/fricas/installation;
$AXIOM/bin/sman -noihere -paste file.ht)
3) Regenerate database adding freshly produced .pht file:
rm ht.db # remove the old ht.db file.
/path/to/your/fricas/installation/target/platform/bin/htadd *.ht *.pht
Note1: in the first step it is better to add only .ht pages to database.
In the thired step we add both .ht and .pht files (otherwise the examples
would be missing).
Note2: the second step also produces .input file. This file may be
safely deleted.
> 4. Can I write latex in .ht file?
>
In short no. .ht file is interpreted by hyperdoc program which implements
only limited number of TeX commands. We could add support for some
LaTeX features, but "full support" for LaTeX would require reimplementing
LaTeX which is a huge job.
> PS: There is another problem about the hyperdoc system:
> When I scroll mouse wheel on the example code, an xterm window comes out
> and the code is pasted into this window, which is good. But when I close
> xterm window, the whole fricas system quit, which is unexpected. How to quit
> xterm ONLY? (I'm using debian with xfce desktop environment, recently fricas
> svn running in an xfce-terminal.)
>
The terminal gives you command prompt which behaves like regular
FriCAS command prompt. To close the window just type:
)close
in the command prompt in the window you want to close (note,
if you type this to the main prompt you will loose the prompt but
the terminal would be still tied to FriCAS).
--
Waldek Hebisch
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---