[BACK]Return to k0-cohom.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / lib / minimal

Annotation of OpenXM/src/k097/lib/minimal/k0-cohom.sm1, Revision 1.2

1.2     ! takayama    1: %%  $OpenXM: OpenXM/src/k097/lib/minimal/k0-cohom.sm1,v 1.1 2000/05/03 06:42:07 takayama Exp $
1.1       takayama    2:
                      3: %%  These macros should be moved to dr.sm1 with usages.
                      4: /define_ring_variables {
                      5:   [/in-define_ring_variables /v /p /v0] pushVariables
                      6:   [
                      7:      /v getVariableNames def
                      8:      /v0 v def
                      9:      v { dup /p set (/) 2 1 roll ( $) p ($. def ) } map cat
                     10:      /v set
1.2     ! takayama   11: %     v message
1.1       takayama   12:      [(parse) v] extension
                     13:   ] pop
                     14:   popVariables
                     15: } def
1.2     ! takayama   16: [(define_ring_variables)
        !            17: [(It binds  a variable <<a>> in the current ring to the sm1 variable <<a>>.)
        !            18:  (For example, if x is a variable in the current ring, it defines the sm1)
        !            19:  (variable x by /x (x) def)
        !            20: ]] putUsages
1.1       takayama   21:
                     22: /boundp {
                     23:   /arg1 set
                     24:   [/a /ans] pushVariables
                     25:   [
                     26:     /a arg1 def
                     27:     [(parse) [(/) a ( load tag 0 eq { /ans 0 def } )
                     28:                     (               { /ans 1 def } ifelse )] cat ] extension
                     29:     /arg1 ans def
                     30:   ] pop
                     31:   popVariables
                     32:   arg1
                     33: } def
                     34: [(boundp)
                     35:  [( a boundp b)
                     36:   (string a, b is 0 or 1.)
                     37:   (If the variable named << a >> is bounded to a value,)
                     38:   (it returns 1 else it returns 0.)
                     39:   $Example: (hoge) boundp ::$
                     40: ]] putUsages
                     41:
                     42: % w_to_vec in dr.sm1 should be replaced by the following.
                     43: [(chattr) 0 /w_to_vec] extension
                     44: %% [@@@.esymbol (x) (y) (h)] [(x) 100 (y) 10] w_to_vec [0 100 10 0]
                     45: %%  univ              www
                     46: /w_to_vec {
                     47:   /arg2 set  /arg1 set
                     48:   [/univ /www /k /vname /vweight /ans] pushVariables
                     49:   /univ arg1 def /www arg2 def
                     50:   [
                     51:     /ans << univ length >> -1 0 evecw def
                     52:     0  2  << www length 2 sub >>
                     53:     {
                     54:       %% ans ::
                     55:       /k set
                     56:       www k get /vname set
                     57:       www << k 1 add >> get (integer) dc /vweight set
                     58:       << univ length >>
                     59:       << univ vname position >>
                     60:       vweight evecw
                     61:       ans add /ans set
                     62:     } for
                     63:     /arg1 ans def
                     64:   ] pop
                     65:   popVariables
                     66:   arg1
                     67: } def
                     68:
                     69:
                     70:
                     71: %%% From cohom.sm1
                     72: [
                     73: (cohom.sm1 is the top of an experimental package to compute restrictions)
                     74: (of all degrees based on restall.sm1 and restall_s.sm1)
                     75: (See, http://www.math.kobe-u.ac.jp to get these files of the latest version.)
                     76: (Note that the package b-function.sm1 cannot be used with this package.)
                     77: (r-interface.sm1 (C) N.Takayama,  restriction, deRham)
                     78: (  )
                     79: ] {message-quiet} map
                     80: %%% Constants.
                     81: /BFmessage    0 def   %% restall_s.sm1
                     82: /BFnotruncate 1 def   %% restall1_s or restall_s  (truncation from the below)
                     83: %%/Schreyer     1 def   %% V-homogenize, Schreyer
                     84: /Schreyer     2 def   %% h-homogenize, Schreyer
                     85: %%%% Load files
                     86:    [(parse) (oxasir.sm1) pushfile] extension
                     87:    %[(parse) (var.sm1) pushfile] extension
                     88:    %% DO NOT execute debugMode
                     89:    %% inside a block of pushVariables and popVariables.
                     90:    %% debugMode
                     91:    [(parse) (hol.sm1) pushfile] extension
                     92:    [(parse) (gkz.sm1) pushfile] extension
                     93:    [(parse) (appell.sm1)pushfile] extension
                     94:    [(parse) (resol0.sm1)pushfile] extension
                     95:    [(parse) (complex.sm1)pushfile] extension
                     96: %%%%%
                     97: [(parse) (restall.sm1) pushfile] extension pop
                     98: [(parse) (restall_s.sm1) pushfile] extension pop
                     99: %%%%%
                    100: BFnotruncate 1 {
                    101:   (No truncation from below in restall) message-quiet
                    102: }{
                    103:   (Truncation from below in restall. It is faster, but it still contains a bug. So, put /BFnotruncate 1 def in cohom.sm1) message-quiet
                    104: } ifelse
                    105: %%% Automatically choose tower package.  restall_s.sm1 set the variable
                    106: %%% Schreyer,  so set Schreyer here.
                    107: Schreyer 1 eq {
                    108:   (The variable Schreyer is set to 1.) message-quiet
                    109: }{  } ifelse
                    110: Schreyer 2 eq {
                    111:    (The variable Schreyer is set to 2.) message-quiet
                    112: }{  } ifelse
                    113: Schreyer 2 eq {
                    114:   (Loading tower.sm1 in the standard context. You cannot use Schyrer 1. It is controlled from cohom.sm1) message-quiet
                    115:   [(parse) (tower.sm1) pushfile] extension pop
                    116: }{
                    117:   (Loading tower-sugar.sm1 in the standard context. You cannot use Schreyer 2. It is controlled from cohom.sm1) message-quiet
                    118:  [(parse) (tower-sugar.sm1) pushfile] extension pop
                    119: } ifelse
                    120: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                    121: [(parse) (r-interface.sm1) pushfile] extension pop
                    122: (  ) message-quiet
                    123:
                    124: /Onverbose {
                    125:   [
                    126:     /appell.verbose
                    127:     /bfunction.verbose
                    128:     /gkz.verbose
                    129:     /rank.verbose
                    130:     /characteristic.verbose
                    131:     /rrank.verbose
                    132:     /gb.verbose
                    133:     /syz.verbose
                    134:     /fs.verbose
                    135:     /annfs.verbose
                    136:     /intw.verbose
                    137:     /r-interface.verbose
                    138:     /resol0.verbose
                    139:     /tower-sugar.verbose
                    140:     /tower.verbose
                    141:     /deRham.verbose
                    142:   ] { 1 def } map
                    143: } def
                    144:
                    145: /Offverbose {
                    146:   [
                    147:     /appell.verbose
                    148:     /bfunction.verbose
                    149:     /gkz.verbose
                    150:     /rank.verbose
                    151:     /characteristic.verbose
                    152:     /rrank.verbose
                    153:     /gb.verbose
                    154:     /syz.verbose
                    155:     /fs.verbose
                    156:     /annfs.verbose
                    157:     /intw.verbose
                    158:     /r-interface.verbose
                    159:     /resol0.verbose
                    160:     /tower-sugar.verbose
                    161:     /tower.verbose
                    162:     /deRham.verbose
                    163:   ] { 0 def } map
                    164: } def
                    165:
                    166: [(Onverbose)
                    167:  [(Onverbose)
                    168:   (Turn on all verbose flags of the packages. cf. Offverbose)
                    169: ]] putUsages
                    170: [(Offverbose)
                    171:  [(Offverbose)
                    172:   (Turn off all verbose flags of the packages. cf. Onverbose)
                    173: ]] putUsages
                    174:
                    175: /cohom.sm1.loaded 1 def

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>