source: git/old_modgen/openmathserver/singulartest.sing @ c36fda

spielwiese
Last change on this file since c36fda was c36fda, checked in by Oleksandr Motsak <motsak@…>, 10 years ago
Moved all the outdated modgen related stuff to /old_modgen/ for now
  • Property mode set to 100644
File size: 1.1 KB
Line 
1ring r=0,(x,y,z,a,b),lp;
2poly f=37x3y+x2yz;
3ideal i=f,f*f,f*f*f;
4LIB "poly.lib";
5ideal i2=cyclic(5);
6
7print(i2);
8LIB("/Users/michael/sing3/modules/python/python_module.so");
9Python_module::python("from interpreter import singular_globals_proxy
10#import psyco
11import sys
12sys.argv=['Singular']
13#import sre_compile
14#psyco.bind(sre_compile._optimize_charset)
15#psyco.log()
16#psyco.profile()
17from CAS.singular import *
18from context import *
19context=Context()
20
21
22import CD.polyd as polyd
23import CAS.singular
24context.addCDImplementation(polyd.implementation)
25
26from CD.polyd import groebnersym
27
28inter=singular_globals_proxy()
29
30
31
32
33cyc3=encodeIdeal(singular.i2)
34ord=encodeOrdering(singular.r)
35gcall=OMApply(groebnersym,[ord,cyc3])
36gcout=open('cyc3om','w')
37gcout.write(context.XMLEncodeObject(gcall))
38gcout.close()
39
40print 'now calculating GB'
41omin=context.XMLEncodeObject(gcall)
42from omxmlreader import *
43def inout(context, infn):
44  doc=readFile(infn)
45  builder=OMFromXMLBuilder()
46  doc=builder.build(doc)
47  doc=context.evaluate(doc)
48  output=context.XMLEncodeObject(doc)
49  gcout=open('cyc3om.out','w')
50  gcout.write(output)
51  gcout.close()
52
53inout(context,'cyc3om')
54
55
56");
57$
Note: See TracBrowser for help on using the repository browser.