The computer algebra system
asir
can use servers, which support the OpenXM
protocols
(Open message eXchange for Mathematics, http://www.openxm.org),
as components.
The interface functions to call these servers
are loaded by loading the file `OpenXM/rc/asirrc'.
This file is automatically loaded in "Risa/Asir(OpenXM distribution)",
which we call OpenXM/Risa/Asir
in this document.
This document explains these interface functions for asir
and several mathematical and utility functions
written in the user languages of Risa/Asir.
These mathematical and utilitiy functions are outcome
of the Asir-contrib project.
As to technical details on the OpenXM
protocols,
see `openxm-en.tex' at
`$(OpenXM_HOME)/doc/OpenXM-specs'.
Enjoy mathematics on your computer.
List of contributors:
See OpenXM/Copyright
for the copyright notice.
With loading `OpenXM/rc/asirrc', we can use most functions
in Asir/Contrib.
The OpenXM/Risa/Asir reads this file, which is specified by
the ASIR_CONFIG
environmental variable, when it starts.
The file `names.rr' is the top level file of the Asir/Contrib.
Most other files are loaded from `names.rr'.
Some packages are not loaded from `names.rr' and they must be
loaded individually.
A sample of `asirrc' to use Asir/Contrib.
load("gr")$ load("primdec")$ load("katsura")$ load("bfct")$ load("names.rr")$ load("oxrfc103.rr")$ User_asirrc=which(getenv("HOME")+"/.asirrc")$ if (type(User_asirrc)!=0) { if (!ctrl("quiet_mode")) print("Loading ~/.asirrc")$ load(User_asirrc)$ }else{ }$ end$
Not yet written.
Not yet written.
A part of Asir-contrib works on Windows. The following functions and components work on windows; the outer component sm1 and functions in asir-contrib which do not call outer components. In the cygwin environement, the outer components sm1, phc work. The other outer components do not work.
The following functions do not work on Windows. Some of them work in the cygwin environment of Windows.
gnuplot.*
om.*
mathematica.*
phc.*
print_dvi_form
print_gif_form
print_open_math_xml_form
print_png_form
print_xdvi_form
print_xv_form
tigers_xv_form
base_cancel
Example:
base_cancel([(x-1)/(x^2-1), (x-1)/(x^3-1)]);
base_choose
Example:
base_choose([1,2,3],2);
base_flatten
Example:
base_flatten([[1,2,3],4]);
base_intersection
Example:
base_intersection([1,2,3],[2,3,5,[6,5]]);
base_memberq
Example:
base_memberq(2,[1,2,3]);
base_permutation
Example:
base_permutation([1,2,3,4]);
base_position
Example:
base_position("cat",["dog","cat","monkey"]);
base_prune
Example:
base_prune("cat",["dog","cat","monkey"]);
base_replace
Example:
base_replace(x^2+y^2,[[x,a+1],[y,b]]);
x is replaced by a+1 and y is replaced by b in x^2+y^2.
base_set_minus
Example:
base_set_minus([1,2,3],[3,4,5]);
base_set_union
Example:
base_set_union([1,2,3],[3,4,5]);
base_subsetq
Example:
base_subsetq([1,2],[1,2,3,4,5]);
base_subsets_of_size
Example:
base_subsets_of_size(2,[3,5,3,2]);
number_abs
Example:
number_abs(-3);@end example
number_ceiling
Example:
number_abs(1.5);@end example
number_factor
Example:
number_factor(20);@end example
number_floor
Example:
number_floor(1.5);@end example
number_imaginary_part
Example:
number_imaginary_part(1+2*@i);@end example
number_is_integer
Example:
number_is_integer(2/3);@end example
number_real_part
Example:
number_real_part(1+2*@i);@end exampleCalculus (Standard Mathematical Functions)
Series (Standard Mathematical Functions)
Special Functions (Standard Mathematical Functions)
Not yet written
Matrix (Standard Mathematical Functions)
matrix_clone
Example:
matrix_clone(matrix_list_to_matrix([[1,1],[0,1]]));
matrix_det
Example:
poly_factor(matrix_det([[1,x,x^2],[1,y,y^2],[1,z,z^2]]));
matrix_diagonal_matrix
Example:
matrix_diagonal_matrix([1,2,3]);
References:
matrix_list_to_matrix
matrix_eigenavalues
Example:
matrix_eigenvalues([[x,1],[0,y]]);
matrix_identity_matrix
Example:
matrix_identity_matrix(5);
References:
matrix_diagonal_matrix
matrix_image
Example:
matrix_image([[1,2,3],[2,4,6],[1,0,0]]);
References:
matrix_kernel
matrix_inner_product
Example:
matrix_inner_product([1,2],[x,y]);
matrix_inverse
Example:
matrix_inverse([[1,2],[0,1]]);
matrix_kernel
Example:
matrix_kernel([[1,1,1,1],[0,1,3,4]]);
matrix_list_to_matrix
Example:
print_xdvi_form(matrix_list_to_matrix([[1,1],[0,2]]));
References:
matrix_matrix_to_list
matrix_matrix_to_list
References:
matrix_list_to_matrix
matrix_rank
Example:
matrix_rank([[1,1,1,1],[0,1,3,4]]);
matrix_solve_linear
Example:
matrix_solve_linear([[1,2],[0,1]],[x,y],[1,2]);
matrix_submatrix
Example:
matrix_submatrix([[0,1],[2,3],[4,5]],[1,2]);
matrix_transpose
References:
matrix_list_to_matrix
Not yet written.
print_dvi_form
Example:
print_dvi_form(x^2-1);
References:
print_xdvi_form
,print_tex_form
print_em
Example:
print_em(x^2-1);
print_gif_form
Example:
print_gif_form(newmat(2,2,[[x^2,x],[y^2-1,x/(x-1)]]));
References:
print_tex_form
print_input_form
Example:
print_input_form(quote(x^3-1));
print_open_math_tfb_form
Description:
It is experimental. You need to load taka_print_tfb.rr to call it.
Example:
print_open_math_tfb_form(quote(f(x,1/(y+1))+2));
print_open_math_xml_form
Example:
print_open_math_xml_form(x^3-1);
References:
www.openmath.org
print_output
Example:
print_output("Hello"|file="test.txt");
References:
glib_tops
,(
,)
print_ox_rfc100_xml_form
Example:
print_ox_rfc100_xml_form(x^3-1);
References:
www.openxm.org
print_png_form
Example:
print_png_form(x^3-1);
References:
print_tex_form
print_terminal_form
print_tex_form
Description:
The global variable Print_tex_form_fraction_format takes the values "auto", "frac", or "/". The global variable Print_tex_form_no_automatic_subscript takes the values 0 or 1. BUG; A large input S cannot be translated.
Example:
print_tex_form(x*dx+1 | table=[["dx","\\partial_x"]]);
The optional variable table is used to give a translation table of asir symbols and tex symbols.
References:
print_xdvi_form
print_tfb_form
Example:
print_tfb_form(x+1);
print_xdvi_form
Example 0:
print_xdvi_form(newmat(2,2,[[x^2,x],[y^2-1,x/(x-1)]]));
Example 1:
print_xdvi_form(print_tex_form(1/2));
References:
print_tex_form
,print_dvi_form
print_xv_form
Example 0:
print_xv_form(newmat(2,2,[[x^2,x],[y^2-1,x/(x-1)]]));
Example 1:
print_xv_form(x+y | format="png");
If the optional variable format="png" is set, png format will be used to generate an input for xv.
References:
print_tex_form
,print_gif_form
poly_degree
Description:
The weight is given by the optional variable weight w. It returns
Example:
poly_degree(x^2+y^2-4 |weight=[100,1],v=[x,y]);
poly_elimination_ideal
Description:
If grobner_basis is "yes", I is assumed to be a Grobner basis. The optional variable v is a list of variables which defines the ring of polynomials.
Example 0:
poly_elimination_ideal([x^2+y^2-4,x*y-1],[x]);
Example 1:
A = poly_grobner_basis([x^2+y^2-4,x*y-1]|order=2,v=[y,x]); poly_elimination_ideal(A,[x]|grobner_basis="yes");
References:
gr
,hgr
,gr_mod
,dp_*
poly_expand
References:
poly_sort
poly_factor
Example:
poly_factor(x^10-y^10);
poly_gcd
Example:
poly_gcd(x^10-y^10,x^25-y^25);
poly_grobner_basis
Description:
The optional variable v is a list of variables which defines the ring of polynomials.
Example:
A = poly_grobner_basis([x^2+y^2-4,x*y-1]|order=2,v=[y,x]);
poly_hilbert_polynomial
Description:
The optional variable v is a list of variables.
Example:
poly_hilbert_polynomial([x1*y1,x1*y2,x2*y1,x2*y2]|s=k,v=[x1,x2,y1,y2]);
poly_initial
Description:
The optional variable v is a list of variables. This function computes
Example:
poly_initial([x^2+y^2-4,x*y-1]|order=0,v=[x,y]);
poly_initial_coefficients
Description:
The optional variable v is a list of variables. The order is specified by the optional variable order
Example:
poly_initial_coefficients([x^2+y^2-4,x*y-1]|order=0,v=[x,y]);
poly_initial_term
Description:
The weight is given by the optional variable weight w. It returns
Example:
poly_initial_term( x^2+y^2-4 |weight=[100,1],v=[x,y]);
poly_solve_linear
Example:
poly_solve_linear([2*x+3*y-z-2, x+y+z-1], [x,y,z]);
poly_sort
Example:
poly_sort((x-y-a)^3 | v=[x,y], w=[-1,-1]) returns a series expansion in terms of x and y.
The library glib provides a simple interface like old BASIC to the graphic primitive (draw_obj) of Risa/Asir.
glib_clear
glib_flush
glib_line
Example:
glib_line(0,0,5,3/2 | color=0xff00ff); glib_line(0,0,10,0 | shape=arrow);
glib_open
glib_plot
Example 0:
glib_plot([[0,1],[0.1,0.9],[0.2,0.7],[0.3,0.5],[0.4,0.8]]);
Example 1:
glib_plot(tan(x));
glib_print
Example:
glib_print(100,100,"Hello Worlds" | color=0xff0000);
glib_ps_form
Example 0:
glib_ps_form(quote( glib_line(0,0,100,100) ));
Example 1:
glib_ps_form(quote([glib_line(0,0,100,100),glib_line(100,0,0,100)]));
References:
glib_tops
glib_putpixel
Example:
glib_putpixel(1,2 | color=0xffff00);
glib_remove_last
glib_set_pixel_size
glib_tops
References:
print_output
glib_window
Example:
glib_window(-1,-1,10,10);
ox_check_errors2
[219] P=sm1.start(); 0 [220] sm1.sm1(P," 0 get "); 0 [221] ox_check_errors2(P); [error([7,4294967295,executeString: Usage:get])] Error on the server of the process number = 1 To clean the stack of the ox server, type in ox_pops(P,N) (P: process number, N: the number of data you need to pop) out of the debug mode. If you like to automatically clean data on the server stack, set XM_debug=0;
OXshell is a system to execute system commands from ox servers. As to details, see the files OpenXM/src/kan96xx/Doc/oxshell.oxw and OpenXM/doc/Papers/rims-2003-12-16-ja.tex.
oxshell.get_value
Example:
oxshell.set_value("abc","Hello world!"); oxshell.oxshell(["cp", "stringIn://abc", "stringOut://result"]); oxshell.get_value("result");
References:
oxshell.oxshell
,oxshell.set_value
oxshell.oxshell
Example:
oxshell.oxshell(["ls"]);
References:
ox_shell
,oxshell.set_value
,oxshell.get_value
oxshell.set_value
Example:
oxshell.set_value("abc","Hello world!"); oxshell.oxshell(["cat", "stringIn://abc"]);
References:
oxshell.oxshell
,oxshell.get_value
Utility functions provide some usuful functions to access to the system and to process strings.
util_filter
Example:
util_filter("sort","cat\ndog\ncentipede\n");
util_find_and_replace
util_find_substr
util_index
Example:
util_index(x_2_3)
References:
util_v
util_load_file_as_a_string
util_part
util_read_file_as_a_string
util_remove_cr
util_timing
Example:
util_timing( quote( fctr(x^50-y^50) ));
util_v
Example:
util_v("x",[1,3]);
References:
util_index
util_write_string_to_a_file
This section introduces other manuals in the asir-contrib project.
This section also describes functions that have not yet been classifed. These will be moved to independent sections in a future.
../ok_diff-html/ok_diff-en.html
../ok_dmodule-html/ok_dmodule-en.html
../plucker-html/plucker-en.html
../gnuplot-html/gnuplot-en.html
../mathematica-html/mathematica-en.html
../mk_graph-html/mk_graph-en.html
todo_parametrize/todo_parametrize_toc
With loading the file todo_parametrize/todo_parametrize.rr
the function paramerize
is installed.
The function finds a parametric expression of a given rational curve.
As to details, see
See section `' in A package for algebraic curves (in Japanese).
[1205] load("todo_parametrize/todo_parametrize.rr"); 1 [1425] parametrize(y^2-x^3); [155*t^2+20*t+1,720*t^4+1044*t^3+580*t^2,155*t^4+20*t^3+t^2,(-x)/(y)] [1426] parametrize(y^2+x^3); [-t,1,t^3,(-x)/(y)]
With loading the file taji_alc.rr
functions for algebraic local cohomology groups in one variable are imported.
import("taji_alc.rr"); taji_alc.laurent_expansion(x,(x-1)^3);
Links to manuals and papers related to files and commands in asir-contrib are at OpenXM documents.
Jump to: b - g - m - n - o - p - u
@vfill @eject
This document was generated on 23 February 2009 using texi2html 1.56k.