A typical application is to find solutions for slices with real coefficients.
i1 : R=CC[a,b,c,d]; |
i2 : M=matrix for i to 2 list for j to 3 list random(1,R)+random(0,R);
-- warning: experimental computation over inexact field begun
-- results not reliable (one warning given per session)
3 4
o2 : Matrix R <--- R
|
i3 : I=minors(3,M); o3 : Ideal of R |
i4 : f=flatten entries gens I; |
i5 : (w,ns) = topWitnessSet(f,2); |
i6 : slcmat = matrix applyTable (entries w.Slice, x->1_CC*realPart x);
2 7
o6 : Matrix CC <--- CC
53 53
|
i7 : Rtwo = ring w.Equations; |
i8 : X = transpose matrix {gens Rtwo | {1_CC}};
7 1
o8 : Matrix Rtwo <--- Rtwo
|
i9 : slcRR = flatten entries (promote(slcmat,Rtwo) * X); |
i10 : fsols = intersectSlice(w,slcRR)
o10 = {{.278563-.243312*ii, -.092976+.923912*ii, -.508131+.698273*ii,
-----------------------------------------------------------------------
-1.23146-.008271*ii, 2.40419e-15+2.72257e-15*ii,
-----------------------------------------------------------------------
-2.43538e-15-3.91302e-15*ii}, {-18.336+8.26936*ii, 3.7764-9.67765*ii,
-----------------------------------------------------------------------
-13.7891-2.04541*ii, -1.28993+.094382*ii, -7.70412e-12-1.90445e-12*ii,
-----------------------------------------------------------------------
-1.06457e-11-2.38457e-11*ii}, {-5.13593-9.35491*ii, 7.19369+7.77241*ii,
-----------------------------------------------------------------------
1.77961-.856406*ii, -1.30143-.079476*ii, -8.17689e-13+7.72829e-13*ii,
-----------------------------------------------------------------------
-4.95576e-13-2.07459e-12*ii}, {.171703+.292386*ii, .372401-.2657*ii,
-----------------------------------------------------------------------
-.141952+.0040302*ii, -1.23561+.00268*ii, -1.73793e-15-4.06085e-15*ii,
-----------------------------------------------------------------------
2.85695e-15+1.00494e-15*ii}, {.07266-.862383*ii, .515658+.767545*ii,
-----------------------------------------------------------------------
-.0901531-.0279888*ii, -1.23697-.007765*ii,
-----------------------------------------------------------------------
-3.08113e-15-2.49173e-15*ii, 4.97412e-15+2.95249e-15*ii},
-----------------------------------------------------------------------
{.903518-2.84996*ii, 3.23789-.3435*ii, 3.39272-2.9677*ii,
-----------------------------------------------------------------------
-1.25924-.000908*ii, -1.28671e-13-5.378e-14*ii,
-----------------------------------------------------------------------
6.62906e-14-9.24819e-14*ii}}
o10 : List
|
The object intersectSlice is a method function.