Re: [sage-support] Re: Group action

2013-04-20 Thread Johannes
thnx,
this looks nice. I'll have a deeper look at it in the next days.

bg,
Johannes

On 19.04.2013 17:53, Simon King wrote:
 Hi Johannes,
 
 On 2013-04-18, Johannes dajo.m...@web.de wrote:
 Hi guys,

 I have the following setting: Given a finite subgroup G of GL_\C(n) of
 order k, acting on C[x_1,...,x_n] by multiplication with (potenz of a )
 k-th root of unity. What is the best way, to translate this setting to sage?
 In the end I'm interested into the ring of invariants under G and it's
 representation as quotient.
 
 Towards an answer:
 
 Since you want to compute an invariant ring, and since CC is not exactly
 a field (rounding errors), it might make sense to work over a number
 field that contains a k-th root of unity. For example:
 
 # Create the number field
 sage: F.zeta = NumberField(x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)
 sage: zeta^7 == 1
 True
 # Create a 3x3 matrix that acts by multiplication with zeta
 sage: MS = MatrixSpace(F, 3)
 sage: g = MS(zeta)
 # Create the corresponding matrix group. It has the correct order
 # Note that the method multiplicative_order or the matrix fails!
 sage: G = MatrixGroup([g])
 sage: G.order()
 7
 # Compute a minimal generating set of the invariant ring, as a sub-ring
 sage: G.invariant_generators()
 [x3^7,
  x2*x3^6,
  x1*x3^6,
  x2^2*x3^5,
  x1*x2*x3^5,
  x1^2*x3^5,
  x2^3*x3^4,
  x1*x2^2*x3^4,
  x1^2*x2*x3^4,
  x1^3*x3^4,
  x2^4*x3^3,
  x1*x2^3*x3^3,
  x1^2*x2^2*x3^3,
  x1^3*x2*x3^3,
  x1^4*x3^3,
  x2^5*x3^2,
  x1*x2^4*x3^2,
  x1^2*x2^3*x3^2,
  x1^3*x2^2*x3^2,
  x1^4*x2*x3^2,
  x1^5*x3^2,
  x2^6*x3,
  x1*x2^5*x3,
  x1^2*x2^4*x3,
  x1^3*x2^3*x3,
  x1^4*x2^2*x3,
  x1^5*x2*x3,
  x1^6*x3,
  x2^7,
  x1*x2^6,
  x1^2*x2^5,
  x1^3*x2^4,
  x1^4*x2^3,
  x1^5*x2^2,
  x1^6*x2,
  x1^7]
 
 So, the invariant ring could be represented as a ring with not less than
 36 generators, modulo algebraic relations. Now, I am afraid I don't know
 an easy way to find algebraic relations of the above sub-algebra
 generators---I am afraid I can't answer how to represent it as a
 quotient ring.
 
 Best regards,
 Simon
 

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: plot3d using real-valued real-parameter functions but involving complex numbers as intermediates

2013-04-20 Thread P Purkayastha

On 04/18/2013 03:13 AM, Gary McConnell wrote:

I am very keen to help - my problem is utter incompetence at following
the high-level instructions in the manual for developers. Also I am on
the VM and I cannot access the sage directories directly. Is there a way
you could send me a manual file that I could modify and send back to
you? Sorry :( I promise I will learn this one day ...

the page I was referring to is
http://www.sagemath.org/doc/reference/numerical/sage/numerical/optimize.html#sage.numerical.optimize.minimize

Also there are presumably many functions to which this syntax difference
applies ... how can I find them?

Thanks!


I failed to notice this reply earlier.

I think it is better if you can submit a patch to trac. The patch is 
generated by mercurial and it can automatically populate the author 
attribution and other information. These information is used by a 
patchbot that automatically tests the patches for validity and performs 
other tests.


To generate the patch, you can either install the sage library code.

If you don't want to install the sage from source, you can download the 
sage spkg and work with that.  This is OK since you intend to do only 
documentation changes. In this case, follow the steps below:


1. download the sage spkg from 
http://www.sagemath.org/packages/standard/sage-5.8.spkg

This contains the source code.

2. Create a file in $HOME/.hgrc containing your name as mentioned here:
http://www.sagemath.org/doc/developer/producing_patches.html

3. Open a ticket in trac so that you can get the ticket number. Let's 
say the number is 12345.


4. Use the inbuilt mercurial inside Sage to create the patch.
 i) First change directory to the unpacked sage/sage directory
ii) Next, run the command (where /path/to/sage is where the sage script 
is present and 12345 is the ticket number)

/path/to/sage -hg qnew 12345_documentation.patch
iii) Hack hack hack and make your changes :)
You will need to follow the developer documentation for syntax and 
formatting.

iv) Now that you are satisfied with your changes, run
/path/to/sage -hg qref -m a one line description of your changes
v) Make hg generate the patch:
/path/to/sage -hg export qtip  ~/$(/path/to/sage -hg qtop)

5. Go back to the ticket and upload the patch that is present at 
~/12345_documentation.patch


Hopefully, this procedure will become much simpler after the move to 
git, since trivial changes can be made directly in github (if the 
project remains hosted in github).


--
You received this message because you are subscribed to the Google Groups 
sage-support group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Conjunctive Normal Form

2013-04-20 Thread Santanu Sarkar
Dear all,
  I want to convert the polynomial f into Conjunctive Normal Form (CNF)
in Sage. How can I do this?


B.a,b,c = BooleanPolynomialRing()
f=a+b*c

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[sage-support] Re: Conjunctive Normal Form

2013-04-20 Thread Maarten Derickx
sage: import sage.logic.propcalc as propcalc
sage: f = propcalc.formula(a^(bc))
sage: f.convert_cnf()
sage: f
(a|b|c)(a|b|~c)(a|~b|c)(~a|~b|~c)


Le samedi 20 avril 2013 20:39:47 UTC+2, Santanu a écrit :

 Dear all, 
   I want to convert the polynomial f into Conjunctive Normal Form (CNF)
 in Sage. How can I do this? 


 B.a,b,c = BooleanPolynomialRing()
 f=a+b*c
  

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [sage-support] Conjunctive Normal Form

2013-04-20 Thread Martin Albrecht
sage: B.a,b,c = BooleanPolynomialRing()
sage: f=a+b*c
sage: from sage.sat.converters.polybori import CNFEncoder
sage: from sage.sat.solvers.dimacs import DIMACS 
sage: solver = DIMACS()
sage: ce = CNFEncoder(solver, B)
sage: ce([f])
[None, a, b, c]
sage: solver.clauses()
[((-2, -3, 1), False, None), ((3, -1), False, None), ((2, -1), False, None)]


On Saturday 20 Apr 2013, Santanu Sarkar wrote:
 Dear all,
   I want to convert the polynomial f into Conjunctive Normal Form (CNF)
 in Sage. How can I do this?
 
 
 B.a,b,c = BooleanPolynomialRing()
 f=a+b*c

Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinralbre...@jabber.ccc.de

-- 
You received this message because you are subscribed to the Google Groups 
sage-support group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.