Writes the system to temporary files
Extends the ring with slack variables
Uses surplus variables when the initial system is overconstrained
Invokes the command phc -c (with option 1).
Stores output of phc in temporary file
Parses and outputs the solutions.
To compute generic points of a k-dimensional solution set of a polynomial system, we add k random linear equations to the system.
i1 : R = CC[x,y,z]; |
i2 : f = { x^2 - y, x^3 - z }; |
i3 : fe1 = constructEmbedding(f,1); |
i4 : toString fe1 o4 = {x^2-y+(-.810346-.585952*ii)*zz1, x^3-z+(.614234+.789124*ii)*zz1, zz1, (-.693091+.72085*ii)*x+(.748125+.663558*ii)*y+(.449879-.893089*ii)*z +(-.946093+.323896*ii)*zz1-.913445+.406963*ii} |
Note that the ring of the original system is extended with k slack variables. Solutions of the embedded system with zero values for the slack variables are candidate generic points.
If the input system is overdetermined (there are more equations than unknowns), then as many surplus variables are introduced as the difference between the number of equations and the number of variables. Surplus variables start with ss.
i5 : R = CC[x,y,z]; |
i6 : f = { x^2-y, x^3-z, x*y-z, x*z-y^2 }; |
i7 : fe1 = constructEmbedding(f,1); |
i8 : toString fe1 o8 = {x^2-y+(-.0966877-.995315*ii)*ss1+(-.508099-.861299*ii)*zz1, x^3-z+(.226341+.974048*ii)*ss1+(-.868161-.496283*ii)*zz1, x*y-z+(.996174+.0873973*ii)*ss1+(-.748753-.662849*ii)*zz1, -y^2+x*z+(.879154+.476538*ii)*ss1+(.254913-.966964*ii)*zz1, (.995481-.0949657*ii)*x+(-.840023-.542551*ii)*y+(-.996317+.0857457*ii)*z +(.614318-.789059*ii)*ss1+(.0906107-.995886*ii)*zz1-.122412-.992479*ii} |
In the example above, the system f has four equations in three unknowns, constructEmbedding adds one surplus variable and one slack variable. Only solutions with zero values for the surplus variable are relevant.