数式処理システム
asir
は OpenXM
プロトコル
(Open message eXchange for Mathematics, http://www.openxm.org)
をサポートしたサーバを
コンポーネントとして利用できる.
これらのサーバを呼ぶためのインタフェース関数はファイル
`OpenXM/rc/asirrc' をロードすることによりシステムに読み込まれる.
Risa/Asir (OpenXM 配布版) では起動時に自動的にこのファイルが読まれる.
Risa/Asir (OpenXM 配布版) は, このマニュアルでは
OpenXM/Risa/Asir
と呼ぶ.
このマニュアルでは asir
用のこれらの関数
およびユーザ言語で書かれた数学関数およびユーティリティ関数を説明する.
OpenXM
プロトコルの技術的詳細については,
`$(OpenXM_HOME)/doc/OpenXM-specs' にあるファイル
`openxm-jp.tex'
を見て下さい.
それでは, あなたの計算機上で数学をお楽しみ下さい.
List of contributors:
この Contrib パッケージの
著作権については, OpenXM/Copyright
を見て下さい.
有用だとおもいますが無保証です.
`OpenXM/rc/asirrc'
をロードすることにより Asir/Contrib の主な関数が利用可能となる.
OpenXM/Risa/Asir では ASIR_CONFIG
環境変数により
このファイルを起動時に読みこんでいる.
`names.rr' が Asir/Contrib のトップレベルのファイルである.
このファイルよりその他のファイルが読み込まれている.
一部のパッケージは `names.rr' からは読み込まれないので,
明示的に読み込む必要がある.
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$
Asir Contrib には
(1) 標準的な名前で定義された数学函数 (names.rr
および
(2) Asir 標準函数以外の有用なライブラリ函数
および
(3) OpenXM サーバを asir から呼ぶための函数
が含まれている.
Asir Contrib の函数名はモジュール化されているかまたは次の形をしている:
カテゴリ名_函数名
標準的な数学函数は実体へのラッパーである.
たとえば
sm1.hilbert
は OpenXM サーバ sm1
の
Hilbert 函数の計算函数を呼び出す函数である.
一方 poly_hilbert_polynomial
は Asir Contrib の
Hilbert 函数を計算するための (1) に属する標準的な函数名である.
標準函数 poly_hilbert_polynomial
は,
現在 sm1.hilbert
を呼び出して Hilbert 函数を計算しているが,
これは将来変更されるかもしれない.
たとえば, Asir 言語で記述された有用なライブラリ函数集
commutativeRing.rr
が開発されて
Hilbert 函数の計算函数
commutativeRing_hilbert_polynomial
が含まれるようになったら,
標準函数 poly_hilbert_polynomial
は,
commutativeRing_hilbert_polynomial
を呼び出して
Hilbert 函数を計算するようになるかもしれない.
したがって, ユーザプログラムは標準数学函数名を用いるのが望ましい.
標準数学函数名は, OpenXM project において, 全てのプロジェクトで共通の
仕様を持つように努力している.
たとえば, kan/k0 も Asir Contrib と同様の標準数学函数名を持つ
予定である.
現在実験的に数学函数のカテゴリ complex
複体 (複素数でない)
のマニュアルを kan/k0, asir/contrib で共通化を試みている.
以下の章は, 標準数学函数の解説をおこない, それから ライブラリ函数, それから, OpenXM サーバのインタフェースの説明を おこなう.
Windows でも不完全ながら asir-contrib が動作する. 現在, 外部コンポーネント sm1 および, 外部 コンポーネント を利用しない asir-contrib の関数が動作する. Cygwin 環境では外部コンポーネント sm1, phc が動作する. その他の外部コンポーネントは動作しない.
次の関数は Windows では動作しない. Windows での cygwin 環境では動作する場合がある.
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 example微積分(標準数学函数)
級数(標準数学函数)
特殊函数(標準数学函数)
まだ書いてない.
行列(標準数学函数)
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
まだ書いてない.
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.
ライブラリ glib は, Risa/Asir の グラフィック基本関数 (draw_obj) に対する, 昔の BASIC のような単純なインタフェースを提供する.
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 はシステムのコマンドを ox server より実行する仕組みである. 詳しくは OpenXM/src/kan96xx/Doc/oxshell.oxw および 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
システムの資源にアクセスするためおよび文字列処理の便利な関数を集めてある.
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
この節では asir-contrib のその他のマニュアルを紹介する.
それからまだ分類がおわっていない関数を解説する. これらの関数は将来は別の独立した節へ移す予定である.
../ok_diff-html/ok_diff-ja.html
../ok_dmodule-html/ok_dmodule-ja.html
../plucker-html/plucker-ja.html
../gnuplot-html/gnuplot-ja.html
../mathematica-html/mathematica-ja.html
../mk_graph-html/mk_graph-ja.html
../todo_parametrize-html/todo_parametrize-ja.html
パッケージ todo_parametrize/todo_parametrize.rr
をロードすることにより,
有理曲線のパラメータ表示を見付ける関数である,
paramerize
が利用できるようになる.
詳しくは See section `概要' in Risa/Asir 代数曲線論用パッケージ説明書 を見よ
(Web 版 Risa/Asir 代数曲線論用パッケージ説明書).
このパッケージのマニュアルへの統合はまだできていない.
このパッケージはまだ module 構造を利用していないので, 既存のライブラリと
名前の衝突の可能性がある.
[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)]
../taji_alc-html/taji_alc-ja.html
パッケージ taji_alc.rr
をロードすることにより,
一変数代数的コホモロジ群に関連する関数をロードできる.
(Web 版 Risa/Asir 一変数代数的局所コホモロジー類に関する Risa/Aisr パッケージ説明書).
import("taji_alc.rr"); taji_alc.laurent_expansion(x,(x-1)^3);
OpenXM documents. には texinfo で書かれていない asir-contrib のファイルや関数のマニュアル, および 関連論文へのリンクがある.
(yang, fj_curve, nk_mora 等)
Jump to: b - g - m - n - o - p - u
@vfill @eject
This document was generated on 23 February 2009 using texi2html 1.56k.