| version 1.6, 2001/01/05 11:14:29 |
version 1.7, 2001/01/26 12:24:57 |
|
|
| /* $OpenXM: OpenXM/src/k097/lib/restriction/demo.k,v 1.5 2000/12/28 00:08:14 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/lib/restriction/demo.k,v 1.6 2001/01/05 11:14:29 takayama Exp $ */ |
| |
|
| load["restriction.k"];; |
load["restriction.k"];; |
| load("../ox/ox.k");; |
load("../ox/ox.k");; |
| Line 11 def demoSendAsirCommand(a) { |
|
| Line 11 def demoSendAsirCommand(a) { |
|
| a.executeString(" def mygeneric_bfct(F,VV,DD,WW) { print([F,VV,DD,WW]); return(generic_bfct(F,VV,DD,WW));}; "); |
a.executeString(" def mygeneric_bfct(F,VV,DD,WW) { print([F,VV,DD,WW]); return(generic_bfct(F,VV,DD,WW));}; "); |
| } |
} |
| |
|
| as = startAsir(); |
if (Boundp("NoX")) { |
| |
as = Asir.generate(false); |
| |
}else{ |
| |
as = Asir.generate(); |
| |
} |
| |
|
| asssssir = as; |
asssssir = as; |
| demoSendAsirCommand(as); |
demoSendAsirCommand(as); |
| RingD("x,y,z,s"); |
RingD("x,y,z,s"); |
| Line 94 def asirAnnXYZ(a,f) { |
|
| Line 99 def asirAnnXYZ(a,f) { |
|
| |
|
| def nonquasi2(p,q) { |
def nonquasi2(p,q) { |
| local s,ans,f; |
local s,ans,f; |
| |
|
| |
sm1("0 set_timer "); sm1(" oxNoX "); |
| |
asssssir.OnTimer(); |
| |
|
| f = x^p+y^q+x*y^(q-1); |
f = x^p+y^q+x*y^(q-1); |
| Print("f=");Println(f); |
Print("f=");Println(f); |
| s = ToString(f); |
s = ToString(f); |
| Line 114 def nonquasi2(p,q) { |
|
| Line 123 def nonquasi2(p,q) { |
|
| Print("Roots and b-function are "); Println(R); |
Print("Roots and b-function are "); Println(R); |
| R0 = R[0]; |
R0 = R[0]; |
| Ans=Srestall(Res0, ["x", "y"], ["x", "y"], R0[Length(R0)-1]); |
Ans=Srestall(Res0, ["x", "y"], ["x", "y"], R0[Length(R0)-1]); |
| |
|
| |
Println("Timing data: sm1 "); sm1(" 1 set_timer "); |
| |
Print(" ox_asir [CPU,GC]: ");Println(asssssir.OffTimer()); |
| |
|
| Print("Answer is "); Println(Ans[0]); |
Print("Answer is "); Println(Ans[0]); |
| return(Ans); |
return(Ans); |
| } |
} |
| Line 129 def asirAnn0XYZ(a,f) { |
|
| Line 142 def asirAnn0XYZ(a,f) { |
|
| |
|
| def DeRham2WithAsir(f) { |
def DeRham2WithAsir(f) { |
| local s; |
local s; |
| |
|
| |
sm1("0 set_timer "); sm1(" oxNoX "); |
| |
asssssir.OnTimer(); |
| |
|
| s = ToString(f); |
s = ToString(f); |
| II = asirAnn0XYZ(asssssir,f); |
II = asirAnn0XYZ(asssssir,f); |
| Print("Step 1: Annhilating ideal (II)"); Println(II); |
Print("Step 1: Annhilating ideal (II)"); Println(II); |
| Line 144 def DeRham2WithAsir(f) { |
|
| Line 161 def DeRham2WithAsir(f) { |
|
| Print("Roots and b-function are "); Println(R); |
Print("Roots and b-function are "); Println(R); |
| R0 = R[0]; |
R0 = R[0]; |
| Ans=Srestall(Res0, ["x", "y"], ["x", "y"],R0[Length(R0)-1] ); |
Ans=Srestall(Res0, ["x", "y"], ["x", "y"],R0[Length(R0)-1] ); |
| |
|
| |
Println("Timing data: sm1 "); sm1(" 1 set_timer "); |
| |
Print(" ox_asir [CPU,GC]: ");Println(asssssir.OffTimer()); |
| |
|
| Print("Answer is ");Println(Ans[0]); |
Print("Answer is ");Println(Ans[0]); |
| return(Ans); |
return(Ans); |
| } |
} |
| def DeRham3WithAsir(f) { |
def DeRham3WithAsir(f) { |
| local s; |
local s; |
| |
|
| |
sm1("0 set_timer "); sm1(" oxNoX "); |
| |
asssssir.OnTimer(); |
| |
|
| s = ToString(f); |
s = ToString(f); |
| II = asirAnn0XYZ(asssssir,f); |
II = asirAnn0XYZ(asssssir,f); |
| Print("Step 1: Annhilating ideal (II)"); Println(II); |
Print("Step 1: Annhilating ideal (II)"); Println(II); |
| Line 164 def DeRham3WithAsir(f) { |
|
| Line 189 def DeRham3WithAsir(f) { |
|
| Print("Roots and b-function are "); Println(R); |
Print("Roots and b-function are "); Println(R); |
| R0 = R[0]; |
R0 = R[0]; |
| Ans=Srestall(Res0, ["x", "y", "z"], ["x", "y", "z"],R0[Length(R0)-1] ); |
Ans=Srestall(Res0, ["x", "y", "z"], ["x", "y", "z"],R0[Length(R0)-1] ); |
| |
|
| |
Println("Timing data: sm1 "); sm1(" 1 set_timer "); |
| |
Print(" ox_asir [CPU,GC]: ");Println(asssssir.OffTimer()); |
| |
|
| Print("Answer is ");Println(Ans[0]); |
Print("Answer is ");Println(Ans[0]); |
| return(Ans); |
return(Ans); |
| } |
} |
| |
|
| |
/* test data |
| |
|
| |
NoX=true; |
| |
nonquasi2(4,5); |
| |
nonquasi2(4,6); |
| |
nonquasi2(4,7); |
| |
nonquasi2(4,8); |
| |
nonquasi2(4,9); |
| |
nonquasi2(4,10); |
| |
|
| |
nonquasi2(5,6); |
| |
nonquasi2(6,7); |
| |
nonquasi2(7,8); |
| |
nonquasi2(8,9); |
| |
nonquasi2(9,10); |
| |
*/ |
| |
|
| |
P2 = [ |
| |
"x^3-y^2", |
| |
"y^2-x^3-x-1", |
| |
"y^2-x^5-x-1", |
| |
"y^2-x^7-x-1", |
| |
"y^2-x^9-x-1", |
| |
"y^2-x^11-x-1" |
| |
]; |
| |
|
| |
P3 = [ |
| |
"x^3-y^2*z^2", |
| |
"x^2*z+y^3+y^2*z+z^3", |
| |
"y*z^2+x^3+x^2*y^2+y^6", |
| |
"x*z^2+x^2*y+x*y^3+y^5" |
| |
]; |
| |
|
| |
|
| |
|