version 1.11, 2000/12/08 08:26:08 |
version 1.12, 2000/12/11 02:00:40 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/dp.c,v 1.10 2000/12/08 06:43:09 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/builtin/dp.c,v 1.11 2000/12/08 08:26:08 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "base.h" |
#include "base.h" |
|
|
void Pdp_weyl_red(),Pdp_weyl_sp(),Pdp_weyl_nf(); |
void Pdp_weyl_red(),Pdp_weyl_sp(),Pdp_weyl_nf(); |
void Pdp_weyl_gr_main(),Pdp_weyl_gr_mod_main(); |
void Pdp_weyl_gr_main(),Pdp_weyl_gr_mod_main(); |
void Pdp_weyl_f4_main(),Pdp_weyl_f4_mod_main(); |
void Pdp_weyl_f4_main(),Pdp_weyl_f4_mod_main(); |
|
void Pdp_weyl_mul(); |
|
|
struct ftab dp_tab[] = { |
struct ftab dp_tab[] = { |
/* content reduction */ |
/* content reduction */ |
Line 115 struct ftab dp_tab[] = { |
|
Line 116 struct ftab dp_tab[] = { |
|
{"dp_f4_mod_main",Pdp_f4_mod_main,4}, |
{"dp_f4_mod_main",Pdp_f4_mod_main,4}, |
|
|
/* weyl algebra */ |
/* weyl algebra */ |
|
/* multiplication */ |
|
{"dp_weyl_mul",Pdp_weyl_mul,2}, |
|
|
/* s-poly */ |
/* s-poly */ |
{"dp_weyl_sp",Pdp_weyl_sp,2}, |
{"dp_weyl_sp",Pdp_weyl_sp,2}, |
|
|
|
|
DP g; |
DP g; |
int full; |
int full; |
|
|
do_weyl = 1; |
|
asir_assert(ARG0(arg),O_LIST,"dp_weyl_nf"); |
asir_assert(ARG0(arg),O_LIST,"dp_weyl_nf"); |
asir_assert(ARG1(arg),O_DP,"dp_weyl_nf"); |
asir_assert(ARG1(arg),O_DP,"dp_weyl_nf"); |
asir_assert(ARG2(arg),O_VECT,"dp_weyl_nf"); |
asir_assert(ARG2(arg),O_VECT,"dp_weyl_nf"); |
|
|
} |
} |
b = BDY((LIST)ARG0(arg)); ps = (DP *)BDY((VECT)ARG2(arg)); |
b = BDY((LIST)ARG0(arg)); ps = (DP *)BDY((VECT)ARG2(arg)); |
full = (Q)ARG3(arg) ? 1 : 0; |
full = (Q)ARG3(arg) ? 1 : 0; |
|
do_weyl = 1; |
dp_nf_ptozp(b,g,ps,full,DP_Multiple,rp); |
dp_nf_ptozp(b,g,ps,full,DP_Multiple,rp); |
|
do_weyl = 0; |
} |
} |
|
|
void Pdp_true_nf(arg,rp) |
void Pdp_true_nf(arg,rp) |
|
|
dp_subd(p1,p2,rp); |
dp_subd(p1,p2,rp); |
} |
} |
|
|
|
void Pdp_weyl_mul(arg,rp) |
|
NODE arg; |
|
DP *rp; |
|
{ |
|
DP p1,p2; |
|
|
|
p1 = (DP)ARG0(arg); p2 = (DP)ARG1(arg); |
|
asir_assert(p1,O_DP,"dp_weyl_mul"); asir_assert(p2,O_DP,"dp_mul"); |
|
do_weyl = 1; |
|
muld(CO,p1,p2,rp); |
|
do_weyl = 0; |
|
} |
|
|
void Pdp_red(arg,rp) |
void Pdp_red(arg,rp) |
NODE arg; |
NODE arg; |
LIST *rp; |
LIST *rp; |
|
|
DP head,rest,dmy1; |
DP head,rest,dmy1; |
P dmy; |
P dmy; |
|
|
do_weyl = 1; |
|
asir_assert(ARG0(arg),O_DP,"dp_weyl_red"); |
asir_assert(ARG0(arg),O_DP,"dp_weyl_red"); |
asir_assert(ARG1(arg),O_DP,"dp_weyl_red"); |
asir_assert(ARG1(arg),O_DP,"dp_weyl_red"); |
asir_assert(ARG2(arg),O_DP,"dp_weyl_red"); |
asir_assert(ARG2(arg),O_DP,"dp_weyl_red"); |
|
do_weyl = 1; |
dp_red((DP)ARG0(arg),(DP)ARG1(arg),(DP)ARG2(arg),&head,&rest,&dmy,&dmy1); |
dp_red((DP)ARG0(arg),(DP)ARG1(arg),(DP)ARG2(arg),&head,&rest,&dmy,&dmy1); |
|
do_weyl = 0; |
NEWNODE(n); BDY(n) = (pointer)head; |
NEWNODE(n); BDY(n) = (pointer)head; |
NEWNODE(NEXT(n)); BDY(NEXT(n)) = (pointer)rest; |
NEWNODE(NEXT(n)); BDY(NEXT(n)) = (pointer)rest; |
NEXT(NEXT(n)) = 0; MKLIST(*rp,n); |
NEXT(NEXT(n)) = 0; MKLIST(*rp,n); |
|
|
{ |
{ |
DP p1,p2; |
DP p1,p2; |
|
|
do_weyl = 1; |
|
p1 = (DP)ARG0(arg); p2 = (DP)ARG1(arg); |
p1 = (DP)ARG0(arg); p2 = (DP)ARG1(arg); |
asir_assert(p1,O_DP,"dp_weyl_sp"); asir_assert(p2,O_DP,"dp_sp"); |
asir_assert(p1,O_DP,"dp_weyl_sp"); asir_assert(p2,O_DP,"dp_sp"); |
|
do_weyl = 1; |
dp_sp(p1,p2,rp); |
dp_sp(p1,p2,rp); |
|
do_weyl = 0; |
} |
} |
|
|
void Pdp_sp_mod(arg,rp) |
void Pdp_sp_mod(arg,rp) |
|
|
int modular; |
int modular; |
struct order_spec ord; |
struct order_spec ord; |
|
|
do_weyl = 1; |
|
asir_assert(ARG0(arg),O_LIST,"dp_weyl_gr_main"); |
asir_assert(ARG0(arg),O_LIST,"dp_weyl_gr_main"); |
asir_assert(ARG1(arg),O_LIST,"dp_weyl_gr_main"); |
asir_assert(ARG1(arg),O_LIST,"dp_weyl_gr_main"); |
asir_assert(ARG2(arg),O_N,"dp_weyl_gr_main"); |
asir_assert(ARG2(arg),O_N,"dp_weyl_gr_main"); |
|
|
else |
else |
modular = QTOS(m); |
modular = QTOS(m); |
create_order_spec(ARG4(arg),&ord); |
create_order_spec(ARG4(arg),&ord); |
|
do_weyl = 1; |
dp_gr_main(f,v,homo,modular,&ord,rp); |
dp_gr_main(f,v,homo,modular,&ord,rp); |
|
do_weyl = 0; |
} |
} |
|
|
void Pdp_weyl_f4_main(arg,rp) |
void Pdp_weyl_f4_main(arg,rp) |
|
|
LIST f,v; |
LIST f,v; |
struct order_spec ord; |
struct order_spec ord; |
|
|
do_weyl = 1; |
|
asir_assert(ARG0(arg),O_LIST,"dp_weyl_f4_main"); |
asir_assert(ARG0(arg),O_LIST,"dp_weyl_f4_main"); |
asir_assert(ARG1(arg),O_LIST,"dp_weyl_f4_main"); |
asir_assert(ARG1(arg),O_LIST,"dp_weyl_f4_main"); |
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); |
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); |
create_order_spec(ARG2(arg),&ord); |
create_order_spec(ARG2(arg),&ord); |
|
do_weyl = 1; |
dp_f4_main(f,v,&ord,rp); |
dp_f4_main(f,v,&ord,rp); |
|
do_weyl = 0; |
} |
} |
|
|
void Pdp_weyl_f4_mod_main(arg,rp) |
void Pdp_weyl_f4_mod_main(arg,rp) |
|
|
int m; |
int m; |
struct order_spec ord; |
struct order_spec ord; |
|
|
do_weyl = 1; |
|
asir_assert(ARG0(arg),O_LIST,"dp_weyl_f4_main"); |
asir_assert(ARG0(arg),O_LIST,"dp_weyl_f4_main"); |
asir_assert(ARG1(arg),O_LIST,"dp_weyl_f4_main"); |
asir_assert(ARG1(arg),O_LIST,"dp_weyl_f4_main"); |
asir_assert(ARG2(arg),O_N,"dp_f4_main"); |
asir_assert(ARG2(arg),O_N,"dp_f4_main"); |
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); m = QTOS((Q)ARG2(arg)); |
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); m = QTOS((Q)ARG2(arg)); |
create_order_spec(ARG3(arg),&ord); |
create_order_spec(ARG3(arg),&ord); |
|
do_weyl = 1; |
dp_f4_mod_main(f,v,m,&ord,rp); |
dp_f4_mod_main(f,v,m,&ord,rp); |
|
do_weyl = 0; |
} |
} |
|
|
void Pdp_weyl_gr_mod_main(arg,rp) |
void Pdp_weyl_gr_mod_main(arg,rp) |
|
|
int m; |
int m; |
struct order_spec ord; |
struct order_spec ord; |
|
|
do_weyl = 1; |
|
asir_assert(ARG0(arg),O_LIST,"dp_weyl_gr_mod_main"); |
asir_assert(ARG0(arg),O_LIST,"dp_weyl_gr_mod_main"); |
asir_assert(ARG1(arg),O_LIST,"dp_weyl_gr_mod_main"); |
asir_assert(ARG1(arg),O_LIST,"dp_weyl_gr_mod_main"); |
asir_assert(ARG2(arg),O_N,"dp_weyl_gr_mod_main"); |
asir_assert(ARG2(arg),O_N,"dp_weyl_gr_mod_main"); |
|
|
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); |
f = (LIST)ARG0(arg); v = (LIST)ARG1(arg); |
homo = (Num)ARG2(arg); m = QTOS((Q)ARG3(arg)); |
homo = (Num)ARG2(arg); m = QTOS((Q)ARG3(arg)); |
create_order_spec(ARG4(arg),&ord); |
create_order_spec(ARG4(arg),&ord); |
|
do_weyl = 1; |
dp_gr_mod_main(f,v,homo,m,&ord,rp); |
dp_gr_mod_main(f,v,homo,m,&ord,rp); |
|
do_weyl = 0; |
} |
} |
|
|