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

File: [local] / OpenXM / src / k097 / lib / minimal / k0-cohom.sm1 (download)

Revision 1.2, Mon Jul 31 01:21:41 2000 UTC (23 years, 11 months ago) by takayama
Branch: MAIN
CVS Tags: maekawa-ipv6, RELEASE_1_1_3
Changes since 1.1: +7 -2 lines

Trimmed unnecessary codes.

%%  $OpenXM: OpenXM/src/k097/lib/minimal/k0-cohom.sm1,v 1.2 2000/07/31 01:21:41 takayama Exp $

%%  These macros should be moved to dr.sm1 with usages.
/define_ring_variables {
  [/in-define_ring_variables /v /p /v0] pushVariables
  [
     /v getVariableNames def
     /v0 v def
     v { dup /p set (/) 2 1 roll ( $) p ($. def ) } map cat
     /v set
%     v message
     [(parse) v] extension 
  ] pop
  popVariables
} def
[(define_ring_variables)
[(It binds  a variable <<a>> in the current ring to the sm1 variable <<a>>.)
 (For example, if x is a variable in the current ring, it defines the sm1)
 (variable x by /x (x) def)
]] putUsages

/boundp {
  /arg1 set
  [/a /ans] pushVariables
  [
    /a arg1 def
    [(parse) [(/) a ( load tag 0 eq { /ans 0 def } )
                    (               { /ans 1 def } ifelse )] cat ] extension
    /arg1 ans def
  ] pop
  popVariables
  arg1
} def
[(boundp)
 [( a boundp b)
  (string a, b is 0 or 1.)
  (If the variable named << a >> is bounded to a value,)
  (it returns 1 else it returns 0.)
  $Example: (hoge) boundp ::$
]] putUsages

% w_to_vec in dr.sm1 should be replaced by the following.
[(chattr) 0 /w_to_vec] extension
%% [@@@.esymbol (x) (y) (h)] [(x) 100 (y) 10] w_to_vec [0 100 10 0]
%%  univ              www
/w_to_vec {
  /arg2 set  /arg1 set
  [/univ /www /k /vname /vweight /ans] pushVariables
  /univ arg1 def /www arg2 def
  [ 
    /ans << univ length >> -1 0 evecw def
    0  2  << www length 2 sub >>
    {
      %% ans ::
      /k set
      www k get /vname set
      www << k 1 add >> get (integer) dc /vweight set
      << univ length >> 
      << univ vname position >>
      vweight evecw
      ans add /ans set
    } for
    /arg1 ans def
  ] pop
  popVariables
  arg1
} def



%%% From cohom.sm1 
[
(cohom.sm1 is the top of an experimental package to compute restrictions)
(of all degrees based on restall.sm1 and restall_s.sm1)
(See, http://www.math.kobe-u.ac.jp to get these files of the latest version.)
(Note that the package b-function.sm1 cannot be used with this package.)
(r-interface.sm1 (C) N.Takayama,  restriction, deRham)
(  )
] {message-quiet} map
%%% Constants.
/BFmessage    0 def   %% restall_s.sm1
/BFnotruncate 1 def   %% restall1_s or restall_s  (truncation from the below)
%%/Schreyer     1 def   %% V-homogenize, Schreyer
/Schreyer     2 def   %% h-homogenize, Schreyer
%%%% Load files
   [(parse) (oxasir.sm1) pushfile] extension
   %[(parse) (var.sm1) pushfile] extension  
   %% DO NOT execute debugMode 
   %% inside a block of pushVariables and popVariables.
   %% debugMode
   [(parse) (hol.sm1) pushfile] extension
   [(parse) (gkz.sm1) pushfile] extension 
   [(parse) (appell.sm1)pushfile] extension
   [(parse) (resol0.sm1)pushfile] extension
   [(parse) (complex.sm1)pushfile] extension
%%%%%
[(parse) (restall.sm1) pushfile] extension pop
[(parse) (restall_s.sm1) pushfile] extension pop
%%%%%
BFnotruncate 1 {
  (No truncation from below in restall) message-quiet
}{
  (Truncation from below in restall. It is faster, but it still contains a bug. So, put /BFnotruncate 1 def in cohom.sm1) message-quiet
} ifelse
%%% Automatically choose tower package.  restall_s.sm1 set the variable
%%% Schreyer,  so set Schreyer here.
Schreyer 1 eq {
  (The variable Schreyer is set to 1.) message-quiet
}{  } ifelse
Schreyer 2 eq {
   (The variable Schreyer is set to 2.) message-quiet
}{  } ifelse
Schreyer 2 eq {
  (Loading tower.sm1 in the standard context. You cannot use Schyrer 1. It is controlled from cohom.sm1) message-quiet
  [(parse) (tower.sm1) pushfile] extension pop
}{
  (Loading tower-sugar.sm1 in the standard context. You cannot use Schreyer 2. It is controlled from cohom.sm1) message-quiet
 [(parse) (tower-sugar.sm1) pushfile] extension pop
} ifelse
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[(parse) (r-interface.sm1) pushfile] extension pop
(  ) message-quiet

/Onverbose {
  [ 
    /appell.verbose
    /bfunction.verbose
    /gkz.verbose
    /rank.verbose
    /characteristic.verbose
    /rrank.verbose
    /gb.verbose
    /syz.verbose
    /fs.verbose
    /annfs.verbose
    /intw.verbose
    /r-interface.verbose
    /resol0.verbose
    /tower-sugar.verbose
    /tower.verbose
    /deRham.verbose
  ] { 1 def } map  
} def

/Offverbose {
  [ 
    /appell.verbose
    /bfunction.verbose
    /gkz.verbose
    /rank.verbose
    /characteristic.verbose
    /rrank.verbose
    /gb.verbose
    /syz.verbose
    /fs.verbose
    /annfs.verbose
    /intw.verbose
    /r-interface.verbose
    /resol0.verbose
    /tower-sugar.verbose
    /tower.verbose
    /deRham.verbose
  ] { 0 def } map  
} def

[(Onverbose)
 [(Onverbose)
  (Turn on all verbose flags of the packages. cf. Offverbose)
]] putUsages
[(Offverbose)
 [(Offverbose)
  (Turn off all verbose flags of the packages. cf. Onverbose)
]] putUsages

/cohom.sm1.loaded 1 def