[BACK]Return to cyclic CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / lib

Annotation of OpenXM_contrib2/asir2000/lib/cyclic, Revision 1.1

1.1     ! noro        1: /* $OpenXM: OpenXM/src/asir99/lib/cyclic,v 1.1.1.1 1999/11/10 08:12:30 noro Exp $ */
        !             2: def mkc(L,N)
        !             3: {
        !             4:        if (L >= N) L -= N;
        !             5:        if (L >= 0)
        !             6:                return strtov("c"+rtostr(L));
        !             7:        return 0;
        !             8: }
        !             9:
        !            10: /* generate cyclic N-th roots systems */
        !            11:
        !            12: def cyclic(N)
        !            13: {
        !            14:        R = [];
        !            15:        for (L = 1; L <= N; L++) {
        !            16:                for (A = 0, I = 0; I <= N-1; I++) {
        !            17:                        for (B = 1,J = I; J < L+I; J++) {
        !            18:                                B *= mkc(J,N);
        !            19:                        }
        !            20:                        A += B;
        !            21:                }
        !            22:                A = ptozp(A);
        !            23:                if (L == N)
        !            24:                        A += -1;
        !            25:                R = cons(A,R);
        !            26:        }
        !            27:        return R;
        !            28: }
        !            29:
        !            30: /* generate homogenized cyclic N-th roots systems */
        !            31:
        !            32: def hcyclic(N)
        !            33: {
        !            34:        R = [];
        !            35:        for (L = 1; L <= N; L++) {
        !            36:                for (A = 0, I = 0; I <= N-1; I++) {
        !            37:                        for (B = 1,J = I; J < L+I; J++) {
        !            38:                                B *= mkc(J,N);
        !            39:                        }
        !            40:                        A += B;
        !            41:                }
        !            42:                A = ptozp(A);
        !            43:                if (L == N)
        !            44:                        A += -c^N;
        !            45:                R = cons(A,R);
        !            46:        }
        !            47:        return R;
        !            48: }
        !            49:
        !            50: def homo(X)
        !            51: {
        !            52:        X=nm(red(subst(X,a,a/t,b,b/t,c,c/t)));
        !            53: }
        !            54:
        !            55: BJ6 = [a^2*b*c+a*b^2*c+a*b*c^2+a*b+b*c+c*a,a^2*b^2*c+a*b^2*c^2+b*c^2+c+a+a^2*b,
        !            56: a^2*b^2*c^2+b^2*c^2+c^2+1+a^2+a^2*b^2]$
        !            57: HBJ6 = [homo(BJ6[0]),homo(BJ6[1]),homo(BJ6[2])]$
        !            58: BJ7 = [nm(red(a+b+c+1+1/c+1/b+1/a)),nm(red(a*b+b*c+c+1/c+1/(b*c)+1/(a*b)+1)),
        !            59: nm(red(a*b*c+b*c+1+1/(b*c)+1/(a*b*c)+1/b+b))]$
        !            60: HBJ7 = [homo(BJ7[0]),homo(BJ7[1]),homo(BJ7[2])]$
        !            61: end$

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>