% int-d.sm1 %% %%% (int-d.sm1: Aug 28, 1995.) message ( New macros "integral-d" and "get0-d" are added.) message ( Type in 3 0 demo.int-d to see a demo.) message %% Usage, putUsages and showKeywords %% The data should be automatically generated from int-d.txt %% int-d.sm1 = int-d.sm + int-d.txt [(integral-d) [(ff n integral-d ffi ) ( ff is a list of operators,) ( n is a number to specify the degree of approximation,) ( ffi is the result list that will be the input to the "groebner") ( to get the "sum" of the module ff.) (Example: ) $ [(m) ring_of_difference_operators (Em) elimination_order 0] define_ring $ $ [((m-e+1) Em - (m+1)). ( (e+1) E - (m-e)).] 3 integral-d /ffi set$ ( [ffi] groebner 0 get get0-d ::) ( ) (See also, groebner (option countdown) and get0-d.) ]] putUsages [(get0-d) [(ff get0 result) ( ff is a list of operators. The operators in ff that does not) ( contain "e" is stored in result.) ( Note that "h" and "E" are set to 1.) (See also integral-d) (Example: ) $ [ (x h + E). (e+x).] get0-d :: $ ( [ x + 1 ] ) ]] putUsages %% You can use it as a template. /demo.int-d { /ccc set /nnn set %%%% Define the ring [ (n) ring_of_difference_operators (En) elimination_order 0] define_ring %%%% Give the equations here. %%%% E e = e E + E and "e" and "E" will be eliminated. [ ((n-e+1)^2*En - (n+e+1)^2). ((e+1)^4*E - (-1)^2*(n-e)^2*(n+e+1)^2). ] /ff set %%% Let's compute ff nnn integral-d /ffi set %% Give the lower and the upper bound of the degree. %% /from-degree 0 def /to-degree 5 def %%[ffi [(from) from-degree (to) to-degree]] [ffi [(countDown) ccc]] groebner 0 get get0-d /ans set (Answer is in ans. ans = ) message ans :: (This is Apery's reccurence formula.) message } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%% Don't touch below %%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%% e-vectors, integral-d, get0-d %%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% (Try [f1 f2 ...] nnn integral-d /ff set) message %% ([ff] groebner 0 get get0-d) message %% number e-vectors /e-vectors { /arg1 set [/ans] pushVariables [ /ans [(e).] def 1 1 << arg1 1 sub >> { pop /ans [(e).] ans {(e). mul} map join def } for /arg1 ans def ] pop popVariables arg1 } def %% [f1 f2 ...] nnn integral-d /integral-d { /arg2 set /arg1 set [/nnn /gens /m /ans /fff] pushVariables [ /gens arg1 def /nnn arg2 def /m gens length def /ans [ ] def 0 1 << m 1 sub >> { gens 2 1 roll get /fff set %%fff :: /ans ans [fff] join nnn e-vectors {fff mul} map join def %%ans :: } for /ans ans nnn e-vectors {(E-1). 2 1 roll mul} map join def /ans ans {[[(h). (1).]] replace} map def /ans ans {homogenize} map def /arg1 ans def ] pop popVariables arg1 } def % [g1 g2 g3 ...] get0-d /get0-d { /arg1 set [/gb /degs /ans /n /ff] pushVariables [ /gb arg1 def /degs gb {(e). degree} map def /ans [ 0 1 << gb length 1 sub >> { /n set << degs n get >> 0 eq { gb n get [[(E). (1).] [(h). (1).]] replace /ff set ff (0). eq { } { ff } ifelse } { } ifelse } for ] def /arg1 ans def ] pop popVariables arg1 } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%