Top
Back: nres
Forward: opposite
FastBack: Functions
FastForward: Mathematical background
Up: Functions
Top: Plural Manual
Contents: Table of Contents
Index: Index
About: About this document

3.17 oppose

Syntax:
oppose ( ring_name, name )
Type:
poly, vector, ideal, module or matrix (the same type as the second argument)
Purpose:
for a given object in the given ring, creates its opposite object in the opposite ring (the last one is assumed to be the current ring).
Remark:
for an object $O, (O^opp)^opp = O$.
 
LIB "ncalg.lib";
def r = sl2();
setring r;
poly   p = (h^2-1)*f*e;
vector v = [1,e*h,0,p];
ideal  i = h*e, f^2*e,h*f*e;
matrix m[3][4]=e,f,h,1,0,h^2, p,0,0,1,e^2,e*f*h+1;
module mm =module(m); 
def b = opposite(r);
setring b; b;   // we will oppose this collection of objects
==> //   characteristic : 0
==> //   number of vars : 3
==> //        block   1 : ordering a
==> //                  : names    H F E 
==> //                  : weights  1 1 1 
==> //        block   2 : ordering ls
==> //                  : names    H F E 
==> //        block   3 : ordering C
==> //   noncommutative relations:
==> //    FH=HF-2F
==> //    EH=HE+2E
==> //    EF=FE-H
poly P    = oppose(r,p); 
vector V  = oppose(r,v);
ideal I   = oppose(r,i);
matrix M  = oppose(r,m);
module MM = oppose(r,mm);
// now let's check the correctness:
setring r;
print(matrix(oppose(b,P)-p));
==> 0
print(matrix(oppose(b,V)-v));
==> 0
print(matrix(oppose(b,I)-i));
==> 0,0,0
print(matrix(oppose(b,M)-m));
==> 0,0,0,0,
==> 0,0,0,0,
==> 0,0,0,0 
print(matrix(oppose(b,MM)-mm));
==> 0,0,0,0,
==> 0,0,0,0,
==> 0,0,0,0 
See envelope; opposite.


Top Back: nres Forward: opposite FastBack: Functions FastForward: Mathematical background Up: Functions Top: Plural Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 2-1-99, August 2004, generated by texi2html.