=================================================================== RCS file: /home/cvs/OpenXM/src/kan96xx/Doc/ecart.sm1,v retrieving revision 1.36 retrieving revision 1.39 diff -u -p -r1.36 -r1.39 --- OpenXM/src/kan96xx/Doc/ecart.sm1 2004/09/14 05:49:36 1.36 +++ OpenXM/src/kan96xx/Doc/ecart.sm1 2004/09/14 11:51:20 1.39 @@ -1,4 +1,4 @@ -% $OpenXM: OpenXM/src/kan96xx/Doc/ecart.sm1,v 1.35 2004/09/14 03:12:17 takayama Exp $ +% $OpenXM: OpenXM/src/kan96xx/Doc/ecart.sm1,v 1.38 2004/09/14 10:50:49 takayama Exp $ (hol_loaded) boundp { } { [(parse) (hol.sm1) pushfile] extension } ifelse %[(parse) (appell.sm1) pushfile] extension @@ -1027,7 +1027,7 @@ popVariables /arg1 } def -/ecart.checkOrder.noglobal { +/ecart.checkOrder.noGlobal { /arg1 set [/vv /tt /dd /n /i] pushVariables [ @@ -1839,7 +1839,7 @@ [/in-ecartd.isSameIdeal_h /aa /ii /jj /iigg /jjgg /vv /ans /k /n /f /ecartd.isSameIdeal_h.opt /save-ecart.autoHomogenize /wv /save-ecart.message.quiet - /vvGlobal /rng + /vvGlobal /rng /noRecomputation ] pushVariables [(CurrentRingp) (Homogenize_vec)] pushEnv [ @@ -1847,13 +1847,13 @@ gb.verbose { (Getting in ecartd.isSameIdeal_h) message } { } ifelse %% comparison of hilbert series has not yet been implemented. /save-ecart.message.quiet ecart.message.quiet def - aa length 3 eq , aa length 4 eq , or { } + aa length 2 gt { } { ([ii jj vv] ecartd.isSameIdeal_h) error } ifelse /ii aa 0 get def /jj aa 1 get def /vv aa 2 get def - aa length 4 eq { + aa length 3 gt { /vvGlobal aa 3 get def vvGlobal isString { [vvGlobal to_records pop] /vvGlobal set } { vvGlobal { toString } map /vvGlobal set } ifelse @@ -1869,11 +1869,19 @@ /rng [vv wv [(partialEcartGlobalVarX) vvGlobal]] def } ifelse - /save-ecart.autoHomogenize ecart.autoHomogenize def - /ecart.autoHomogenize 0 def - [ii] rng join ecartd.gb /iigg set - [jj] rng join ecartd.gb /jjgg set - save-ecart.autoHomogenize /ecart.autoHomogenize set + aa (noRecomputation) getNode /noRecomputation set + noRecomputation tag 0 eq { /noRecomputation 0 def } { + /noRecomputation 1 def + } ifelse + noRecomputation { + [ii] /iigg set [jj] /jjgg set + } { + /save-ecart.autoHomogenize ecart.autoHomogenize def + /ecart.autoHomogenize 0 def + [ii] rng join ecartd.gb /iigg set + [jj] rng join ecartd.gb /jjgg set + save-ecart.autoHomogenize /ecart.autoHomogenize set + } ifelse iigg getRing ring_def @@ -1883,18 +1891,23 @@ iigg 0 get /iigg set jjgg 0 get /jjgg set %%Bug: not implemented for the case of module. + /ecartd.isSameIdeal_h.gb [iigg jjgg] def /save-ecart.message.quiet ecart.message.quiet def /ecart.message.quiet 1 def gb.verbose { (Comparing) message iigg message (and) message jjgg message } { } ifelse gb.verbose { ( ii < jj ?) messagen } { } ifelse + /ecartd.isSameIdeal_h.failed [ ] def iigg length /n set 0 1 n 1 sub { /k set iigg k get [jjgg] ecartd.reduction 0 get - (0). eq not { /ans 0 def /LLL.ecartd.isSame_h goto} { } ifelse + (0). eq not { + /ecartd.isSameIdeal_h.failed [ iigg k get jjgg] def + /ans 0 def /LLL.ecartd.isSame_h goto + } { } ifelse gb.verbose { (o) messagen } { } ifelse } for gb.verbose { ( jj < ii ?) messagen } { } ifelse @@ -1903,7 +1916,10 @@ /k set jjgg k get [iigg] ecartd.reduction 0 get - (0). eq not { /ans 0 def /LLL.ecartd.isSame_h goto} { } ifelse + (0). eq not { + /ecartd.isSameIdeal_h.failed [ iigg jjgg k get] def + /ans 0 def /LLL.ecartd.isSame_h goto + } { } ifelse gb.verbose { (o) messagen } { } ifelse } for /LLL.ecartd.isSame_h @@ -1924,10 +1940,17 @@ $The ideals ii and jj will be compared in the ring h[0,1](D_0).$ $ii and jj are re-parsed.$ $Example 1: [ [((1-x) Dx + h)] [((1-x)^2 Dx + h (1-x))] (x)] ecartd.isSameIdeal_h $ + ( ) ([ii jj vv vvGlobal] ecartd.isSameIdeal_h bool) $ Ideals are compared in Q(x')_0 [x''] $ ( where x'' is specified in vvGlobal.) (cf. partialEcartGlobalVarX option) + ( ) + $Option list: [(noRecomputation) 1] $ + $Example 2: [ [((1-x) Dx + h)] [((1-x)^2 Dx + h (1-x))] (x)] ecartd.isSameIdeal_h $ + $ ecartd.isSameIdeal_h.gb 0 get /ii set $ + $ ecartd.isSameIdeal_h.gb 1 get /jj set $ + $ [ ii jj (x) [[(noRecomputation) 1]] ] ecartd.isSameIdeal_h $ ]] putUsages /ecartd.isSameIdeal_noh { @@ -1935,7 +1958,7 @@ [/aa /ii /jj /iigg /jjgg /vv /ans /k /n /f /ecartd.isSameIdeal_h.opt /save-ecart.autoHomogenize /wv /save-ecart.message.quiet - /vvGlobal /rng + /vvGlobal /rng /noRecomputation ] pushVariables [(CurrentRingp) (Homogenize_vec)] pushEnv [ @@ -1943,13 +1966,13 @@ gb.verbose { (Getting in ecartd.isSameIdeal_noh) message } { } ifelse %% comparison of hilbert series has not yet been implemented. /save-ecart.message.quiet ecart.message.quiet def - aa length 3 eq , aa length 4 eq , or { } + aa length 2 gt { } { ([ii jj vv] ecartd.isSameIdeal_noh) error } ifelse /ii aa 0 get def /jj aa 1 get def /vv aa 2 get def - aa length 4 eq { + aa length 3 gt { /vvGlobal aa 3 get def vvGlobal isString { [vvGlobal to_records pop] /vvGlobal set } { vvGlobal { toString } map /vvGlobal set } ifelse @@ -1965,11 +1988,19 @@ /rng [vv wv [(partialEcartGlobalVarX) vvGlobal]] def } ifelse - /save-ecart.autoHomogenize ecart.autoHomogenize def - /ecart.autoHomogenize 0 def - [ii] rng join ecartd.gb /iigg set - [jj] rng join ecartd.gb /jjgg set - save-ecart.autoHomogenize /ecart.autoHomogenize set + aa (noRecomputation) getNode /noRecomputation set + noRecomputation tag 0 eq { /noRecomputation 0 def } { + /noRecomputation 1 def + } ifelse + noRecomputation { + [ii] /iigg set [jj] /jjgg set + } { + /save-ecart.autoHomogenize ecart.autoHomogenize def + /ecart.autoHomogenize 0 def + [ii] rng join ecartd.gb /iigg set + [jj] rng join ecartd.gb /jjgg set + save-ecart.autoHomogenize /ecart.autoHomogenize set + } ifelse iigg getRing ring_def @@ -1978,6 +2009,7 @@ /ans 1 def iigg 0 get /iigg set jjgg 0 get /jjgg set + /ecartd.isSameIdeal_noh.gb [iigg jjgg] def %%Bug: not implemented for the case of module. /save-ecart.message.quiet ecart.message.quiet def @@ -1985,12 +2017,16 @@ gb.verbose { (Comparing) message iigg message (and) message jjgg message } { } ifelse gb.verbose { ( ii < jj ?) messagen } { } ifelse + /ecartd.isSameIdeal_noh.failed [ ] def iigg length /n set 0 1 n 1 sub { /k set iigg k get [jjgg] ecartd.reduction_noh 0 get - (0). eq not { /ans 0 def /LLL.ecartd.isSame_noh goto} { } ifelse + (0). eq not { + /ecartd.isSameIdeal_noh.failed [ iigg k get jjgg] def + /ans 0 def /LLL.ecartd.isSame_noh goto + } { } ifelse gb.verbose { (o) messagen } { } ifelse } for gb.verbose { ( jj < ii ?) messagen } { } ifelse @@ -1999,7 +2035,10 @@ /k set jjgg k get [iigg] ecartd.reduction_noh 0 get - (0). eq not { /ans 0 def /LLL.ecartd.isSame_noh goto} { } ifelse + (0). eq not { + /ecartd.isSameIdeal_noh.failed [ iigg jjgg k get] def + /ans 0 def /LLL.ecartd.isSame_noh goto + } { } ifelse gb.verbose { (o) messagen } { } ifelse } for /LLL.ecartd.isSame_noh @@ -2025,6 +2064,11 @@ (cf. partialEcartGlobalVarX option, ecartd.reduction_noh, ecartd.isSameIdeal_h) $Example 2: [ [(1-z) (1-x-y-z)] [(1-x) (1-y)] (x,y,z) [(x)]] $ $ ecartd.isSameIdeal_noh $ + $Option list: [(noRecomputation) 1] $ + $Example 2': [ [(1-z) (1-x-y-z)] [(1-x) (1-y)] (x,y,z) [(x)]] ecartd.isSameIdeal_noh$ + $ ecartd.isSameIdeal_noh.gb 0 get /ii set $ + $ ecartd.isSameIdeal_noh.gb 1 get /jj set $ + $ [ ii jj (x) [[(noRecomputation) 1]] ] ecartd.isSameIdeal_noh $ ]] putUsages (ecartd.isSameIdeal_noh ) messagen-quiet