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