ATPとCASのこと

2017-07-17

実行例(4)

(%i1) (qvpeds ([],[a,b,c,d],0,h1,r11,0 ),
       qe( bfpcad(ext( '(  a^3+b^2-1=0 and b^3+c^2-1=0 and c^3+d^2-1=0 and d^3+a^2-1=0  ) )))  );
Evaluation took 14.3200 seconds (16.7700 elapsed) using 2101.559 MB.
(%o1) [[a = root(a,1),b = root(b^2+a^3-1,2),
        c = root(c^9-3*c^6+3*c^3+a^4-2*a^2,1),d = root(d^3+a^2-1,1)],
       [a = root(a^3+a^2-1,1),
        b = root(b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12
                     +a^4*(6*b^9-18*b^6+18*b^3-2)+33*b^9
                     +a^2*((-12*b^9)+36*b^6-36*b^3+12)-18*b^6+18*b^3+a^8-4*a^6
                     -7,1),c = root(c^9-3*c^6+3*c^3+a^4-2*a^2,1),
        d = root(d^2+c^3-1,2)],
       [a = root(a-1,1),b = root(b^2+a^3-1,1),c = root(c^2+b^3-1,2),
        d = root(d^3+a^2-1,1)]]

(%i2) (qvpeds ([],[a,b,c,d],1,h1,r11,0 ),
       qe( bfpcad(ext( '(  a^3+b^2-1=0 and b^3+c^2-1=0 and c^3+d^2-1=0 and d^3+a^2-1=0  ) )))  );

[fpprec,fpprintprec,%ez,ratepsilon]: [16,30,1.0b-3,1.0b-16] 
equal(b^2+a^3-1,0) and equal(c^2+b^3-1,0) and equal(d^2+c^3-1,0)
                   and equal(d^3+a^2-1,0)
  
["and",equal(d^3+a^2-1,0),equal(d^2+c^3-1,0),equal(c^2+b^3-1,0),
 equal(b^2+a^3-1,0)]
  
[[a-1,a,a+1,a^2-2,a^3+a^2-1,a^4-2*a^2-7,a^9-3*a^6+3*a^3-4,
  a^25+2*a^24+3*a^23-5*a^22-13*a^21-21*a^20+7*a^19+35*a^18+63*a^17-26*a^16
      -115*a^15-204*a^14+31*a^13+266*a^12+501*a^11+115*a^10-271*a^9-657*a^8
      -290*a^7+77*a^6+444*a^5+253*a^4+62*a^3-135*a^2-98*a-49,
  a^27-9*a^24+36*a^21-81*a^18+108*a^15-81*a^12+9*a^9+54*a^6-54*a^3+33],
 [b-1,b,a^3+b^2-1,b^2+b+1,b^6-3*b^3+3,b^9-3*b^6+3*b^3-4,
  a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7],
 [c-1,c^2+b^3-1,c^2+c+1,c^9-3*c^6+3*c^3+a^4-2*a^2],[d^2+c^3-1,d^3+a^2-1]]
  
1 multi-roots: 0.0b0 0.0b0 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+75*b^9-144*b^6+144*b^3] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+75*b^9-144*b^6+144*b^3] 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
1 multi-roots: (-8.660804423214204b-1*%i)-5.000441678406675b-1 
 (-8.659596311546991b-1*%i)-5.000255856711448b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 1.222318903917476b-4 
2 multi-roots: (-8.659596311546991b-1*%i)-5.000255856711448b-1 
 (-8.660361378779625b-1*%i)-4.999302464884673b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 1.222409033757573b-4 
3 multi-roots: 8.660599669975173b-1*%i-5.000356595414205b-1 
 8.659772383882947b-1*%i-5.000121050417724b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 8.601649398563011b-5 
4 multi-roots: 8.659772383882947b-1*%i-5.000121050417724b-1 
 8.660390059677586b-1*%i-4.999522354169911b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 8.602096165627294b-5 
5 multi-roots: 2.231315975623363b-5*%i+9.999456693238325b-1 
 1.000007845795338b0-5.8207805235442b-5*%i 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 1.017326860553025b-4 
6 multi-roots: 1.000007845795338b0-5.8207805235442b-5*%i 
 3.589464596707269b-5*%i+1.000046484881349b0 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 1.017263500284118b-4 
1 multi-roots: (-9.199710801626131b-1*%i)-7.71947399037216b-1 
 (-9.199710804360586b-1*%i)-7.719473929391142b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 6.104229478123359b-9 
2 multi-roots: (-9.199710804360586b-1*%i)-7.719473929391142b-1 
 (-9.199710825477433b-1*%i)-7.719473924291037b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 2.172400328519447b-9 
3 multi-roots: 9.199708723835111b-1*%i-7.719494718698244b-1 
 9.19972984231248b-1*%i-7.71946537008062b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 3.615703863455374b-6 
4 multi-roots: 9.19972984231248b-1*%i-7.71946537008062b-1 
 9.199693865316476b-1*%i-7.719461755275532b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 3.61581395716781b-6 
5 multi-roots: (-1.128504487190754b0*%i)-4.107493297893198b-1 
 (-1.128519218977068b0*%i)-4.107484344965202b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 1.475896599372942b-5 
6 multi-roots: (-1.128519218977068b0*%i)-4.107484344965202b-1 
 (-1.128511078256128b0*%i)-4.107361243173334b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 1.475845008925132b-5 
7 multi-roots: 1.128511588695093b0*%i-4.107446393024692b-1 
 1.128511596096971b0*%i-4.107446267335344b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 1.458649779375334b-8 
8 multi-roots: 1.128511596096971b0*%i-4.107446267335344b-1 
 1.128511599631896b0*%i-4.107446225671621b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 5.463913988241733b-9 
9 multi-roots: 0.0b0 0.0b0 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
10 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
11 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
12 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
13 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
14 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
15 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
16 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
17 multi-roots: 1.182691836749522b0-2.085404757701443b-1*%i 
  1.182692087088606b0-2.085407026268325b-1*%i 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 3.378366674990088b-7 
18 multi-roots: 1.182692087088606b0-2.085407026268325b-1*%i 
  1.182692149170476b0-2.085403628805644b-1*%i 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 3.453718073079048b-7 
19 multi-roots: 2.085405167216828b-1*%i+1.182692020651834b0 
  2.085404528573458b-1*%i+1.182692021812494b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 6.387488296457688b-8 
20 multi-roots: 2.085404528573458b-1*%i+1.182692021812494b0 
  2.085405716985108b-1*%i+1.18269203054428b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 1.191615147068571b-7 
common-roots: 1.346676703722613b0 1.346676703722613b0 
dist: 1.665334536937735b-16 
1 multi-roots: (-8.660804423214204b-1*%i)-5.000441678406675b-1 
 (-8.659596311546991b-1*%i)-5.000255856711448b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 1.222318903917476b-4 
2 multi-roots: (-8.659596311546991b-1*%i)-5.000255856711448b-1 
 (-8.660361378779625b-1*%i)-4.999302464884673b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 1.222409033757573b-4 
3 multi-roots: 8.660599669975173b-1*%i-5.000356595414205b-1 
 8.659772383882947b-1*%i-5.000121050417724b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 8.601649398563011b-5 
4 multi-roots: 8.659772383882947b-1*%i-5.000121050417724b-1 
 8.660390059677586b-1*%i-4.999522354169911b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 8.602096165627294b-5 
5 multi-roots: 2.231315975623363b-5*%i+9.999456693238325b-1 
 1.000007845795338b0-5.8207805235442b-5*%i 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 1.017326860553025b-4 
6 multi-roots: 1.000007845795338b0-5.8207805235442b-5*%i 
 3.589464596707269b-5*%i+1.000046484881349b0 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7] 
dist: 1.017263500284118b-4 
common-roots: 1.0b0 1.0b0 
dist: 0.0b0 
common-roots: 7.548776662466926b-1 7.548776662466838b-1 
dist: 8.743006318923108b-15 
1 multi-roots: 0.0b0 0.0b0 [a^3+b^2-1,b^2] 
dist: 0.0b0 
1 multi-roots: (-9.199710801626131b-1*%i)-7.71947399037216b-1 
 (-9.199710804360586b-1*%i)-7.719473929391142b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 6.104229478123359b-9 
2 multi-roots: (-9.199710804360586b-1*%i)-7.719473929391142b-1 
 (-9.199710825477433b-1*%i)-7.719473924291037b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 2.172400328519447b-9 
3 multi-roots: 9.199708723835111b-1*%i-7.719494718698244b-1 
 9.19972984231248b-1*%i-7.71946537008062b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 3.615703863455374b-6 
4 multi-roots: 9.19972984231248b-1*%i-7.71946537008062b-1 
 9.199693865316476b-1*%i-7.719461755275532b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 3.61581395716781b-6 
5 multi-roots: (-1.128504487190754b0*%i)-4.107493297893198b-1 
 (-1.128519218977068b0*%i)-4.107484344965202b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 1.475896599372942b-5 
6 multi-roots: (-1.128519218977068b0*%i)-4.107484344965202b-1 
 (-1.128511078256128b0*%i)-4.107361243173334b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 1.475845008925132b-5 
7 multi-roots: 1.128511588695093b0*%i-4.107446393024692b-1 
 1.128511596096971b0*%i-4.107446267335344b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 1.458649779375334b-8 
8 multi-roots: 1.128511596096971b0*%i-4.107446267335344b-1 
 1.128511599631896b0*%i-4.107446225671621b-1 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 5.463913988241733b-9 
9 multi-roots: 0.0b0 0.0b0 
 [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
     -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
  b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
10 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
11 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
12 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
13 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
14 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
15 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
16 multi-roots: 0.0b0 0.0b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 0.0b0 
17 multi-roots: 1.182691836749522b0-2.085404757701443b-1*%i 
  1.182692087088606b0-2.085407026268325b-1*%i 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 3.378366674990088b-7 
18 multi-roots: 1.182692087088606b0-2.085407026268325b-1*%i 
  1.182692149170476b0-2.085403628805644b-1*%i 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 3.453718073079048b-7 
19 multi-roots: 2.085405167216828b-1*%i+1.182692020651834b0 
  2.085404528573458b-1*%i+1.182692021812494b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 6.387488296457688b-8 
20 multi-roots: 2.085404528573458b-1*%i+1.182692021812494b0 
  2.085405716985108b-1*%i+1.18269203054428b0 
  [a^8-4*a^6+(6*b^9-18*b^6+18*b^3-2)*a^4+((-12*b^9)+36*b^6-36*b^3+12)*a^2+b^27
      -9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+33*b^9-18*b^6+18*b^3-7,
   b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12+27*b^9] 
dist: 1.191615147068571b-7 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
1 multi-roots: 9.802492832500017b-24*%i-3.332445010132976b-6 
 1.666222505066488b-6-2.885982035489848b-6*%i 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3+1.110223024625157b-16] 
dist: 5.771964070979697b-6 
2 multi-roots: 1.666222505066488b-6-2.885982035489848b-6*%i 
 2.885982035489848b-6*%i+1.666222505066488b-6 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3+1.110223024625157b-16] 
dist: 5.771964070979697b-6 
1 multi-roots: (-8.660255628474419b-1*%i)-5.00000111173379b-1 
 (-8.660252247378837b-1*%i)-5.000000835080218b-1 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1.0b0] 
dist: 3.392395102543312b-7 
2 multi-roots: (-8.660252247378837b-1*%i)-5.000000835080218b-1 
 (-8.660254237679908b-1*%i)-4.999998053185997b-1 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1.0b0] 
dist: 3.420560452027647b-7 
3 multi-roots: 8.660254036658418b-1*%i-5.000000000446686b-1 
 8.660254038379494b-1*%i-4.999999999906503b-1 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1.0b0] 
dist: 1.803856285841607b-10 
4 multi-roots: 8.660254038379494b-1*%i-4.999999999906503b-1 
 8.660254038495248b-1*%i-4.999999999646812b-1 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1.0b0] 
dist: 2.843207457168711b-11 
5 multi-roots: 1.632012483901229b-10*%i+9.999999990929849b-1 
 1.000000000452425b0-8.155697400955311b-11*%i 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1.0b0] 
dist: 1.381297987296357b-9 
6 multi-roots: 1.000000000452425b0-8.155697400955311b-11*%i 
 1.000000000454591b0-8.164377541315077b-11*%i 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1.0b0] 
dist: 2.167145783155763b-12 
1 multi-roots: 0.0b0 0.0b0 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [c^2+b^3-1,c^2] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3] 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: 7.548776662466963b-1 7.548776662466864b-1 
dist: 9.867107131356079b-15 
1 multi-roots: (-8.660255628474419b-1*%i)-5.00000111173379b-1 
 (-8.660252247378837b-1*%i)-5.000000835080218b-1 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1] 
dist: 3.392395102543312b-7 
2 multi-roots: (-8.660252247378837b-1*%i)-5.000000835080218b-1 
 (-8.660254237679908b-1*%i)-4.999998053185997b-1 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1] 
dist: 3.420560452027647b-7 
3 multi-roots: 8.660254036658418b-1*%i-5.000000000446686b-1 
 8.660254038379494b-1*%i-4.999999999906503b-1 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1] 
dist: 1.803856285841607b-10 
4 multi-roots: 8.660254038379494b-1*%i-4.999999999906503b-1 
 8.660254038495248b-1*%i-4.999999999646812b-1 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1] 
dist: 2.843207457168711b-11 
5 multi-roots: 1.632012483901229b-10*%i+9.999999990929849b-1 
 1.000000000452425b0-8.155697400955311b-11*%i 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1] 
dist: 1.381297987296357b-9 
6 multi-roots: 1.000000000452425b0-8.155697400955311b-11*%i 
 1.000000000454591b0-8.164377541315077b-11*%i 
 [c^9-3*c^6+3*c^3+a^4-2*a^2,c^9-3*c^6+3*c^3-1] 
dist: 2.167145783155763b-12 
common-roots: 1.0b0 1.0b0 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [d^3+a^2-1,d^3] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [d^3+a^2-1,d^3] 
dist: 0.0b0 
common-roots: 1.0b0 1.0b0 
dist: 0.0b0 
common-roots: 7.548776662466929b-1 7.548776662466925b-1 
dist: 4.440892098500626b-16 
1 multi-roots: 0.0b0 0.0b0 [d^3+a^2-1,d^3] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [d^3+a^2-1,d^3] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [d^2+c^3-1,d^2] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [d^3+a^2-1,d^3] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [d^3+a^2-1,d^3] 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
[T,F]: [3,440] 
Evaluation took 14.8600 seconds (17.4500 elapsed) using 2063.632 MB.
(%o2) [[a = root(a,1),b = root(b^2+a^3-1,2),
        c = root(c^9-3*c^6+3*c^3+a^4-2*a^2,1),d = root(d^3+a^2-1,1)],
       [a = root(a^3+a^2-1,1),
        b = root(b^27-9*b^24+36*b^21-81*b^18+108*b^15-81*b^12
                     +a^4*(6*b^9-18*b^6+18*b^3-2)+33*b^9
                     +a^2*((-12*b^9)+36*b^6-36*b^3+12)-18*b^6+18*b^3+a^8-4*a^6
                     -7,1),c = root(c^9-3*c^6+3*c^3+a^4-2*a^2,1),
        d = root(d^2+c^3-1,2)],
       [a = root(a-1,1),b = root(b^2+a^3-1,1),c = root(c^2+b^3-1,2),
        d = root(d^3+a^2-1,1)]]

2017-07-15

実行例(3)

CGS-EQ の深作亮也先生(東京理科大)のサイト

http://www.rs.tus.ac.jp/fukasaku/software/CGSQE-20160509/benchmark/computation-time/

http://www.rs.tus.ac.jp/fukasaku/software/CGSQE-20160509/benchmark/input/04/log/

出典

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.642.8545&rep=rep1&type=pdf Example 9

Maxima 5.39.0 http://maxima.sourceforge.net
using Lisp CMU Common Lisp 21b (21B Unicode)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.

(%i1) (qvpeds ([ex,ex],[x,y,z],0,0,r11,0 ),
       qe( bfpcad(ext( '(     x^2+y^2*z+z^3=0 and 3*x^2+3*y^2+z^2-1=0 and x^2+z^2-y^3*(y-1)^3<0   ) )))  );
Evaluation took 34.9400 seconds (34.9500 elapsed) using 4777.359 MB.
(%o1) [[root(387420489*x^36+473513931*x^34+1615049199*x^32-5422961745*x^30
                           +2179233963*x^28-14860773459*x^26+43317737551*x^24
                           -45925857657*x^22+60356422059*x^20
                           -126478283472*x^18+164389796305*x^16
                           -121571730573*x^14+54842719755*x^12
                           -16059214980*x^10+3210573925*x^8-446456947*x^6
                           +43657673*x^4-1631864*x^2-40328,1)
          < x
          and x < root(387420489*x^36+473513931*x^34+1615049199*x^32
                                     -5422961745*x^30+2179233963*x^28
                                     -14860773459*x^26+43317737551*x^24
                                     -45925857657*x^22+60356422059*x^20
                                     -126478283472*x^18+164389796305*x^16
                                     -121571730573*x^14+54842719755*x^12
                                     -16059214980*x^10+3210573925*x^8
                                     -446456947*x^6+43657673*x^4-1631864*x^2
                                     -40328,2),true,true]]

(%i2) (qvpeds ([ex,ex],[x,y,z],1,0,r11,0 ),
       qe( bfpcad(ext( '(     x^2+y^2*z+z^3=0 and 3*x^2+3*y^2+z^2-1=0 and x^2+z^2-y^3*(y-1)^3<0   ) )))  );

[fpprec,fpprintprec,%ez,ratepsilon]: [16,30,1.0b-3,1.0b-16] 
equal(z^3+y^2*z+x^2,0) and equal(z^2+3*y^2+3*x^2-1,0)
                       and z^2-y^6+3*y^5-3*y^4+y^3+x^2 < 0
  
["and",z^2-y^6+3*y^5-3*y^4+y^3+x^2 < 0,equal(z^2+3*y^2+3*x^2-1,0),
 equal(z^3+y^2*z+x^2,0)]
  
[[z^2+3*y^2+3*x^2-1],[z^2-y^6+3*y^5-3*y^4+y^3+x^2],[z^3+y^2*z+x^2]] 
[[3*y^2+3*x^2-1],[y^6-3*y^5+3*y^4-y^3-x^2],
 [y^6-3*y^5+3*y^4-y^3+3*y^2+2*x^2-1],[4*y^6+27*x^4],
 [12*y^6+48*x^2*y^4-16*y^4+63*x^4*y^2-42*x^2*y^2+7*y^2+27*x^6-26*x^4+9*x^2-1],
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13-3*x^2*y^12+114*y^12
      +18*x^2*y^11-76*y^11-45*x^2*y^10+40*y^10+60*x^2*y^9-16*y^9-49*x^2*y^8
      +5*y^8+30*x^2*y^7-y^7+3*x^4*y^6-15*x^2*y^6-9*x^4*y^5+4*x^2*y^5+9*x^4*y^4
      -x^2*y^4-3*x^4*y^3+2*x^4*y^2-x^6-x^4]]
  
[[x,x^2-2,2*x^2-1,3*x^2-1,27*x^6-155*x^4+9*x^2-1,27*x^6-26*x^4+9*x^2-1,
  54*x^6-297*x^4+18*x^2-2,108*x^6-837*x^4+36*x^2-4,
  729*x^12+729*x^10+1215*x^8-6129*x^6+4185*x^4-504*x^2-8,
  387420489*x^36+473513931*x^34+926301663*x^32-4590725139*x^30+3855398877*x^28
                -5886383967*x^26+14051402938*x^24-13565732679*x^22
                +9151246767*x^20-15472018962*x^18+21618673717*x^16
                -15614937665*x^14+6066412333*x^12-1269760998*x^10
                +127675066*x^8-3130295*x^6-196075*x^4-2296*x^2-8,
  387420489*x^36+473513931*x^34+1615049199*x^32-5422961745*x^30
                +2179233963*x^28-14860773459*x^26+43317737551*x^24
                -45925857657*x^22+60356422059*x^20-126478283472*x^18
                +164389796305*x^16-121571730573*x^14+54842719755*x^12
                -16059214980*x^10+3210573925*x^8-446456947*x^6+43657673*x^4
                -1631864*x^2-40328,
  387420489*x^36+1162261467*x^34+4649045868*x^32-9125904852*x^30
                -4864279473*x^28-75245668308*x^26+228853906389*x^24
                -233182493334*x^22+526458209184*x^20-1632367306233*x^18
                +2577322981359*x^16-2213846330418*x^14+1103473933785*x^12
                -328088633355*x^10+61540990272*x^8-7555532337*x^6
                +598204197*x^4-19509336*x^2-512072],
 [3*y^2+3*x^2-1,y^6-3*y^5+3*y^4-y^3-x^2,y^6-3*y^5+3*y^4-y^3+3*y^2+2*x^2-1,
  4*y^6+27*x^4,
  12*y^6+(48*x^2-16)*y^4+(63*x^4-42*x^2+7)*y^2+27*x^6-26*x^4+9*x^2-1,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4],
 [z^2+3*y^2+3*x^2-1,z^2-y^6+3*y^5-3*y^4+y^3+x^2,z^3+y^2*z+x^2]]
  
1 multi-roots: 0.0b0 0.0b0 [3*y^2+3*x^2-1,3*y^2] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 
 [12*y^6+(48*x^2-16)*y^4+(63*x^4-42*x^2+7)*y^2+27*x^6-26*x^4+9*x^2-1,
  12*y^6-5.72536737891363b0*y^4+8.963235209558525b-1*y^2] 
dist: 0.0b0 
common-roots: -3.990820394214746b-1 -3.990820394214746b-1 
dist: 6.938893903907228b-18 
common-roots: -3.990820394214746b-1 -3.990820394214746b-1 
dist: 6.938893903907228b-18 
common-roots: -3.731302026563126b-1 -3.731302026563127b-1 
dist: 4.163336342344337b-17 
common-roots: -4.492182869390443b-1 -4.492182869390443b-1 
dist: 6.938893903907228b-17 
common-roots: -4.293461173741275b-1 -4.293461173741276b-1 
dist: 4.163336342344337b-17 
common-roots: -4.293461173741276b-1 -4.293461173741276b-1 
dist: 2.081668171172169b-17 
common-roots: 1.242338414099984b0 1.241578377687144b0 
dist: 7.600364128400594b-4 
1 multi-roots: 0.0b0 0.0b0 [y^6-3*y^5+3*y^4-y^3-x^2,y^6-3*y^5+3*y^4-y^3] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [y^6-3*y^5+3*y^4-y^3-x^2,y^6-3*y^5+3*y^4-y^3] 
dist: 0.0b0 
3 multi-roots: 9.999999999999998b-1-1.908195823574488b-16*%i 
 1.006139616066548b-16*%i+1.0b0 [y^6-3*y^5+3*y^4-y^3-x^2,y^6-3*y^5+3*y^4-y^3] 
dist: 4.425687238657765b-16 
4 multi-roots: 1.006139616066548b-16*%i+1.0b0 9.020562075079397b-17*%i+1.0b0 
 [y^6-3*y^5+3*y^4-y^3-x^2,y^6-3*y^5+3*y^4-y^3] 
dist: 1.040834085586084b-17 
1 multi-roots: 0.0b0 0.0b0 [4*y^6+27*x^4,4*y^6] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [4*y^6+27*x^4,4*y^6] 
dist: 0.0b0 
3 multi-roots: 0.0b0 0.0b0 [4*y^6+27*x^4,4*y^6] 
dist: 0.0b0 
4 multi-roots: 0.0b0 0.0b0 [4*y^6+27*x^4,4*y^6] 
dist: 0.0b0 
5 multi-roots: 0.0b0 0.0b0 [4*y^6+27*x^4,4*y^6] 
dist: 0.0b0 
1 multi-roots: (-3.118675378203367b-11*%i)-7.071067811740978b-1 
 3.11867695771263b-11*%i-7.071067811989973b-1 
 [12*y^6+(48*x^2-16)*y^4+(63*x^4-42*x^2+7)*y^2+27*x^6-26*x^4+9*x^2-1,
  12*y^6-16*y^4+7*y^2-1] 
dist: 6.715982037737266b-11 
2 multi-roots: 7.071067811770959b-1-1.273326148703733b-11*%i 
 1.273326308308289b-11*%i+7.071067811959992b-1 
 [12*y^6+(48*x^2-16)*y^4+(63*x^4-42*x^2+7)*y^2+27*x^6-26*x^4+9*x^2-1,
  12*y^6-16*y^4+7*y^2-1] 
dist: 3.171562834653794b-11 
1 multi-roots: (-6.025654200204613b-1*%i)-1.891279438990948b-2 
 (-6.025654199767368b-1*%i)-1.891279438040217b-2 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 4.474615144603693b-11 
2 multi-roots: 6.025654209207471b-1*%i-1.891280116685924b-2 
 6.025654190764511b-1*%i-1.89127876034522b-2 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 1.368822261249517b-8 
3 multi-roots: 0.0b0 0.0b0 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 0.0b0 
4 multi-roots: 0.0b0 0.0b0 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 0.0b0 
5 multi-roots: 0.0b0 0.0b0 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 0.0b0 
6 multi-roots: 0.0b0 0.0b0 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 0.0b0 
7 multi-roots: 0.0b0 0.0b0 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 0.0b0 
8 multi-roots: 0.0b0 0.0b0 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 0.0b0 
9 multi-roots: 2.717041990286581b-6*%i+9.99993414966278b-1 
 1.00000093787557b0-7.060909170695758b-6*%i 
 [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
      +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
      +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
      -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
  y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
      -16*y^9+5*y^8-y^7] 
dist: 1.233703745313714b-5 
10 multi-roots: 1.00000093787557b0-7.060909170695758b-6*%i 
  4.343867253830464b-6*%i+1.000005647158198b0 
  [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
       +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
       +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
       -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
   y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
       -16*y^9+5*y^8-y^7] 
dist: 1.233881145655348b-5 
11 multi-roots: 1.518912661150419b0-6.666097968941921b-1*%i 
  1.518912927619844b0-6.666098929698847b-1*%i 
  [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
       +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
       +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
       -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
   y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
       -16*y^9+5*y^8-y^7] 
dist: 2.832604685158154b-7 
12 multi-roots: 6.666098479459857b-1*%i+1.51891279382378b0 
  6.666098419180176b-1*%i+1.518912794946535b0 
  [y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+((-3*x^2)+114)*y^12
       +(18*x^2-76)*y^11+((-45*x^2)+40)*y^10+(60*x^2-16)*y^9+((-49*x^2)+5)*y^8
       +(30*x^2-1)*y^7+(3*x^4-15*x^2)*y^6+((-9*x^4)+4*x^2)*y^5+(9*x^4-x^2)*y^4
       -3*x^4*y^3+2*x^4*y^2-x^6-x^4,
   y^18-9*y^17+36*y^16-84*y^15+128*y^14-138*y^13+114*y^12-76*y^11+40*y^10
       -16*y^9+5*y^8-y^7] 
dist: 6.131637614094183b-9 
common-roots: 1.000000000000015b0 1.0b0 
dist: 1.515454428613339b-14 
common-roots: 5.773502691896258b-1 5.773502691896257b-1 
dist: 5.551115123125783b-17 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: -5.773502691896258b-1 -5.773502691896258b-1 
dist: 5.551115123125783b-17 
common-roots: 1.242338414100015b0 1.241578377687144b0 
dist: 7.600364128707848b-4 
common-roots: -4.293461173741275b-1 -4.293461173741275b-1 
dist: 1.387778780781446b-17 
common-roots: -4.293461173741275b-1 -4.293461173741276b-1 
dist: 3.469446951953614b-17 
common-roots: -4.492182869390442b-1 -4.492182869390443b-1 
dist: 9.020562075079397b-17 
common-roots: -3.731302026563125b-1 -3.731302026563127b-1 
dist: 2.012279232133096b-16 
common-roots: -3.990820394214746b-1 -3.990820394214746b-1 
dist: 6.938893903907228b-18 
common-roots: -3.990820394214746b-1 -3.990820394214746b-1 
dist: 6.938893903907228b-18 
1 multi-roots: 0.0b0 0.0b0 
 [12*y^6+(48*x^2-16)*y^4+(63*x^4-42*x^2+7)*y^2+27*x^6-26*x^4+9*x^2-1,
  12*y^6-5.72536737891363b0*y^4+8.963235209558528b-1*y^2] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [3*y^2+3*x^2-1,3*y^2] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 1.9369471621906b-1 1.9369471621906b-1 
dist: 0.0b0 
common-roots: -1.9369471621906b-1 -1.9369471621906b-1 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 2.704199308450861b-1 2.704199308450861b-1 
dist: 0.0b0 
common-roots: -2.704199308450861b-1 -2.704199308450861b-1 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 2.755098124531884b-1 2.755098124531884b-1 
dist: 0.0b0 
common-roots: -2.755098124531884b-1 -2.755098124531884b-1 
dist: 0.0b0 
common-roots: -4.190704888041301b-1 -4.190704888041305b-1 
dist: 3.747002708109903b-16 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: -3.799706718183064b-1 -3.799706718183065b-1 
dist: 4.85722573273506b-17 
common-roots: 2.804840673490828b-1 2.804840673490828b-1 
dist: 0.0b0 
common-roots: -2.804840673490828b-1 -2.804840673490828b-1 
dist: 0.0b0 
common-roots: -4.152590546912595b-1 -4.152590546912597b-1 
dist: 1.179611963664229b-16 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: -3.655627214498231b-1 -3.655627214498232b-1 
dist: 5.551115123125783b-17 
common-roots: 3.184417034569177b-1 3.184417034569177b-1 
dist: 0.0b0 
common-roots: -3.184417034569177b-1 -3.184417034569177b-1 
dist: 0.0b0 
common-roots: -3.831359850498015b-1 -3.831359850498017b-1 
dist: 1.52655665885959b-16 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 3.509771861657056b-1 3.509771861657056b-1 
dist: 0.0b0 
common-roots: -3.509771861657056b-1 -3.509771861657056b-1 
dist: 0.0b0 
common-roots: -3.509771861657056b-1 -3.509771861657057b-1 
dist: 1.110223024625157b-16 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: -8.666384296627297b-2 -8.666384296627914b-2 
dist: 6.168676680573526b-15 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: -8.666384296627296b-2 -8.666384296627922b-2 
dist: 6.257147577848343b-15 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 3.509771861657057b-1 3.509771861657057b-1 
dist: 0.0b0 
common-roots: -3.509771861657057b-1 -3.509771861657057b-1 
dist: 0.0b0 
common-roots: -3.509771861657057b-1 -3.509771861657057b-1 
dist: 2.081668171172169b-17 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: -3.655627214498231b-1 -3.655627214498232b-1 
dist: 5.551115123125783b-17 
common-roots: 3.184417034569177b-1 3.184417034569177b-1 
dist: 0.0b0 
common-roots: -3.184417034569177b-1 -3.184417034569177b-1 
dist: 0.0b0 
common-roots: -3.831359850498015b-1 -3.831359850498017b-1 
dist: 1.52655665885959b-16 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: -3.799706718183065b-1 -3.799706718183065b-1 
dist: 2.081668171172169b-17 
common-roots: 2.80484067349083b-1 2.80484067349083b-1 
dist: 0.0b0 
common-roots: -2.80484067349083b-1 -2.80484067349083b-1 
dist: 0.0b0 
common-roots: -4.152590546912595b-1 -4.152590546912595b-1 
dist: 6.245004513516506b-17 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 2.755098124531883b-1 2.755098124531883b-1 
dist: 0.0b0 
common-roots: -2.755098124531883b-1 -2.755098124531883b-1 
dist: 0.0b0 
common-roots: -4.190704888041303b-1 -4.190704888041304b-1 
dist: 1.110223024625157b-16 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 2.704199308450858b-1 2.704199308450858b-1 
dist: 0.0b0 
common-roots: -2.704199308450858b-1 -2.704199308450858b-1 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [z^2+3*y^2+3*x^2-1,z^2] 
dist: 0.0b0 
common-roots: 1.936947162190598b-1 1.936947162190598b-1 
dist: 0.0b0 
common-roots: -1.936947162190598b-1 -1.936947162190598b-1 
dist: 0.0b0 
[T,F]: [3,1064] 
Evaluation took 32.3300 seconds (32.4100 elapsed) using 4531.459 MB.
(%o2) [[root(387420489*x^36+473513931*x^34+1615049199*x^32-5422961745*x^30
                           +2179233963*x^28-14860773459*x^26+43317737551*x^24
                           -45925857657*x^22+60356422059*x^20
                           -126478283472*x^18+164389796305*x^16
                           -121571730573*x^14+54842719755*x^12
                           -16059214980*x^10+3210573925*x^8-446456947*x^6
                           +43657673*x^4-1631864*x^2-40328,1)
          < x
          and x < root(387420489*x^36+473513931*x^34+1615049199*x^32
                                     -5422961745*x^30+2179233963*x^28
                                     -14860773459*x^26+43317737551*x^24
                                     -45925857657*x^22+60356422059*x^20
                                     -126478283472*x^18+164389796305*x^16
                                     -121571730573*x^14+54842719755*x^12
                                     -16059214980*x^10+3210573925*x^8
                                     -446456947*x^6+43657673*x^4-1631864*x^2
                                     -40328,2),true,true]]

実行例(2)

SyNRAC の岩根秀直さん(富士通研究所)のサイト

https://github.com/hiwane/qe_problems/blob/master/problems/exam/manual-fof/tsukuba2010-Ri-1-m.mpl

他の QE ツールの出力との比較

http://www.kurims.kyoto-u.ac.jp/~kyodo/kokyuroku/contents/pdf/2019-13.pdf Appendix

Maxima 5.39.0 http://maxima.sourceforge.net
using Lisp CMU Common Lisp 21b (21B Unicode)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.

(%i1) (qvpeds ([ex],[a,b,x],0,0,r11,0 ),
       qe( bfpcad(ext( '(     -1 <= x and x <= 3 and b = x^3/3 - a*x^2/2 and a > 0   ) )))  );
Evaluation took 1.7400 seconds (1.7400 elapsed) using 188.173 MB.
(%o1) [[root(a,1) < a and a < root(a-2,1),
        root(6*b+3*a+2,1) <= b and b <= root(2*b+9*a-18,1),true],
       [a = root(a-2,1),root(6*b+a^3,1) <= b and b <= root(2*b+9*a-18,1),
        true],
       [root(a-2,1) < a and a <= root(a-3,1),
        root(6*b+a^3,1) <= b and b <= root(b,1),true],
       [root(a-3,1) < a,root(2*b+9*a-18,1) <= b and b <= root(b,1),true]]

(%i2) (qvpeds ([ex],[a,b,x],1,0,r11,0 ),
       qe( bfpcad(ext( '(     -1 <= x and x <= 3 and b = x^3/3 - a*x^2/2 and a > 0   ) )))  );

[fpprec,fpprintprec,%ez,ratepsilon]: [16,30,1.0b-3,1.0b-16] 
x+1 >= 0 and x-3 <= 0 and equal((2*x^3-3*a*x^2-6*b)/6,0) and a > 0 
["and",equal((2*x^3-3*a*x^2-6*b)/6,0),x-3 <= 0,x+1 >= 0,a > 0] 
[[x-3],[x+1],[2*x^3-3*a*x^2-6*b]] 
[[b],[2*b+9*a-18],[6*b+3*a+2],[6*b+a^3]] 
[[a-3,a-2,a,a+1,a+6,3*a-7,3*a+2],[b,2*b+9*a-18,6*b+3*a+2,6*b+a^3],
 [x-3,x+1,2*x^3-3*a*x^2-6*b]]
  
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: -1.333333333333333b0 -1.333333333333333b0 
dist: 0.0b0 
common-roots: -1.5b0 -1.5b0 
dist: 0.0b0 
common-roots: -4.5b0 -4.5b0 
dist: 0.0b0 
common-roots: -1.0b0 -1.0b0 
dist: 0.0b0 
1 multi-roots: 9.999999999999999b-1-3.469517903370656b-17*%i 
 3.469446951953614b-17*%i+1.0b0 [2*x^3-3*a*x^2-6*b,2*x^3-3.0b0*x^2+1.0b0] 
dist: 1.309231643767475b-16 
1 multi-roots: 0.0b0 0.0b0 [2*x^3-3*a*x^2-6*b,2*x^3-3.0b0*x^2] 
dist: 0.0b0 
common-roots: 3.0b0 3.0b0 
dist: 0.0b0 
1 multi-roots: 6.938893903907228b-17*%i+2.0b0 2.0b0-6.939035806741312b-17*%i 
 [2*x^3-3*a*x^2-6*b,2*x^3-6*x^2+8] 
dist: 2.61846328753495b-16 
common-roots: -1.0b0 -1.0b0 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [2*x^3-3*a*x^2-6*b,2*x^3-6*x^2] 
dist: 0.0b0 
common-roots: 3.0b0 3.0b0 
dist: 0.0b0 
1 multi-roots: 2.166666666666667b0-4.163490115220211b-17*%i 
 4.163336342344337b-17*%i+2.166666666666667b0 
 [2*x^3-3*a*x^2-6*b,2*x^3-6.5b0*x^2+1.01712962962963b1] 
dist: 1.861907491918325b-16 
common-roots: -1.0b0 -1.0b0 
dist: 0.0b0 
common-roots: 3.0b0 3.0b0 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [2*x^3-3*a*x^2-6*b,2*x^3-6.5b0*x^2] 
dist: 0.0b0 
1 multi-roots: 2.333333333333333b0-5.551280766043446b-17*%i 
 5.551115123125783b-17*%i+2.333333333333334b0 
 [2*x^3-3*a*x^2-6*b,2*x^3-7*x^2+1.27037037037037b1] 
dist: 1.171009175116753b-15 
common-roots: 3.0b0 3.0b0 
dist: 0.0b0 
common-roots: -1.0b0 -1.0b0 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [2*x^3-3*a*x^2-6*b,2*x^3-7*x^2] 
dist: 0.0b0 
1 multi-roots: 1.387778780781446b-17*%i+2.666666666666667b0 
 2.666666666666667b0-1.387968122423659b-17*%i 
 [2*x^3-3*a*x^2-6*b,2*x^3-8.0b0*x^2+1.896296296296296b1] 
dist: 1.144396291987333b-16 
common-roots: 3.0b0 3.0b0 
dist: 0.0b0 
common-roots: -1.0b0 -1.0b0 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [2*x^3-3*a*x^2-6*b,2*x^3-8.0b0*x^2] 
dist: 0.0b0 
1 multi-roots: 3.0b0-4.163336342344337b-17*%i 4.163123343336605b-17*%i+3.0b0 
 [2*x^3-3*a*x^2-6*b,2*x^3-9*x^2+27] 
dist: 2.371429941323172b-16 
common-roots: 3.0b0 3.0b0 
dist: 0.0b0 
common-roots: -1.0b0 -1.0b0 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [2*x^3-3*a*x^2-6*b,2*x^3-9*x^2] 
dist: 0.0b0 
1 multi-roots: 5.550866638069772b-17*%i+3.5b0 3.5b0-5.551115123125783b-17*%i 
 [2*x^3-3*a*x^2-6*b,2*x^3-1.05b1*x^2+4.2875b1] 
dist: 5.661043993863231b-16 
common-roots: 3.0b0 3.0b0 
dist: 5.551115123125783b-17 
common-roots: -1.0b0 -1.0b0 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [2*x^3-3*a*x^2-6*b,2*x^3-1.05b1*x^2] 
dist: 0.0b0 
[T,F]: [39,253] 
Evaluation took 2.5500 seconds (2.5600 elapsed) using 169.662 MB.
(%o2) [[root(a,1) < a and a < root(a-2,1),
        root(6*b+3*a+2,1) <= b and b <= root(2*b+9*a-18,1),true],
       [a = root(a-2,1),root(6*b+a^3,1) <= b and b <= root(2*b+9*a-18,1),
        true],
       [root(a-2,1) < a and a <= root(a-3,1),
        root(6*b+a^3,1) <= b and b <= root(b,1),true],
       [root(a-3,1) < a,root(2*b+9*a-18,1) <= b and b <= root(b,1),true]]

projection set に対する数値解の誤差(その2)

...とは言え,sep の評価なしでは,いくら R を小さくしても,前回の冒頭で述べたように,近接根に対応した数値解をカウントしてしまう可能性を排除出来ないかのように見えます.

しかし,我々が扱うのは一般の系ではなく,CAD の projection set であり,特に pscs を含む Collins-Hong タイプの projection(定義は,例えば,D.Wilson. Advances in Cylindrical Algebraic Decomposition の 2.3.1 Collins’Algorithm,2.4.1 Alternative Projection Operators をご参照ください.なお,この著者の指導教官は,有名な J.H.Davenport です)を利用すれば,sep の情報なしに,重根に対応した数値解全体のみを正確にカウントすることが出来ます.以下,そのことをお話しましょう.

まず,pscs(principal subresultant coefficient sequence)とは,多項式 f(x), g(x) に対して,それらの Sylvester 行列

syl(f1,f2,v):=block([d1:hipow(f1,v),d2:hipow(f2,v),c1,c2,z0,i,k],
           c1:makelist(coeff(f1,v,i),i,d1,0,-1),
           c2:makelist(coeff(f2,v,i),i,d2,0,-1),z0:makelist(0,d1+d2),
           [makelist(firstn(append(firstn(z0,k-1),c1,z0),d1+d2),k,d2),
            makelist(firstn(append(firstn(z0,k-1),c2,z0),d1+d2),k,d1)])$

の一部を除いた行列の行列式の列(普通の resultant はその初項です)

pscs(f01,f02,v):=block(
            [uratmx:ratmx,s1,s2,d,d1,d2,f1:expand(f01),f2:expand(f02),j],
            ratmx:on,[s1,s2]:syl(f1,f2,v),d1:hipow(f1,v),d2:hipow(f2,v),
            d:makelist(determinant(apply(matrix,
                                         append(
                                          map(lambda([e],firstn(e,d1+d2-2*j)),
                                              firstn(s1,d2-j)),
                                          map(lambda([e],firstn(e,d1+d2-2*j)),
                                              firstn(s2,d1-j))))),j,0,
                       min(d1,d2)-1),ratmx:uratmx,d)$

のことで

 ( pscs の初項から続く 0 の個数 ) = ( gcd( f(x), g(x) ) の次数 )

という性質(Polynomial greatest common divisor - Wikipedia)を持ちます.例えば,上の(素朴な)コードを読み込んで,実行すると

(%i24) pscs( (x-1) * (x-2) , (x-3) * (x-4), x );
(%o24) [12,-4]

(%i25) pscs( (x-1) * (x-2)^3 * (x-3)^2 ,  (x-2)^2 * (x-3)^3 * (x-4), x );
(%o25) [0,0,0,0,12,-4]

(%i26) factor(pscs( (x-1) * (x-a)^3 * (x-b)^2 ,  (x-a)^2 * (x-b)^3 * (x-4), x ));
(%o26) [0,0,0,0,-3*(a-4)*(b-1)*(b-a),-(b-a+3)]

といった具合になります.

さて,上の性質を g(x) = f'(x) の場合に用いると

 gcd( f(x), f'(x) ) の次数

の値が pscs から特定できる訳ですが,この値が f(x)

 (重根の個数) - (相異なる重根の個数)

であることは,積の微分公式により簡単に判ります.例で確認してみると

(%i31) pscs( f : (x-1) * (x-2)^3 * (x-3)^5 , diff(f,x) , x );
(%o31) [0,0,0,0,0,0,-60,-38]

のように 8 - 2 = 6 となっています.

ところが,この差は前回の冒頭で述べた方法における,重根に対応する数値解の検出カウントに他なりません.例えば,上の重根 2, 2, 2, 3, 3, 3, 3, 3 に対応した数値解 s1, s2, s3, t1, t2, t3, t4, t5 は

2*R >= | s1 - s2 |, 2*R >= | s2 - s3 |,

2*R >= | t1 - t2 |, 2*R >= | t2 - t3 |, 2*R >= | t3 - t4 |, 2*R >= | t4 - t5 |

として,合計 (3-1) + (5-1) = 6 回カウントされ,もし,検出カウントがこれを超えるなら,そこには近接根に対応する数値解のカウントが含まれているので,R を小さくして retry すれば,有限回で近接根に対応する数値解を排除でき,同時に,カウントの長さを見れば,各重根の重複度(各クラスタに属する数値解の個数)も判る,と言う仕組みです.

2017-07-08

近接根の識別

さて,r, R を先の条件を満たすようにとるとして,そも,R をどのように定めるのか?という問題があります.

確かに,数値解の誤差 R の系において,互いの距離が 2*R 以下である数値解を全て集めれば,重根に対する数値解は必ずそれに属します.しかし,互いの距離が 4*R 以下である厳密相異根(近接根)が存在すると,それらに対する数値解もメンバーになるかも知れません.

ここでもし,系における厳密相異根間の距離の最小値(根差)sep の値が判るならば,sep > 4*R を満たすように R をとっておけば,相異根 r1, r2 に対する数値解 s1, s2 間の距離

 | s2 - s1 | = | (r2 - r1) - (s1 - r1) + (s2 - r2) | >= sep - R - R > 2*R 

のように 2*R より大きくなるので,上記のように集めた数値解全体が,重根に対する数値解全体になります.

では如何にして sep の値を得るかですが,それには resultant を繰り返し用いて1変数化する方法があります.maxima では

(%i7) factor(eliminate([2*c+1,4096*c^3+27*b^4,8*a*c-9*b^2-2*a^3,x^4+a*x^2+b*x+c],[c,b,a]));
Evaluation took 0.0300 seconds (0.0400 elapsed) using 2.309 MB.
(%o7) [33554432*x^8*(2*x^4-27)*(6*x^4-1)^3
               *(186624*x^32+2985984*x^28+40621824*x^24+12082176*x^20
                            +41597280*x^16+64694016*x^12+262151536*x^8
                            -644544*x^4+729)]

のように必要条件を定める多項式が得られ,この実根

 -1.91683..., -0.63894..., 0, 0.63894..., 1.91683...

から,sep >= 0.63894...(実際には c は 0 でないので,1.91683...-0.63894...)と判るので,

 R < 0.63894.../4 = 0.15973...

のようにとっておけば,上記の系の近接根に対する数値解間の距離はカウントされず,原理的には,これをすべての多項式の組合せに対して実行し,最小の sep に対して, R を定めればよいことになります.

...が,一般に,resultant の係数は爆発し,モニター画面が埋まります.

projection set に対する数値解の誤差(その1)

誤差 r の数値解を係数に代入した方程式系の数値解の誤差 R との関係を考えると

・数値解の代入による係数の摂動は Taylor の定理により r 程度.

・係数の摂動 r に対する厳密 n 重根摂動は同じく r^{1/n} 程度.

なので,例えば,前回の

 4096*c^3+27*b^4(4次), 8*a*c-9*b^2-2*a^3(3次), x^4+a*x^2+b*x+c(4次)

の場合,次数の最大値 4 により,r を最悪でも R^{4} 程度まで小さくすればよく,先の例のように %ez : 1.0b-5 とするならば,fpprec は 25 を超えた程度の値にすればよいことになります.

重根に対する数値解の誤差

先の出力の dist は,同じ値に対すると見做した数値解間の複素平面上での距離ですが,単根の場合の誤差 10^{-30} に対して,例えば,下の部分では 10^{-11} まで膨らんでいます.

1 multi-roots: 
 (-6.2414826969557199979633340867b-13*%i)-6.38943104254668599248510111018b-1 
 (-6.95918202422128079528203919324b-12*%i)-6.38943104241533885902022292701b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.44948974278317809819728407471b0*x^2
     -2.08677944009771642211264733221b0*x-5.0b-1] 
dist: 1.45826385597869537841530414623b-11 
2 multi-roots: 
 (-6.95918202422128079528203919324b-12*%i)-6.38943104241533885902022292701b-1 
 7.58333029391685279498189770221b-12*%i-6.38943104242614942415515511763b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.44948974278317809819728407471b0*x^2
     -2.08677944009771642211264733221b0*x-5.0b-1] 
dist: 1.4582638571553690760678343437b-11 

これは,一般に n 重根に対する数値解の誤差は,単根に対する数値解の誤差の 1/n 程度となる性質によるもので,上の場合は,3 重根なので 30 の 1/3 程度となっている訳です.

この例の出所をもう少し詳しく述べると,上記は,下位の lifting で projection factor から得た

 c = root(2*c+1, 1), b = root(4096*c^3+27*b^4, 1), a = root(8*a*c-9*b^2-2*a^3, 1)

の数値解を x^4+a*x^2+b*x+c = 0 に代入した

 x^4-2.44948974278317809819728407471b0*x^2-2.08677944009771642211264733221b0*x-5.0b-1 = 0 

を解いたもので,厳密解

 c = - 1/2 = - 0.5,
 b = - (4*2^(1/4))/(3^(3/4)) = 2.08677944009771642211264733221...,
 a = - 6^(1/2) = 2.449489742783178098197284074705...

に対して,数値解は

 c = - 5.0b-1, b = - 2.08677944009771642211264733221b0, a = - 2.44948974278317809819728407471b0

なので,c,b,a までの精度は保たれており,最後の

 x^4+a*x^2+b*x+c = (x-3^(3/4)/2^(1/4))*(x+1/6^(1/4))^3 = 0

の 3 重根

 -1/6^(1/4) = - 0.6389431042462724758553493051605564336...

に対してのみ,対応する数値解が

 (-6.2414826969557199979633340867b-13*%i)-6.38943104254668599248510111018b-1, 
 (-6.95918202422128079528203919324b-12*%i)-6.38943104241533885902022292701b-1,
 7.58333029391685279498189770221b-12*%i-6.38943104242614942415515511763b-1

のようにばらけますが,相加平均をとると

 (-3.21582999003662290927010077574b-32*%i)-6.38943104246272475855349305161b-1

となり,この実部として,30 桁精度のサンプルが得られます.

QE on maxima

以下は,現在作成中の QE ツールの出力例です.

・有効桁数が fpprec の多倍長浮動小数点数を使用.

・2つの数値解間の距離が %ez より小ならばそれらは同じ値の根(重根共通根)に対応し,%ez 以上ならばそれらは異なる値の根に対応する数値解と見做しています.

Maxima 5.39.0 http://maxima.sourceforge.net
using Lisp CMU Common Lisp 21b (21B Unicode)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.

(%i1) (qvpeds ([all], [c,b,a,x],0,h1,r11,0 ),qe( bfpcad(ext( '(   x^4+a*x^2+b*x+c>=0  ) )))  );

Evaluation took 11.3900 seconds (11.4100 elapsed) using 1307.972 MB.

(%o1) [[c = root(c,1),b = root(126976*c^3-135*b^4,1),
        root(8*a*c-9*b^2-2*a^3,1) <= a,true],
       [root(c,1) < c,b < root(b,1),
        root(256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,2)
          <= a,true],
       [root(c,1) < c,b = root(b,1),
        root(256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,1)
          <= a,true],
       [root(c,1) < c,root(b,1) < b,
        root(256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,2)
          <= a,true]]

(%i2) (qvpeds ([all], [c,b,a,x],1,h1,r11,0 ),qe( bfpcad(ext( '(   x^4+a*x^2+b*x+c>=0  ) )))  );

[fpprec,fpprintprec,%ez,ratepsilon]: [30,30,1.0b-5,1.0b-30] 
x^4+a*x^2+b*x+c >= 0 
x^4+a*x^2+b*x+c >= 0 
[[c],
 [b,256*c^3-27*b^4,1024*c^3-2187*b^4,1024*c^3+3*b^4,4096*c^3+27*b^4,
  126976*c^3-135*b^4],
 [a,8*a*c-9*b^2-2*a^3,
  256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2],
 [x^4+a*x^2+b*x+c]]
  
1 multi-roots: 0.0b0 0.0b0 [256*c^3-27*b^4,-27*b^4] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [256*c^3-27*b^4,-27*b^4] 
dist: 0.0b0 
3 multi-roots: 0.0b0 0.0b0 [256*c^3-27*b^4,-27*b^4] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [1024*c^3-2187*b^4,-2187*b^4] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [1024*c^3-2187*b^4,-2187*b^4] 
dist: 0.0b0 
3 multi-roots: 0.0b0 0.0b0 [1024*c^3-2187*b^4,-2187*b^4] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [1024*c^3+3*b^4,3*b^4] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [1024*c^3+3*b^4,3*b^4] 
dist: 0.0b0 
3 multi-roots: 0.0b0 0.0b0 [1024*c^3+3*b^4,3*b^4] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [4096*c^3+27*b^4,27*b^4] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [4096*c^3+27*b^4,27*b^4] 
dist: 0.0b0 
3 multi-roots: 0.0b0 0.0b0 [4096*c^3+27*b^4,27*b^4] 
dist: 0.0b0 
1 multi-roots: 0.0b0 0.0b0 [126976*c^3-135*b^4,-135*b^4] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [126976*c^3-135*b^4,-135*b^4] 
dist: 0.0b0 
3 multi-roots: 0.0b0 0.0b0 [126976*c^3-135*b^4,-135*b^4] 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
1 multi-roots: 
 4.52295331325015833831979417428b-16*%i-2.44948974278317847258028706083b0 
 (-4.52295331325015213319900815541b-16*%i)-2.44948974278317772381428108859b0 
 [256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,
  (-5.0b-1*(16*a^4+6.27069374152493593138504723125b2*a))
   -1.74185937264581553649584645312b1*a^3-3.2b1*a^2-5.44b2] 
dist: 1.17428054512251951790867706837b-15 
common-roots: -2.44948974278317809819728407471b0 
             -2.44948974278317809819728407471b0 
dist: 1.57772181044202361082345713057b-30 
1 multi-roots: -1.41421356237309504880168872421b0*%i 
 (-1.41421356237309504880168872421b0*%i)-3.86941038573562221171322357299b-43 
 [256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,
  (-8.0b0*a^4)-3.2b1*a^2-3.2b1] 
dist: 7.88860905221011805411728660181b-31 
2 multi-roots: 
 1.41421356237309504880261489839b0*%i-2.95418118567534149019656617711b-22 
 1.41421356237309504880076255003b0*%i+2.9541811856753414902004355875b-22 
 [256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,
  (-8.0b0*a^4)-3.2b1*a^2-3.2b1] 
dist: 1.94429469761416284867540568328b-21 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
1 multi-roots: 
 4.52295330147550776509999452971b-16*%i-2.44948974278317847258028887801b0 
 (-4.52295330147551542569579253843b-16*%i)-2.44948974278317772381427927141b0 
 [256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,
  (-5.0b-1*(16*a^4+6.27069374152493593138504723125b2*a))
   -1.74185937264581553649584645313b1*a^3-3.2b1*a^2
   -5.44000000000000000000000000001b2] 
dist: 1.17428054562583903487602624948b-15 
common-roots: -2.44948974278317809819728407471b0 
             -2.44948974278317809819728407471b0 
dist: 1.57772181044202361082345713057b-30 
1 multi-roots: 0.0b0 0.0b0 [8*a*c-9*b^2-2*a^3,-2*a^3] 
dist: 0.0b0 
2 multi-roots: 0.0b0 0.0b0 [8*a*c-9*b^2-2*a^3,-2*a^3] 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
1 multi-roots: 
 8.16496580927726032731894282802b-1-1.6183536594179216924381257046b-22*%i 
 1.61835365941792169243742042834b-22*%i+8.16496580927726032732961767002b-1 
 [8*a*c-9*b^2-2*a^3,(-2*a^3)+4.0b0*a-2.17732421580726942061980806641b0] 
dist: 1.11547535241290012202233114443b-21 
1 multi-roots: 
 (-8.47286141428164487440940737737b-20*%i)-1.41421356237309504909493338483b0 
 8.47286141428164487616706655174b-20*%i-1.41421356237309504850844406359b0 
 [256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,
  8.0b0*a^4-3.2b1*a^2+3.2b1] 
dist: 6.10479709847422546500953724134b-19 
2 multi-roots: 
 1.41421356237309504879618188426b0-1.96859282073234240509586747592b-21*%i 
 1.96859282073234238751927573217b-21*%i+1.41421356237309504880719556416b0 
 [256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,
  8.0b0*a^4-3.2b1*a^2+3.2b1] 
dist: 1.16962633227785224686827731017b-20 
common-roots: 1.41421356237309504880168872421b0 
             1.41421356237309504880168872421b0 
dist: 0.0b0 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
common-roots: -1.41421356237309504880168872421b0 
             -1.41421356237309504880168872421b0 
dist: 0.0b0 
1 multi-roots: 
 8.1649658092772603273200008634b-1-1.30109252983440372998384918995b-22*%i 
 1.30109252983440372998339457472b-22*%i+8.16496580927726032732855963464b-1 
 [8*a*c-9*b^2-2*a^3,(-2*a^3)+4.0b0*a-2.17732421580726942061980806641b0] 
dist: 8.94560966410596198552565674457b-22 
common-roots: 0.0b0 0.0b0 
dist: 0.0b0 
1 multi-roots: 
 (-1.16997742006955532323735088816b-17*%i)-3.35546475144558657978639517931b-1 
 1.16997742006955532102907767889b-17*%i-3.35546475144558652208708812765b-1 
 [x^4+a*x^2+b*x+c,
  x^4-4.77860936379455500840332276085b0*x^2
     -3.05577241698508990342139722064b0*x-5.0b-1] 
dist: 2.41004349697564216587243138313b-17 
1 multi-roots: 
 (-2.24047760152893241737421755167b-20*%i)-1.0109852688012821415609910299b0 
 2.24047760152893269859199915596b-20*%i-1.01098526880128214151321562239b0 
 [x^4+a*x^2+b*x+c,
  x^4-3.55546677120777806279111679242b0*x^2
     -3.05577241698508990342139722064b0*x-5.0b-1] 
dist: 6.55010344684744407831148213933b-20 
1 multi-roots: 
 2.22935715805258081302014670225b-18*%i-4.14333797761439630281210468432b-1 
 (-2.22935715805258088784912140497b-18*%i)-4.14333797761439627962993519833b-1 
 [x^4+a*x^2+b*x+c,
  x^4-3.42753994633320075795235578053b0*x^2
     -2.55577241698508990342139722064b0*x-5.0b-1] 
dist: 5.02536199426577147169718392348b-18 
1 multi-roots: 
 (-7.63751536911083876261312227633b-19*%i)-8.96295167765296091409417104731b-1 
 7.63751536911083876548501856105b-19*%i-8.96295167765296090286367856344b-1 
 [x^4+a*x^2+b*x+c,
  x^4-3.03243266180629550631765220844b0*x^2
     -2.55577241698508990342139722064b0*x-5.0b-1] 
dist: 1.89591805066530344113644713169b-18 
1 multi-roots: 
 4.44329956060120776495651206012b-21*%i-4.7445898461131539492366468499b-1 
 (-4.44329956060120776491378978904b-21*%i)-4.74458984611315394915833267933b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.89645721365288302103527609247b0*x^2
     -2.32127592854140316276702227643b0*x-5.0b-1] 
dist: 1.18449456333131606287348159343b-20 
1 multi-roots: 
 (-5.13518395612155029572934523107b-18*%i)-8.19617912427072101369893178291b-1 
 5.13518395612155030519077584595b-18*%i-8.19617912427072096157128200993b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.75961902983845013509216731558b0*x^2
     -2.32127592854140316276702227643b0*x-5.0b-1] 
dist: 1.15175247237145207854523711501b-17 
1 multi-roots: 
 (-6.2414826969557199979633340867b-13*%i)-6.38943104254668599248510111018b-1 
 (-6.95918202422128079528203919324b-12*%i)-6.38943104241533885902022292701b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.44948974278317809819728407471b0*x^2
     -2.08677944009771642211264733221b0*x-5.0b-1] 
dist: 1.45826385597869537841530414623b-11 
2 multi-roots: 
 (-6.95918202422128079528203919324b-12*%i)-6.38943104241533885902022292701b-1 
 7.58333029391685279498189770221b-12*%i-6.38943104242614942415515511763b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.44948974278317809819728407471b0*x^2
     -2.08677944009771642211264733221b0*x-5.0b-1] 
dist: 1.4582638571553690760678343437b-11 
1 multi-roots: 
 6.38943104246144034405208996102b-1-4.422502465774425554602186706b-14*%i 
 1.33349305972666630723236835579b-13*%i+6.38943104246298402619456223129b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.44948974278317809819728407471b0*x^2
     +2.08677944009771642211264733221b0*x-5.0b-1] 
dist: 2.3529170930722626582908906827b-13 
2 multi-roots: 
 1.33349305972666630723236835579b-13*%i+6.38943104246298402619456223129b-1 
 6.38943104246374990541382696251b-1-8.91242813149223756054934246976b-14*%i 
 [x^4+a*x^2+b*x+c,
  x^4-2.44948974278317809819728407471b0*x^2
     +2.08677944009771642211264733221b0*x-5.0b-1] 
dist: 2.35287498234870156742355194154b-13 
1 multi-roots: 
 3.72610157565100454685245607331b-20*%i+4.74458984611315394913552119431b-1 
 4.74458984611315394925945833492b-1-3.72610157565100454690915365651b-20*%i 
 [x^4+a*x^2+b*x+c,
  x^4-2.89645721365288302103527609247b0*x^2
     +2.32127592854140316276702227643b0*x-5.0b-1] 
dist: 7.55455976814101740503286439967b-20 
1 multi-roots: 
 8.19617912427072098761958869152b-1-3.13943116569295322775812726995b-21*%i 
 3.13943116569295322775468371035b-21*%i+8.19617912427072098765062510133b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.75961902983845013509216731558b0*x^2
     +2.32127592854140316276702227643b0*x-5.0b-1] 
dist: 7.00404879414403669951788837319b-21 
1 multi-roots: 
 2.46936845160507392345254636383b-17*%i+4.14333797761439612007308924107b-1 
 4.14333797761439646236895064158b-1-2.46936845160507398188288178659b-17*%i 
 [x^4+a*x^2+b*x+c,
  x^4-3.42753994633320075795235578053b0*x^2
     +2.55577241698508990342139722064b0*x-5.0b-1] 
dist: 6.00897394505265450935583153395b-17 
1 multi-roots: 
 8.96295167765296090779340009951b-1-8.69963119046618331638821004739b-20*%i 
 8.69963119046618331598771326227b-20*%i+8.96295167765296090916444951125b-1 
 [x^4+a*x^2+b*x+c,
  x^4-3.03243266180629550631765220844b0*x^2
     +2.55577241698508990342139722064b0*x-5.0b-1] 
dist: 2.21520197802208732404660033187b-19 
1 multi-roots: 
 3.35546475144558654573716194067b-1-3.2321873145433364152600510801b-19*%i 
 3.23218731454333641635946277158b-19*%i+3.35546475144558655613632136628b-1 
 [x^4+a*x^2+b*x+c,
  x^4-4.77860936379455500840332276085b0*x^2
     +3.05577241698508990342139722064b0*x-5.0b-1] 
dist: 1.2244617433979626836819761986b-18 
1 multi-roots: 
 1.01098526880128213782781893505b0-2.07015345747187669505738755424b-18*%i 
 2.07015345747187669030859350914b-18*%i+1.01098526880128214524638771724b0 
 [x^4+a*x^2+b*x+c,
  x^4-3.55546677120777806279111679242b0*x^2
     +3.05577241698508990342139722064b0*x-5.0b-1] 
dist: 8.49572269592501254899699170041b-18 
1 multi-roots: 
 1.09731695855008129432850901121b-16*%i-6.29960524947436974960114115801b-1 
 (-1.09731695855008175020983658478b-16*%i)-6.29960524947436189807096491478b-1 
 [x^4+a*x^2+b*x+c,x^4-1.19055078897614960606377922946b0*x^2-5.0b-1*x] 
dist: 8.15248085790726489126442096385b-16 
1 multi-roots: 0.0b0 0.0b0 [x^4+a*x^2+b*x+c,x^4-5.0b-1*x^2] 
dist: 0.0b0 
1 multi-roots: 
 6.29960524947436582381894689913b-1-5.1915207100556332839659272546b-22*%i 
 5.19152071005563328395652911378b-22*%i+6.29960524947436582385315917366b-1 
 [x^4+a*x^2+b*x+c,x^4-1.19055078897614960606377922946b0*x^2+5.0b-1*x] 
dist: 3.57531436008650390541071687971b-21 
1 multi-roots: 
 (-8.67770249132643708238919796611b-23*%i)-1.31549862931202979917891670099b0 
 8.67770249132643708239032323801b-23*%i-1.31549862931202979917841983362b0 
 [x^4+a*x^2+b*x+c,
  x^4-4.90268221512206394838567282523b0*x^2
     -3.79286913672985525962281904563b0*x+5.0b-1] 
dist: 5.26306169342786570228478616546b-22 
1 multi-roots: 
 2.61198261984724332021478496099b-1-3.73328701456410231125396194552b-23*%i 
 3.73328701456410231125394316086b-23*%i+2.61198261984724332021514776701b-1 
 [x^4+a*x^2+b*x+c,
  x^4+7.12406849810570318368614385351b0*x^2
     -3.79286913672985525962281904563b0*x+5.0b-1] 
dist: 8.30135823846948556696946435113b-23 
1 multi-roots: 
 (-8.35793034501348062623930605099b-22*%i)-1.26839633131681513709955065996b0 
 8.35793034501348062625014797815b-22*%i-1.26839633131681513709478200116b0 
 [x^4+a*x^2+b*x+c,
  x^4-4.51570275957450820467053128978b0*x^2
     -3.29286913672985525962281904563b0*x+5.0b-1] 
dist: 5.05314820570176695705561472995b-21 
1 multi-roots: 
 3.49188104507532910404015377995b-23*%i+2.98842309414307218065285325202b-1 
 2.98842309414307218065613316054b-1-3.49188104507532910403992032144b-23*%i 
 [x^4+a*x^2+b*x+c,
  x^4+5.33076228416614959738464811917b0*x^2
     -3.29286913672985525962281904563b0*x+5.0b-1] 
dist: 3.35343542885119089772093274405b-22 
1 multi-roots: 
 (-5.10955124220135577792387388171b-22*%i)-1.1495332358829680004419098722b0 
 5.10955124220135577792837906846b-22*%i-1.14953323588296800043902649925b0 
 [x^4+a*x^2+b*x+c,
  x^4-3.58590105561473348013717487389b0*x^2
     -2.16812942838935673533957135587b0*x+5.0b-1] 
dist: 3.05910773620696643491835445611b-21 
1 multi-roots: 
 4.29760429000264513227806165013b-1-4.9825698827127380563723750383b-17*%i 
 4.9825698827127377393878597465b-17*%i+4.29760429000264633921325792835b-1 
 [x^4+a*x^2+b*x+c,
  x^4+2.15309806062091933677807113863b0*x^2
     -2.16812942838935673533957135587b0*x+5.0b-1] 
dist: 1.56516218758945019086233255227b-16 
1 multi-roots: 
 (-1.09877730976256428518192469349b-21*%i)-1.00617122801969079931775349078b0 
 1.09877730976254185519229728272b-21*%i-1.00617122801969079931174334307b0 
 [x^4+a*x^2+b*x+c,
  x^4-2.54325618867219212419273854599b0*x^2
     -1.04338972004885821105632366611b0*x+5.0b-1] 
dist: 6.39930635240535273049586094033b-21 
1 multi-roots: 
 6.38943104246272475524586123887b-1-7.84439082707517235056253391037b-20*%i 
 7.84439082708190432497441062349b-20*%i+6.38943104246272476186112486434b-1 
 [x^4+a*x^2+b*x+c,x^4-1.04338972004885821105632366611b0*x+5.0b-1] 
dist: 6.79875661664383746823339492112b-19 
1 multi-roots: 
 (-4.8300774831537619911512151596b-22*%i)-9.65994523816328465899519279333b-1 
 4.8300774707834158989233615011b-22*%i-9.65994523816328465899094849168b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.26361409430139643717899746966b0*x^2
     -7.67624175513389459396781893817b-1*x+5.0b-1] 
dist: 1.05514307182643029247458493579b-21 
1 multi-roots: 
 1.119137819361247989040796719b-15*%i+6.94963770046457076218883279372b-1 
 6.94963770046457864444214852857b-1-1.11913781936124711403020335568b-15*%i 
 [x^4+a*x^2+b*x+c,
  x^4-4.13672885217763849890412496005b-1*x^2
     -7.67624175513389459396781893817b-1*x+5.0b-1] 
dist: 2.37301011549313127333803802423b-15 
1 multi-roots: 
 6.33988972265475161381443097681b-22*%i-9.23416931585132456001273979169b-1 
 (-6.33988972265475161353799507713b-22*%i)-9.23416931585132455992195460933b-1 
 [x^4+a*x^2+b*x+c,
  x^4-1.9717229852393250817227538327b0*x^2
     -4.91858630977920707737240121529b-1*x+5.0b-1] 
dist: 9.16663850192252560176095861665b-21 
1 multi-roots: 
 7.49558352273654755133389531399b-1-9.2980021082756567072476690926b-18*%i 
 9.29800210827546330169426966815b-18*%i+7.49558352273654772974086850138b-1 
 [x^4+a*x^2+b*x+c,
  x^4-7.95576487395121227355033572426b-1*x^2
     -4.91858630977920707737240121529b-1*x+5.0b-1] 
dist: 2.57701737215882295851533416416b-17 
1 multi-roots: 
 1.03401156272799309188393045594b-19*%i-8.83251837810700396804617510575b-1 
 (-1.03401156272799304752829508618b-19*%i)-8.83251837810700395251773718947b-1 
 [x^4+a*x^2+b*x+c,
  x^4-1.69948573504594766924564690096b0*x^2
     -2.45929315488960353868620060764b-1*x+5.0b-1] 
dist: 1.56655387320991285239749179312b-18 
1 multi-roots: 
 7.96303936790265302555727618361b-1-3.40419552049028707429902475843b-21*%i 
 3.40419552049944803968351960399b-21*%i+7.96303936790265302568553128937b-1 
 [x^4+a*x^2+b*x+c,
  x^4-1.1137806681726386454165880796b0*x^2
     -2.45929315488960353868620060764b-1*x+5.0b-1] 
dist: 1.45206029523254927419705052618b-20 
1 multi-roots: 
 (-5.70609945371498130990553057283b-21*%i)-8.40896415253714543050874201664b-1 
 5.70609945371498131018153821252b-21*%i-8.40896415253714543011376750803b-1 
 [x^4+a*x^2+b*x+c,x^4-1.41421356237309504880168872421b0*x^2+5.0b-1] 
dist: 4.11130989883287052898186383085b-20 
2 multi-roots: 
 8.40896415253714543012849282445b-1-6.53339775168399828589095914175b-21*%i 
 6.53339775168399828561495150206b-21*%i+8.40896415253714543049401670022b-1 
 [x^4+a*x^2+b*x+c,x^4-1.41421356237309504880168872421b0*x^2+5.0b-1] 
dist: 3.88177560186052570543478329165b-20 
1 multi-roots: 
 2.15893555484106906165912452485b-16*%i+8.83251837810700183846822208909b-1 
 8.83251837810700608209569020613b-1-2.15893555484106797595047500567b-16*%i 
 [x^4+a*x^2+b*x+c,
  x^4-1.69948573504594766924564690097b0*x^2
     +2.45929315488960353868620060765b-1*x+5.0b-1] 
dist: 6.05412132418777109501344790091b-16 
1 multi-roots: 
 6.37787066397529175282449379547b-20*%i-7.96303936790265302727748521798b-1 
 (-6.37787066396800919273345251121b-20*%i)-7.963039367902653023965322255b-1 
 [x^4+a*x^2+b*x+c,
  x^4-1.1137806681726386454165880796b0*x^2
     +2.45929315488960353868620060765b-1*x+5.0b-1] 
dist: 3.54929751662912295409283425277b-19 
1 multi-roots: 
 9.23416931585132422243653899598b-1-6.27472747421841058511382108183b-18*%i 
 6.2747274742183885879114162131b-18*%i+9.23416931585132489749815540504b-1 
 [x^4+a*x^2+b*x+c,
  x^4-1.9717229852393250817227538327b0*x^2
     +4.91858630977920707737240121529b-1*x+5.0b-1] 
dist: 6.86627313685598614587092899877b-17 
1 multi-roots: 
 (-1.99636848170413194768633600558b-15*%i)-7.49558352273655235457557488862b-1 
 1.99636848170413258293302923552b-15*%i-7.49558352273654292649918892678b-1 
 [x^4+a*x^2+b*x+c,
  x^4-7.95576487395121227355033572426b-1*x^2
     +4.91858630977920707737240121529b-1*x+5.0b-1] 
dist: 4.10254003056179335802065997111b-15 
1 multi-roots: 
 9.65994523816328465899290503781b-1-2.66934379792368063978571497834b-22*%i 
 2.66934379792368063978568047301b-22*%i+9.65994523816328465899323624718b-1 
 [x^4+a*x^2+b*x+c,
  x^4-2.26361409430139643717899746966b0*x^2
     +7.67624175513389459396781893818b-1*x+5.0b-1] 
dist: 5.34895175649003922093343053329b-22 
1 multi-roots: 
 (-4.29381502396318990315032909949b-19*%i)-6.9496377004645747104791949945b-1 
 4.29381502396139055973603979073b-19*%i-6.94963770046457469615178632778b-1 
 [x^4+a*x^2+b*x+c,
  x^4-4.13672885217763849890412496004b-1*x^2
     +7.67624175513389459396781893818b-1*x+5.0b-1] 
dist: 1.67039524946424430892380307845b-18 
1 multi-roots: 
 1.00617122801969079926553973356b0-1.60075239406241646868279412713b-19*%i 
 1.60075239406241646862513736191b-19*%i+1.00617122801969079936395710029b0 
 [x^4+a*x^2+b*x+c,
  x^4-2.54325618867219212419273854599b0*x^2
     +1.04338972004885821105632366611b0*x+5.0b-1] 
dist: 3.34936273279166823298162816124b-19 
1 multi-roots: 
 (-3.77185753862812953984534199095b-24*%i)-6.38943104246272475855369706517b-1 
 3.77185746499376146262928840184b-24*%i-6.38943104246272475855328903805b-1 
 [x^4+a*x^2+b*x+c,x^4+1.04338972004885821105632366611b0*x+5.0b-1] 
dist: 4.14942038334135943047182928317b-23 
1 multi-roots: 
 1.14953323588296799935017434052b0-1.25168566885221419821833160929b-18*%i 
 1.25168566885221419738370885239b-18*%i+1.14953323588296800153076203092b0 
 [x^4+a*x^2+b*x+c,
  x^4-3.58590105561473348013717487389b0*x^2
     +2.16812942838935673533957135587b0*x+5.0b-1] 
dist: 3.31991426545575543023864496728b-18 
1 multi-roots: 
 (-2.58295399767902797007565021885b-19*%i)-4.29760429000264573649957309613b-1 
 2.58295399767902797030577470367b-19*%i-4.29760429000264573499174648236b-1 
 [x^4+a*x^2+b*x+c,
  x^4+2.15309806062091933677807113863b0*x^2
     +2.16812942838935673533957135587b0*x+5.0b-1] 
dist: 5.38146323165938018060210022577b-19 
1 multi-roots: 
 1.2683963313168151249994797521b0-1.02128852191271037829509986173b-17*%i 
 1.02128852191271037157319651058b-17*%i+1.26839633131681514919485290902b0 
 [x^4+a*x^2+b*x+c,
  x^4-4.51570275957450820467053128978b0*x^2
     +3.29286913672985525962281904563b0*x+5.0b-1] 
dist: 3.16643045115257576716717302982b-17 
1 multi-roots: 
 8.98733613243950412511068357208b-21*%i-2.98842309414307218067753665713b-1 
 (-8.98733613243950412511912321165b-21*%i)-2.98842309414307218063144975543b-1 
 [x^4+a*x^2+b*x+c,
  x^4+5.33076228416614959738464811916b0*x^2
     +3.29286913672985525962281904563b0*x+5.0b-1] 
dist: 1.85561005632311052538934339445b-20 
1 multi-roots: 
 1.315498629312029794561387534b0-3.5935851244110502148689984252b-18*%i 
 3.5935851244110502062082304748b-18*%i+1.31549862931202980379594900061b0 
 [x^4+a*x^2+b*x+c,
  x^4-4.90268221512206394838567282523b0*x^2
     +3.79286913672985525962281904563b0*x+5.0b-1] 
dist: 1.1701817878693290753327731022b-17 
1 multi-roots: 
 2.54178527994425949722680256301b-23*%i-2.61198261984724332021510649724b-1 
 (-2.54178527994425949722681244282b-23*%i)-2.61198261984724332021482623075b-1 
 [x^4+a*x^2+b*x+c,
  x^4+7.12406849810570318368614385351b0*x^2
     +3.79286913672985525962281904563b0*x+5.0b-1] 
dist: 5.80496512960753920779203206589b-23 
[T,F]: [92,175] 

Evaluation took 13.7400 seconds (13.7800 elapsed) using 1299.854 MB.

(%o2) [[c = root(c,1),b = root(126976*c^3-135*b^4,1),
        root(8*a*c-9*b^2-2*a^3,1) <= a,true],
       [root(c,1) < c,b < root(b,1),
        root(256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,2)
          <= a,true],
       [root(c,1) < c,b = root(b,1),
        root(256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,1)
          <= a,true],
       [root(c,1) < c,root(b,1) < b,
        root(256*c^3-128*a^2*c^2+(144*a*b^2+16*a^4)*c-27*b^4-4*a^3*b^2,2)
          <= a,true]]

2017-03-24

CAD on maxima

SARAG https://github.com/andrejv/maxima/tree/master/share/contrib/sarag を待ちきれない方のために作ってみました.ただし,lifting のネックである根の分離は realroots に任せ,符号判定も近似的です.

使用例(wxmaxima 等で実行すると見易いと思います)

(vpeds ( [x,a,b],0,0,3,0 ),cnnm(cad ( '(   a*x^2+b<0 and x>0     )) )  );
(vpeds ( [x,a,b],0,0,11,0 ),cnnm(cad ( '(   a*x^2+b<0 and x>0     )) )  );
(vpeds ( [x,a,b],0,0,11,0 ),cnnm(cad ( '(   a*x^5+b*x+1<0 and x>0     )) )  );
(vpeds ( [x,a,b],0,0,3,0 ),cnnm(cad ( '(   sqrt(x)<a*x+b  ) ))  );

f:id:ehito:20170327215549p:image:w640

(%i1) (vpeds ( [x,a],0,0,11,0 ),cnnm(cad ( '(  x*(x-2)*(x-3)*(x-5)*(x-7)=a ) ))  );

connecting cells. 
connecting cells. 
matrix([a < root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,1),
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)],
       [a = root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,1),
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,2)],
       [root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,1) < a
          and a < root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,
                       2),
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,2)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,3)],
       [a = root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,2),
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,2)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,3)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,4)],
       [root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,2) < a
          and a < root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,
                       3),
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,2)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,3)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,4)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,5)],
       [a = root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,3),
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,2)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,3)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,4)],
       [root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,3) < a
          and a < root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,
                       4),
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,2)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,3)],
       [a = root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,4),
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)
          or x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,2)],
       [root(3125*a^4+20592*a^3-16391308*a^2+244684800*a+2540160000,4) < a,
        x = root(x^5-17*x^4+101*x^3-247*x^2+210*x-a,1)])
  
Evaluation took 2.3600 seconds (2.3600 elapsed) using 540.776 MB.


なお,例によって,コードの大半は結果の簡約に費やされています.

/* 20170324 22:04:46 */
showtime:on$
display2d:false$
prton2():=(prt:print,prt2:print)$
prton():=(prt:print)$
prtoff():=kill(prt,prt2)$
vpeds(v,p,e,d,s):=block([],
%vv:v,
algexact:true,
bsolve:false,
dtype:0,
if p=1 then (prtoff(),prton())
 elseif p=2 then prton2()
 else (ratprint:off,prtoff()),
if e=0 then delv0 (L,vv):=delv0s (L,vv)
 else delv0 (L,vv):=delv0m (L,vv),
if d=0 then getsample (a,b,c):=getsample0 (a,b,c)
 elseif d=1 then getsample (a,b,c):=getsample1 (a,b,c)
 elseif d=11 then (dtype:11,getsample (a,b,c):=getsample11 (a,b,c))
 elseif d=2 then getsample (a,b,c):=getsample2 (a,b,c)
 else (getsample (a,b,c):=getsample1 (a,b,c), bsolve:true),
if s=1 then dispsample:true else dispsample:false,
usersimp:simp,
simp:false
)$
matchdeclare([aa,bb,cc],true)$
kill("implies")$
infix("implies",60,40)$
(x implies y):=(not(x) or y)$

%P:[]$
getlcP(f):=block([ff:expand(f),d,lc],
d:hipow(ff,%v),lc:coeff(ff,%v,d),/*print(%v),*/
if member(%v,listofvars(ff)) then %P:append(%P,[ff]) 
elseif listofvars(ff)#[] then %C:append(%C,[ff]),
if not(constantp(lc)) then
 (%C:append(%C,[lc]),getlcP(ff-lc*(%v)^d))
)$

gcd2(f,g,v):=block([p1:f,p2:g,p3:1,k],
    for k:0 unless p3=0 do
(p3:remainder (p1,p2,v),p1:p2,p2:p3),factor(content(p1,v)[2]))$
sqfree(f,v):=block([],
if member(v,listofvars (f)) then 
 content( divide (f,gcd2 (f,diff(f,v),v),v) [1] ,v) [2] 
else f
)$
sqfreem(L,v):=block([],
if is(L=[]) then [] else 
listify(setify( map(lambda([f],sqfree (f,v)),L) ))
)$
resultant1(f,v):=block ([g:sqfree(f,v)],
resultant (g,diff (g,v),v ) )$
resultant2(f1,f2,v):=block (
[g1: quotient (f1,gcd2 (f1,f2,v),v),
 g2: quotient (f2,gcd2 (f1,f2,v),v)],
resultant (g1,g2,v ) )$
delv0m(L,v):=block([P:[],PP,i,lp],
delv0 (LL,vv):=delv0s (LL,vv),
%C:[],%v:v,
map(lambda([f],if member(%v,listofvars(f)) then P:append(P,[f]) 
else %C:append(%C,[f])),L),
PP:map("[",P),prt(PP),
/*
PP:map(lambda([f],(%P:[],getlcP(f),%P)),P),prt(PP),
*/
map(lambda([f],%C:append(%C,[resultant1(f,%v)])),flatten(PP)),
lp:length(PP),/*prt([%C,P]),*/
%C:append(%C,flatten(makelist(makelist(makelist(makelist(resultant2(PP[i][ii],PP[j][jj],%v),ii,1,length(PP[i])),jj,1,length(PP[j])),j,i+1,lp),i,1,lp-1))),
listify(setify(delete(false,map(lambda([f],if constantp(f) then false else f),%C))))
)$
delv0s(L,v):=block([P:[],PP,i,lp],
%C:[],%v:v,
map(lambda([f],if member(%v,listofvars(f)) then P:append(P,[f]) 
else %C:append(%C,[f])),L),
/*
PP:map("[",P),print(PP),
*/
PP:map(lambda([f],(%P:[],getlcP(f),%P)),P),prt(PP),
map(lambda([f],%C:append(%C,[resultant1(f,%v)])),flatten(PP)),
lp:length(PP),/*prt([%C,P]),*/
%C:append(%C,flatten(makelist(makelist(makelist(makelist(resultant2(PP[i][ii],PP[j][jj],%v),ii,1,length(PP[i])),jj,1,length(PP[j])),j,i+1,lp),i,1,lp-1))),
listify(setify(delete(false,map(lambda([f],if constantp(f) then false else f),%C))))
)$

load ("grobner")$ 
delv(L,vl):=block([p:[sqfreem(L,vl[1])],k],
for k:1 thru length(vl)-1 do
 p:append(p,[sqfreem( delv0(last(p),vl[k])  ,vl[k+1])]),
 p:append(rest (p,-1),
         [listify(setify(
          poly_normalize_list  (last (p), [last (vl) ]  )))]), 
reverse(p)
)$
factors(f):=block ([g:factor(f)],
if atom(g) then g
elseif op(g)="+" then g else
(if op(g)="/" then g:args(g)[1],
 if atom(g) then g
 elseif op(g)="-" then g:-g,
 if atom(g) then g
 elseif op(g)="*" then
  delete(0,
  map(lambda([e],
  if constantp(e) then 0
  elseif atom(e) then e
  elseif op(e)="^" then args(e)[1] else e),
args(g)))
 elseif op(g)="^" then args(g)[1]
 else g
)
 )$
factorsm(L):=listify(setify(flatten(map(factors,L))))$
delv(L,vl):=block([p:[factorsm(L)],k],
for k:1 thru length(vl)-1 do
 p:append(p,[factorsm( delv0(last(p),vl[k]) )]),
 p:append(rest (p,-1),[factorsm(last(p))]), 
reverse(p)
)$
realonly:on$
getsample0(sub,p,v):=block([p1,p2,q,k],
p1:listify(setify(flatten(map(lambda([f],algsys([f],listofvars(f))),subst(sub[2],p))))),
if p1=[] then p2:[0]
 else (p1:sort(map(rhs,p1),"<"),q:map("[",p1),
       p2:sort(listify(setify(append(p1,(append([first(p1)-1],p1)+append(p1,[last(p1)+1]))/2))),"<")),
makelist([[0.5*k],[v=p2[k]]],k,1,length(p2))
)$

getsample1(sub,p,v):=block([p1,sf,rt,T:[],S:[],p2,q,k],
p1:apply(append,map(lambda([f],
(sf: subst(sub[2],f),
rt:if constantp (sf) then []
 else flatten(solve(   sf  ,v)),
rt:if rt=[] then []
 else flatten(map(lambda([e],if is(imagpart(rhs(e))=0) then e else [] ), rt )),
prt2([p,sf,v,rt]),
rt:if rt=[] then []
 else (rt:sort (map (rhs,rt),"<" ), makelist([[f,k ],rt[k]],k,1,length (rt)  ))
)),p)),prt2("p1:"),prt2(p1),
if p1=[] then p2:[0]
else 
(map (lambda ( [e], if not(member (e [2],T ))
                 then (T:append(T,[e[2]]),S:append(S,[e]))  ),p1 ),
prt2 ("S:"), prt2(S),
if S=[] then (p1:[],p2:[0]) else (   
S:sort (S,lambda ( [u,t], u[2]<t[2] ) ), 
[q,p1]:[map (first,S),map (last,S)], 
prt2 ("q:"), prt2(q),prt2 ("p1:"), prt2(p1),
p2:sort(listify(setify(append(p1,
(append([first(p1)-1],p1)+append(p1,[last(p1)+1]))/2))),"<")
 )   ),
prt2 ("p2:"), prt2(p2),
makelist([[
if p1=[] then true 
elseif is(k=1) then v<first(q) 
elseif is(k=length (p2) ) then last(q)<v 
elseif evenp(k) then v=q[k/2] 
else  (q[(k-1)/2]<v and v<q[(k+1)/2])
],[v=p2[k]]],k,1,length(p2))
)$

load ("grobner") $
getrt(sub,f,v):=block([eqv,subv:listofvars (sub),p1,sf,rt00:[],rt01:[],rt0,rt:[],sl,k],prt2(sub,f,v),
p1:makelist (
if atom(sub [1] [k]) then sub[2][k][1]
elseif is (op (sub [1] [k] )="=") then args(rhs(sub [1] [k] ))[1]
else sub[2][k][1],
             k,1,length (sub [2] ) ),
p1:append (p1, [f] ),prt2 ("p1:",p1), 
sf:poly_reduced_grobner (p1,append (subv,[v] ) ),prt2 ("sf:",sf), 
map (lambda ([e],if listofvars (e)=[v] then rt00:append (rt00, [e] ) else rt01:append (rt01, [e] )  ),sf ), 
if rt00=[] then rt:[]
else
(rt0:apply(realroots,rt00),
 if rt0=[] then rt:[] else
 (sub2:apply("+",map(lambda ( [e],
                     abs (lhs (e[2])-rhs (e[2]) )
                      ),sub [2]  )),
                     /* cf. apply("+",[]) = 0 */
  for eqv in rt0 do
  (sl:algsys(subst (eqv,rt01),subv),
   ans:apply(min, map (lambda ( [e], subst (e,sub2)  ),sl )),
   if is(ans<10^(-5)) then rt:append (rt, [eqv] ),
   prt2(eqv,sl,"min:",float(ans))   )
  )
),
rt:if rt=[] then []
 else (rt:sort (map (rhs,rt),"<" ),
       makelist([root(f,k),[last(rt00),rt[k]]],k,1,length (rt)  )),
prt2("rt:",rt),rt
)$
rootsepsilon:1.0e-10$
getsample11(sub,p,v):=block([p1,S:[],T:[],p2,p0,q,k],
p1:apply(append,map(lambda([f],if member (v,listofvars (f) ) then getrt(sub,f,v) else []),p)),
prt2("p1 in 11:",p1),
if p1=[] then p2:[0]
else 
(map (lambda ( [e], if not(member (e[2][2],T ))
                 then (S:append(S,[e]),T:append(T,[e[2][2]]))  ),p1 ),
prt2 ("S:",S),
if S=[] then (p1:[],p2:[0]) else (   
S:sort (S,lambda ( [u,t], u[2][2]<t[2][2] ) ), 
[q,p0]:[map(first,S),map(last,S)],
p0p:map(first,p0),p1:map(last,p0),
prt2 ("q:"), prt2(q),prt2 ("p1:"), prt2(p1),
p2:sort(listify(setify(append(p1,
(append([first(p1)-1],p1)+append(p1,[last(p1)+1]))/2))),"<")
 )   ),
prt2 ("p2:"), prt2(p2),
makelist([[
if p1=[] then true 
elseif is(k=1) then v<first(q) 
elseif is(k=length (p2) ) then last(q)<v 
elseif evenp(k) then v=q[k/2] 
else  (q[(k-1)/2]<v and v<q[(k+1)/2])
],[
[(if oddp(k) then v-p2[k] else p0p[k/2]),
 (if oddp(k) then v=p2[k] else v=p1[k/2])]
]],k,1,length(p2))
)$

getsample2(sub,p,v):=block([sub1,rt,q,p1,p2,k],
sub1:delete([],map(lambda ( [e], if atom (e) then [] elseif op(e)="=" then e else []), sub[1] ) ), 
rt:subst(sub1,p),
rt:flatten(map (lambda ( [e], if constantp (e) then [] else e  ), rt )), 
if rt=[] then rt:[]
else rt:flatten(map (lambda ( [e],solve (e,v)  ),rt ) ),
if rt=[] then rt:[]
else
 (rt:map (lambda ( [e],[e,ratsimp(subst (sub [2],e )) ]  ), map(rhs,rt) ),
  rt:delete([],map(lambda([e],if imagpart(e [2])=0 then e else [] ), rt )),
  rt:listify(setify(rt))
 ),
if rt=[] then (p1:[],p2:[0])
 else (   
rt:sort (rt,lambda ( [u,t], u[2]<t[2] )),/*print (rt),*/  
[q,p1]:[map (first,rt),map (last,rt)], 
p2:sort(listify(setify(append(p1,
(append([first(p1)-1],p1)+append(p1,[last(p1)+1]))/2))),"<")
 ),
/*prt2 ("p2:"), prt2(p2),*/
makelist([[
if p1=[] then true 
elseif is(k=1) then v<first(q) 
elseif is(k=length (p2) ) then last(q)<v 
elseif evenp(k) then v=q[k/2] 
else  (q[(k-1)/2]<v and v<q[(k+1)/2])
],[v=ratsimp( p2[k] )]],k,1,length(p2))
)$
is2(f):=
if atom (f) then f
elseif member (op (f), ["or","and"]  ) then map (is,f)
else is (f)$ 
kill("Lo","Lc","Go","Gc","Eq")$
infix("Lo",60,40)$
infix("Lc",60,40)$
infix("Go",60,40)$
infix("Gc",60,40)$
infix("Eq",60,40)$
(x Lo y):=if member(extd,listofvars([x,y])) then false
 else float(10^(-5)+x<y)$
(x Lc y):=if member(extd,listofvars([x,y])) then false
 else float(x<y+10^(-5))$
(x Go y):=if member(extd,listofvars([x,y])) then false
 else float(x>y+10^(-5))$
(x Gc y):=if member(extd,listofvars([x,y])) then false
 else float(10^(-5)+x>y)$
(x Eq y):=if member(extd,listofvars([x,y])) then false
 else abs(float(x-y))<10^(-5)$
kill("implies")$
infix(implies,60,40)$
"implies"(x,y):=((not(x)) or (y))$
defrule(imp2m, (aa) implies (bb), mor ( mnot((aa)),(bb) ));
defrule(noteq2m, (aa) # (bb), mnot (equal((aa),(bb))));
defrule(symneq2m, notequal((aa),(bb)), mnot (equal((aa),(bb))));
cad_monic(F0):=block ( [F,mpp:[],p,sx,sxl,i,k],
F:addD(subst(["="=equal,"and"=mand,"or"=mor,"not"=mnot],F0)),
F:apply1(F,imp2m,noteq2m,symneq2m),
simp:on,
for vk in %vv do F:sepaF(F,vk),
for vk in %vv do F:sepaS(sepaS(F,vk),vk),
for vk in %vv do F:sepaF(F,vk),
F:ev(subst([mand="and",mor="or",mnot="not"],F),eval),prt(F),
F:scanmap(lambda([f],if atom(f) then f
        elseif member(op(f),["<","<=",">",">=",equal,notequal]) then
        (p:dnf(sepalcv(f,%vv[1])),prt(p),
         if op(p)="or" then (mpp:append (mpp, [args(p)] ),
                             concat(mp,length (mpp) ))
         else f
         )
        else f),F),
print([F,mpp]),
if mpp=[] then [F] else 
(
i:0,
sxl:map(lambda([n],(i:i+1,product(concat(sx,i)-k,k,1,n))),map(length,mpp)),
sxl:solve(sxl),
map(lambda([sxl],subst(ev(subst(mppp=mpp,subst(sxl,makelist(concat(mp,i)=mppp[i][concat(sx,i)],i,1,length(mpp)))),eval),F)),sxl)
)
) $
/* epsilon sgn-det ver.  */
cad (F0) :=block ([F,vk,P2:{},pp,vv:reverse(%vv),pn:[[[],[]]],pn0],
F:addD(subst(["="=equal,"and"=mand,"or"=mor,"not"=mnot],F0)),
F:apply1(F,imp2m,noteq2m,symneq2m),
simp:on,
for vk in %vv do F:sepaF(F,vk),
for vk in %vv do F:sepaS(sepaS(F,vk),vk),
for vk in %vv do F:sepaF(F,vk),
F1:subst(["<"="Lo",">"="Go","<="="Lc",">="="Gc",equal="Eq"],F),
F:ev(subst([mand="and",mor="or",mnot="not"],F),eval),
F1:ev(subst([mand="and",mor="or",mnot="not"],F1),eval),
prt2(F1),
prt(F),
/*
F:subst(["<"="Lo",">"="Go","<="="Lc",">="="Gc",equal="Eq"],F),
*/
scanmap (lambda ( [f], if atom (f) then f
 elseif member (op (f), ["<","<=",">",">=",equal,notequal]) then P2:append (P2, {lhs (f)-rhs (f)  } ) else f   ),F ),
simp:on,P2:listify (P2),
/*P2:map(lambda ([f], sqfree (f,(%vv)[1])),P2), */
pp:map(factor,delv(P2,%vv)), prt(pp),%pp:pp,
for n:1 thru length (vv) do
 pn:apply(append,map(lambda([e],map(lambda([t],map(append,e,t)),getsample(e,pp[n],vv[n]))),pn)),prt(length (pn)),pn00:pn,
pn:
if is(dtype=11) then
delete(false,map(lambda([l],if is2( (subst( map(last,l[2]), F1)) ) then (if is(dispsample=true) or is(bsolve=true) then l else l[1])),pn))
else
delete(false,map(lambda([l],if is2( (subst(l[2], F1)) ) then (if is(dispsample=true) or is(bsolve=true) then l else l[1])),pn)),
/*print(pn),*/
simp:usersimp,
if bsolve=true and dispsample=true then cad2s (pn)
elseif bsolve=true and dispsample=false then cad2 (pn)
else pn
)$ 

cadm(f):=block([usr_display2d],
thisout:cad(f),
usr_display2d:display2d,
set_display('xml),
print(apply(matrix,thisout)),
display2d:usr_display2d,return(done)
)$
addD0(f):=block([DN],
if atom(f) then return(f)
elseif member(op(f),["<",">","<=",">=",equal]) then
  (DN:{},
   scanmap(lambda([t],if atom(t) then t
           else (DN:ev(append(DN,{notequal(ratsimp(denom(t)),0)}),simp),t)),
           f),prt2([f,DN]),
   DN:ev(substpart("and",DN,0),eval),prt2([f,DN]),
   if is(DN=false) then return(false)
                   else return( mand((f) , (apply1(DN,symneq2m))) ))
else return(f)
)$
addD(F):=block([addD0,S],
prt2("addD:"),
S:scanmap(addD0,F,bottomup),prt2(S),
return(S)
)$
sepaF0(f,v):=block([p,DN,NU],
if atom(f) then return(f)
elseif
 member(op(f),["<",">","<=",">=",equal]) then
  (p:factor(lhs(f)-rhs(f)),
   NU:num(p),DN:denom(p),prt2([p,NU,DN]),
   if member(v,listofvars(DN)) and member(op(f),["<",">"])
    then return(apply(op(f),[NU*DN,0]))
   elseif member(v,listofvars(DN)) and member(op(f),["<=",">="])
    then return( mand( (apply(op(f),[NU*DN,0])) , (mnot(equal(DN,0))) ) )
   elseif member(v,listofvars(DN)) and op(f)=equal
    then return( mand( (equal(NU,0)) , (mnot(equal(DN,0))) ) )
   else return(f))
else return(f))$
sepaF(F,v):=block([S],
prt2("sepaF for",v,":"),
S:scanmap(lambda([s],sepaF0(s,v)),F),
prt2(S),return(S)
)$
sepaSlocal(ff,v):=block([sepaSlocal0,getS,getSqrt,p,Sqrt,A,B,C],
sepaSlocal0(f):=block([],
 if atom(f) or is(getS=true) then return(f)
 elseif op(f)=sqrt and member(v,listofvars(f))
  then (getS:true,getSqrt:f,return(Sqrt))
 else return(f)),
if atom(ff) then return(ff)
elseif member(op(ff),["<",">","<=",">=",equal]) then
 (
  getS:false,p:scanmap(sepaSlocal0,lhs(ff)-rhs(ff)),
   (if is(getS=true) then 
    (p:subst(getSqrt=Sqrt,p),
     [A,B]:[coeff(expand(p),Sqrt,1),getSqrt^2],C:expand(A*Sqrt-p),
     return(mand( [A,B,C,op(ff)] , (getSqrt^2 >= 0) )))
    else return(ff))
 )
else return(ff))$
defrule(sepaS1,[aa,bb,cc,equal],
mand(mor(mand(aa >= 0,cc >= 0),mand(aa < 0,cc <= 0)),/*bb >= 0,*/
            equal(cc^2-aa^2*bb,0))
)$
defrule(sepaS2,[aa,bb,cc,"<="],
mand(mor(mand(aa < 0,aa^2*bb-cc^2 >= 0),
                mand(cc >= 0,aa^2*bb-cc^2 <= 0))/*,bb >= 0*/)
)$
defrule(sepaS3,[aa,bb,cc,">="],
mand(mor(mand(aa > 0,cc^2-aa^2*bb <= 0),
                mand(cc <= 0,cc^2-aa^2*bb >= 0))/*,bb >= 0*/)
)$
defrule(sepaS4,[aa,bb,cc,"<"],
mand(mor(mand(aa < 0,cc > 0),mand(aa < 0,aa^2*bb-cc^2 > 0),
                mand(cc > 0,aa^2*bb-cc^2 < 0))/*,bb >= 0*/)
)$
defrule(sepaS5,[aa,bb,cc,">"],
mand(mor(mand(aa > 0,cc < 0),mand(aa > 0,cc^2-aa^2*bb < 0),
                mand(cc < 0,cc^2-aa^2*bb > 0))/*,bb >= 0*/)
)$ 
sepaS(F,v):=block([S],
prt2("sepaS:"),
S:scanmap(lambda([s],sepaSlocal(s,v)),expand(F)),
prt2(S),
S:expand(apply1(S,sepaS1,sepaS2,sepaS3,sepaS4,sepaS5)),
prt2(S),return(S)
)$
sepalcv(f,v):=block([pp,dg,lc],
pp:expand(lhs(f)-rhs(f)),dg:hipow(pp,v),lc:ratcoef(pp,v,dg),
if atom(f) then return(f)
elseif member(op(f),["<",">","<=",">=",equal,notequal]) then
 (if dg=0 then return(f)
 else return(
  (notequal(lc,0) and f) or
  (equal(lc,0) and sepalcv(apply(op(f),[expand(pp-lc*v^dg),0]),v))
  ))
else return(f))$
/* cnf dnf */
kill("Or");
kill("And");
infix(Or,60,40)$
infix(And,60,40)$
matchdeclare([aa,bb,cc],true)$
defrule(ru05r, (aa) Or ((bb) And (cc)),
 ((aa) Or (bb)) And ((aa) Or (cc)))$
defrule(ru08r, ((bb) And (cc)) Or (aa),
 ((aa) Or (bb)) And ((aa) Or (cc)))$
defrule(ru05a, (aa) And ((bb) Or (cc)),
 ((aa) And (bb)) Or ((aa) And (cc)))$
defrule(ru08a, ((bb) Or (cc)) And (aa),
 ((aa) And (bb)) Or ((aa) And (cc)))$
defrule(ru00r, (aa) Or (bb), (aa) or (bb))$
defrule(ru00a, (aa) And (bb), (aa) and (bb))$
orand2orand(f):=block([g],g:f,
if atom(g) then return(g),
if op(g)="or" then g:xreduce("Or",args(g)),
if op(g)="and" then g:xreduce("And",args(g)),g)$
cnf(f):=applyb2(applyb2(scanmap(orand2orand,f),ru05r,ru08r),ru00r,ru00a)$
dnf(f):=applyb2(applyb2(scanmap(orand2orand,f),ru05a,ru08a),ru00r,ru00a)$

cad2(F):=map(lambda([L],  (U:[], map(lambda([f],
 (if atom (f) then f
  elseif op(f)="=" then
   (sol:solve(subst(U,[first(rhs(f))]),lhs(f)),prt2(sol),
    sol:lhs(f)=(sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), map(rhs,sol) ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(rhs(f))][1],
    U:append (U, [sol] ),sol)
  elseif op(f)="<" and listp(rhs (f)) then
   (sol:solve(subst(U,[first(rhs(f))]),lhs(f)),prt2(sol),
    sol:lhs(f)<(sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), map(rhs,sol) ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(rhs(f))][1])
  elseif op(f)="<" and listp(lhs (f)) then
   (sol:solve(subst(U,[first(lhs(f))]),rhs(f)),prt2(sol),
    sol:(sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), map(rhs,sol) ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(lhs(f))][1]<rhs(f))
  elseif op(f)="and" then
   (sol1:solve(subst(U,[first(lhs((args(f))[1]))]),rhs((args(f))[1])),    sol1:map(rhs,sol1),
    sol2:solve(subst(U,[first(rhs((args(f))[2]))]),lhs((args(f))[2])),    sol2:map(rhs,sol2),
    prt2([sol1,sol2]),
    (sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), sol1 ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(lhs((args(f))[1]))][1] < rhs((args(f))[1]) and
    lhs((args(f))[2]) < (sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), sol2 ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(rhs((args(f))[2]))][1]
    )
  else f)
  ),L[1]))   ),F)$
cad2s(F):=map(lambda([L],  [(U:[], map(lambda([f],
 (if atom (f) then f
  elseif op(f)="=" then
   (sol:solve(subst(U,[first(rhs(f))]),lhs(f)),prt2(sol),
    sol:lhs(f)=(sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), map(rhs,sol) ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(rhs(f))][1],
    U:append (U, [sol] ),sol)
  elseif op(f)="<" and listp(rhs (f)) then
   (sol:solve(subst(U,[first(rhs(f))]),lhs(f)),prt2(sol),
    sol:lhs(f)<(sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), map(rhs,sol) ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(rhs(f))][1])
  elseif op(f)="<" and listp(lhs (f)) then
   (sol:solve(subst(U,[first(lhs(f))]),rhs(f)),prt2(sol),
    sol:(sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), map(rhs,sol) ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(lhs(f))][1]<rhs(f))
  elseif op(f)="and" then
   (sol1:solve(subst(U,[first(lhs((args(f))[1]))]),rhs((args(f))[1])),    sol1:map(rhs,sol1),
    sol2:solve(subst(U,[first(rhs((args(f))[2]))]),lhs((args(f))[2])),    sol2:map(rhs,sol2),
    prt2([sol1,sol2]),
    (sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), sol1 ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(lhs((args(f))[1]))][1] < rhs((args(f))[1]) and
    lhs((args(f))[2]) < (sort( delete([],map(lambda([e], if imagpart(subst(L[2],e))=0 then [e,subst(L[2],e)] else []), sol2 ))  , lambda ( [ss,tt], ss[2]<tt[2]   ) ))[last(rhs((args(f))[2]))][1]
    )
  else f)
  ),L[1])),L [2]   ] ),F)$
cnn(LL0):=block([n,k,LL:subst("="=equal,LL0),LA,LB,LB0,s,t,L0,M],
print("connecting cells."),
if is(dispsample=true)
then
 (n:length(LL[1][1]),
for k:n step -1 thru 1 do
	(
LL:append(LL,[[append(makelist(0,n),[1]),makelist([0,0],n)]]),
L0:LL[1][1],t:delete(L0[k],L0),s:false,
LL:delete(0,map(lambda([L],
(LA:L[1],
if is(t=delete(LA[k],LA)) then (s:(s or LA[k]),LB:L[2],0)
else (M:subst(L0[k]=s,L0),L0:LA,t:delete(LA[k],LA),s:LA[k],LB0:LB,LB:L[2],append([M],[LB0]))
)
),LL))
	),
thisout0:LL,
thisout:map(lambda([L],[map(lambda([e],if atom(e) then e elseif op(e)="or" then cnn0(e) else e),L[1]),L[2]] ),LL)
 )
else
 (n:length(LL[1]),
for k:n step -1 thru 1 do
	(
LL:append(LL,[append(makelist(0,n),[1])]),
L0:LL[1],t:delete(L0[k],L0),s:false,
LL:delete(0,map(lambda([L],
if is(t=delete(L[k],L)) then (s:(s or L[k]),0)
else (M:subst(L0[k]=s,L0),L0:L,t:delete(L[k],L),s:L[k],M)
),LL))
	),
thisout0:LL,
thisout:map(lambda([L],map(lambda([e],if atom(e) then e elseif op(e)="or" then cnn0(e) else e),L) ),LL)
 ),
thisout:subst([equal="="],thisout)
)$
distb(f):=block([],
if atom(f) then f
elseif member(op(f),["or","and"]) then map(distb,f)
elseif member(op(f),[equal,"<",">","<=",">="]) then apply(op(f),[{lhs(f)},{rhs(f)}])
else f
)$
cnn0(f):=block( [f1,S:[],v,Sb,T,f01], 
if atom(f) then f
else
 (
map(lambda([e],
    (if not(member(lhs(e),S)) then S:append(S,[lhs(e)]),
     if not(member(rhs(e),S)) then S:append(S,[rhs(e)]))),
    args(subst("and"="or",f))),
v:if is("and"=op((args(f))[1])) then S[2] else S[1],
Sb:map("{",delete(v,S)),T:makelist({10^5*k},k,length(Sb)),
prt2(S,Sb,T,map("=",Sb,T),f,subst(map("=",Sb,T),distb(f))),
f01:ev(subst("{"="(",subst(map("=",Sb,T),distb(f))),eval),prt2(f01),
f01:ora(subst(["="=equal],cineqs2(f01))),
if atom (f01) then f01 else subst(map("=",append([{v}],T),append([v],delete(v,S))),distb(f01))
 )
)$
cnnm(LL):=block([k,L0:LL,L1:cnn(LL),L2,usr_display2d],
for k:0 unless is(L0=L1) do (L2:cnn(L1),L0:L1,L1:L2),
usr_display2d:display2d,
set_display('xml),
print(apply(matrix,L1)),
display2d:usr_display2d,return(done)
)$
infix ("==",50,50)$ 
nary ("&&",50,50)$ 
nary ("||",50,50)$
sqrtdispflag:off$
mma(F):=subst (["="="==","and"="&&","or"="||"],ora(subst (["="="==",%i=I],F)))$
sqrtdispflag:on$
ora(f):=block([],
if not(listp(f)) then return(f),
if atom(f) then return(f)
else apply("or",map(lambda([e],apply("and",e)),subst("="=equal,f)))
)$
cineqs2(F):=block([lv,v,imagunit,L,M,N,k,K,J],
lv:listofvars(F),if length(lv)#1 then return([[is(F)]]) else v:first(lv),
L:sort(listify(setify(flatten(scanmap(
 lambda([e],
if atom(e) then e
elseif member(op(e),["and","or"]) then substpart("[",e,0)
elseif member(op(e),["<",">","<=",">=","=","#",equal])
 then map(lambda([t],if member(imagunit,listofvars(t))
  then [] else rhs(t)),subst(%i=imagunit,solve(substpart("=",e,0),v)))
else e),
F)))),"<"),
if L=[] then return([[is2(subst(v=0,F))]]),
L:sort(append(L,(append([first(L)-1],L)+append(L,[last(L)+1]))/2),"<"),
M:map(lambda([e],if member(op(F),["and","or"]) then map(is2,rat(subst(v=e,F)))
 else is2(rat(subst(v=e,F)))),L),
if length(setify(M))=1 then return([[is2(subst(v=0,F))]]),
L:append([0,0],L,[0,0]),M:append([true,true],M,[true,true]),
K:[],for k:3 thru length(M)-2 do (
if oddp(k) then
 if part(M,k) then
 (if not(part(M,k-1)) then K:append(K,[part(L,k-1)<v])
  elseif not(part(M,k-2)) then K:append(K,[part(L,k-1)<=v]) else K:K,
  if not(part(M,k+1)) then K:append(K,[v<part(L,k+1)])
  elseif not(part(M,k+2)) then K:append(K,[v<=part(L,k+1)]) else K:K)
 else K:K
else 
 if not(part(M,k-1)) and part(M,k) and not(part(M,k+1)) then
 K:append(K,[v=part(L,k)]) else K:K),
N:[],J:[],for k in K do
 if rhs(k)=v then J:[k]
 else (N:append(N,[append(J,[k])]),J:[]),
delete([],append(N,[J]))
)$

2017-02-11

Maxima さん,勘弁してください.

1と2は特別なのでしょうか?

k@k ~ $ rmaxima --init=
Maxima 5.39.0 http://maxima.sourceforge.net
using Lisp CMU Common Lisp 21b (21B Unicode)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) newcontext();facts();
(%o1)                             context2947
(%o2)                                 []
(%i3) apply(assume,[x > 0,equal(1,sqrt(x))]);
(%o3)                     [x > 0, equal(1, sqrt(x))]
(%i4) apply(assume, [equal(-1,-sqrt(x))]);
*A2 gc_alloc_new_region failed, nbytes=8.
 CMUCL has run out of dynamic heap space (512 MB).
  You can control heap size with the -dynamic-space-size commandline option.

Imminent dynamic space overflow has occurred:
Only a small amount of dynamic space is available now.
Please note that you will be returned to the Top-Level without
warning if you run out of space while debugging.

Maxima encountered a Lisp error:

 Heap (dynamic space) overflow

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i5) 
Maxima encountered a Lisp error:

 Interrupted at #xF7FDB430.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i5) facts();
(%o5)                     [x > 0, equal(1, sqrt(x))]
(%i6) newcontext();facts();
(%o6)                            context178628
(%o7)                                 []
(%i8) apply(assume,[x > 0,equal(2,sqrt(x))]);
(%o8)                     [x > 0, equal(2, sqrt(x))]
(%i9) apply(assume, [equal(-2,-sqrt(x))]);
*A2 gc_alloc_new_region failed, nbytes=8.
 CMUCL has run out of dynamic heap space (512 MB).

 Returning to top-level.
*A2 gc_alloc_new_region failed, nbytes=8.
 CMUCL has run out of dynamic heap space (512 MB).

 Returning to top-level.
*A2 gc_alloc_new_region failed, nbytes=8.
 CMUCL has run out of dynamic heap space (512 MB).

 Returning to top-level.
rlwrap: warning: maxima killed by SIGTRAP.
rlwrap has not crashed, but for transparency,
it will now kill itself (without dumping core)with the same signal

Trace/breakpoint trap
k@k ~ $ rmaxima --init=
Maxima 5.39.0 http://maxima.sourceforge.net
using Lisp CMU Common Lisp 21b (21B Unicode)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) newcontext();facts();
(%o1)                             context2947
(%o2)                                 []
(%i3) apply(assume,[x > 0,equal(2,sqrt(x))]);
(%o3)                     [x > 0, equal(2, sqrt(x))]
(%i4) apply(assume, [equal(-2,-sqrt(x))]);

Maxima encountered a Lisp error:

 Interrupted at #x1006880B.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i5) facts();
(%o5)                     [x > 0, equal(2, sqrt(x))]
(%i6) newcontext();facts();
(%o6)                            context101642
(%o7)                                 []
(%i8) apply(assume,[x > 0,equal(3,sqrt(x))]);
(%o8)                     [x > 0, equal(3, sqrt(x))]
(%i9) apply(assume, [equal(-3,-sqrt(x))]);
(%o9)                             [redundant]
(%i10) facts();
(%o10)                    [x > 0, equal(3, sqrt(x))]
(%i11) newcontext();facts();
(%o11)                           context101663
(%o12)                                []
(%i13) apply(assume,[x > 0,equal(4,sqrt(x))]);
(%o13)                    [x > 0, equal(4, sqrt(x))]
(%i14) apply(assume, [equal(-4,-sqrt(x))]);
(%o14)                            [redundant]