Ask Your Question
1

Solve much slower than Mathematica for simple system

asked 2022-02-18 19:57:18 +0100

ddd gravatar image

updated 2022-02-18 21:27:21 +0100

Mathematica solves the following system of multivariate polynomials almost instantaneously while sagemath takes around 10 seconds. Is there any way to speed up solve?

vars('a15, x13_14, a4, a11, a0, x14_15, x11_13, x5_5, x9_12, a5, a12, x3_4, a1, x7_7, x11_14, x12_15, x5_6, x4_4, x9_9, a6, a13, x3_5, a2, x10_10, x7_8, x6_6, x5_7, x12_12, x8_8, a7, x3_6, x6_7, x14_14, a9, x15_15, x4_6, x11_11, x8_9, a8, x10_12, a14, x13_13, a3, a10, x4_7, x12_14, x11_12, x13_15, x10_13')

polys = [-x3_4*x9_12, -x10_12*x3_4, -x10_13*x3_4, -x11_12*x3_4, -x11_13*x3_4, -x11_14*x3_4, x3_4^2*x7_7, x7_8*x8_9, -x11_12^2*x8_8, -x12_12*x3_4 + x3_4*x4_4, -x12_14*x3_4 + x3_4*x4_6, -x12_15*x3_4 + x3_4*x4_7, -x13_13*x3_4 + x3_4*x5_5, -x13_14*x3_4 + x3_4*x5_6, -x13_15*x3_4 + x3_4*x5_7, -x14_14*x3_4 + x3_4*x6_6, -x14_15*x3_4 + x3_4*x6_7, -x15_15*x3_4*x7_8 + x3_4*x7_8, x3_4*x3_5*x7_7, x3_4*x3_6*x7_7, a0 - 1, a1 - 1, a2 - 1, a3 - 1, a4*x4_4 - 1, a5*x5_5 - 1, a6*x6_6 - 1, a7*x7_7 - 1, a8*x8_8 - 1, a9*x9_9 - 1, a10*x10_10 - 1, a11*x11_11 - 1, a12*x12_12 - 1, a13*x13_13 - 1, a14*x14_14 - 1, a15*x15_15 - 1]

vs = [a15, x13_14, a4, a11, a0, x14_15, x11_13, x5_5, x9_12, a5, a12, x3_4, a1, x7_7, x11_14, x12_15, x5_6, x4_4, x9_9, a6, a13, x3_5, a2, x10_10, x7_8, x6_6, x5_7, x12_12, x8_8, a7, x3_6, x6_7, x14_14, a9, x15_15, x4_6, x11_11, x8_9, a8, x10_12, a14, x13_13, a3, a10, x4_7, x12_14, x11_12, x13_15, x10_13]

%time solve(polys, *vs)

This takes about 10 seconds

edit retag flag offensive close merge delete

Comments

Try solving via Grobner basis: https://ask.sagemath.org/question/584...

Max Alekseyev gravatar imageMax Alekseyev ( 2022-02-18 21:11:48 +0100 )edit

2 Answers

Sort by » oldest newest most voted
4

answered 2022-02-19 12:53:53 +0100

rburing gravatar image

updated 2022-02-19 12:54:34 +0100

You can calulate a Gröbner basis with respect to a lexicographic ordering to get an equivalent "triangular" system that can be solved back-to-front by successive solving and substitution (introducing parameters whenever there is a choice to be made).

sage: R.<a15, x13_14, a4, a11, a0, x14_15, x11_13, x5_5, x9_12, a5, a12, x3_4, a1, x7_7, x11_14, x12_15, x5_6, x4_4, x9_9, a6, a13, x3_5, a2, x10_10, x7_8, x6_6, x5_7, x12_12, x8_8, a7, x3_6, x6_7, x14_14, a9, x15_15, x4_6, x11_11, x8_9, a8, x10_12, a14, x13_13, a3, a10, x4_7, x12_14, x11_12, x13_15, x10_13> = PolynomialRing(QQ, order='invlex')
sage: polys = [-x3_4*x9_12, -x10_12*x3_4, -x10_13*x3_4, -x11_12*x3_4, -x11_13*x3_4, -x11_14*x3_4, x3_4^2*x7_7, x7_8*x8_9, -x11_12^2*x8_8, -x12_12*x3_4 + x3_4*x4_4, -x12_14*x3_4 + x3_4*x4_6, -x12_15*x3_4 + x3_4*x4_7, -x13_13*x3_4 + x3_4*x5_5, -x13_14*x3_4 + x3_4*x5_6, -x13_15*x3_4 + x3_4*x5_7, -x14_14*x3_4 + x3_4*x6_6, -x14_15*x3_4 + x3_4*x6_7, -x15_15*x3_4*x7_8 + x3_4*x7_8, x3_4*x3_5*x7_7, x3_4*x3_6*x7_7, a0 - 1, a1 - 1, a2 - 1, a3 - 1, a4*x4_4 - 1, a5*x5_5 - 1, a6*x6_6 - 1, a7*x7_7 - 1, a8*x8_8 - 1, a9*x9_9 - 1, a10*x10_10 - 1, a11*x11_11 - 1, a12*x12_12 - 1, a13*x13_13 - 1, a14*x14_14 - 1, a15*x15_15 - 1]
sage: I = R.ideal(polys)
sage: %time G = I.groebner_basis(algorithm='libsingular:std')
CPU times: user 4.45 ms, sys: 91 µs, total: 4.55 ms
Wall time: 4.57 ms
sage: list(G)
[a15*x3_4*x7_8 - x3_4*x7_8, a15*x15_15 - 1, x13_14*x3_4 - x3_4*x5_6, a4*x3_4 - a12*x3_4, a4*x4_4 - 1, a11*x11_11 - 1, a0 - 1, x14_15*x3_4 - x3_4*x6_7, x11_13*x3_4, x5_5*a5 - 1, x5_5*x3_4 - x3_4*x13_13, x9_12*x3_4, a5*x3_4 - x3_4*a13, a12*x12_12 - 1, x3_4^2, x3_4*x11_14, x3_4*x12_15 - x3_4*x4_7, x3_4*x4_4 - x3_4*x12_12, x3_4*a6 - x3_4*a14, x3_4*x3_5, x3_4*x7_8*x15_15 - x3_4*x7_8, x3_4*x6_6 - x3_4*x14_14, x3_4*x5_7 - x3_4*x13_15, x3_4*x3_6, x3_4*x4_6 - x3_4*x12_14, x3_4*x10_12, x3_4*x11_12, x3_4*x10_13, a1 - 1, x7_7*a7 - 1, x9_9*a9 - 1, a6*x6_6 - 1, a13*x13_13 - 1, a2 - 1, x10_10*a10 - 1, x7_8*x8_9, x8_8*a8 - 1, x14_14*a14 - 1, a3 - 1, x11_12^2]

This equivalent system can be passed to solve, which then does the job faster:

sage: %time solve(list(map(SR, G)), list(map(SR, R.gens())))
CPU times: user 3.04 s, sys: 170 ms, total: 3.21 s
Wall time: 2.53 s

Different variable orderings may lead to different speeds (the monomial ordering can be restricted to lex, I just used invlex as a shorthand for a variable ordering that happened to be faster). Another possible intermediate step is to calculate the radical of the ideal, though that is probably slow in general.

edit flag offensive delete link more

Comments

1

This is significantly faster. Unfortunately it is still orders of magnitude behind Mathematica and I need to repeat this solving process millions of times.

ddd gravatar imageddd ( 2022-02-19 18:53:24 +0100 )edit
0

answered 2022-02-19 19:20:44 +0100

tmonteil gravatar image

updated 2022-02-19 19:27:27 +0100

You can specify an algorithm to solve the system of equations:

sage: %time solve(polys, vs, algorithm='giac', solution_dict=True)
// Giac share root-directory:/opt/sagemath/sage-source/local/share/giac/
// Giac share root-directory:/opt/sagemath/sage-source/local/share/giac/
Help file /opt/sagemath/sage-source/local/share/giac/doc/fr/aide_cas not found
Added 0 synonyms
CPU times: user 531 ms, sys: 32.8 ms, total: 564 ms
Wall time: 563 ms
[{a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x4_6,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: x10_12,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: x10_13},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x4_6,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: x10_12,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x4_6,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: 1/a6,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x4_7,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: 0,
  x12_15: x4_7,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: 1,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: 1,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x4_7,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: 1,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: 0,
  x12_15: x4_7,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: 1,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: 1,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x4_6,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: x10_12,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: x10_13},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x4_6,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: x10_12,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x4_6,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: 1/a6,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x4_7,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x12_12,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: 0,
  x12_15: x4_7,
  x5_6: x5_6,
  x4_4: x12_12,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: 0,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: 1/x14_14,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: x14_14,
  x5_7: x13_15,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: 0,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0},
 {a15: 1/x15_15,
  x13_14: x13_14,
  a4: 1/x4_4,
  a11: 1/x11_11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: 1/a5,
  x9_12: x9_12,
  a5: a5,
  a12: 1/x12_12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: x4_4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: x12_12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: x15_15,
  x4_6: x12_14,
  x11_11: x11_11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: 0,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: 0}]

Note that, in contrast with maxima, giac does not seem to introduce free parameter like r19 to describe the solutions, instead the values of the dict are unchanged if they are free.

You can also use this to work with @rburing answer (giac knows about Groebner basis, but the solution is shorted here, perhaps because of a different monomial ordering):

sage: %time solve(list(map(SR, G)), list(map(SR, R.gens())), algorithm='giac', solution_dict=True)
CPU times: user 128 ms, sys: 0 ns, total: 128 ms
Wall time: 127 ms
[{a15: a15,
  x13_14: x13_14,
  a4: a4,
  a11: a11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: x5_5,
  x9_12: x9_12,
  a5: 1/x5_5,
  a12: a12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: 1/a4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: x7_8,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: 1/a12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: 1/a15,
  x4_6: x4_6,
  x11_11: 1/a11,
  x8_9: 0,
  a8: 1/x8_8,
  x10_12: x10_12,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: x10_13},
 {a15: a15,
  x13_14: x13_14,
  a4: a4,
  a11: a11,
  a0: 1,
  x14_15: x14_15,
  x11_13: x11_13,
  x5_5: x5_5,
  x9_12: x9_12,
  a5: 1/x5_5,
  a12: a12,
  x3_4: 0,
  a1: 1,
  x7_7: x7_7,
  x11_14: x11_14,
  x12_15: x12_15,
  x5_6: x5_6,
  x4_4: 1/a4,
  x9_9: x9_9,
  a6: a6,
  a13: a13,
  x3_5: x3_5,
  a2: 1,
  x10_10: x10_10,
  x7_8: 0,
  x6_6: 1/a6,
  x5_7: x5_7,
  x12_12: 1/a12,
  x8_8: x8_8,
  a7: 1/x7_7,
  x3_6: x3_6,
  x6_7: x6_7,
  x14_14: x14_14,
  a9: 1/x9_9,
  x15_15: 1/a15,
  x4_6: x4_6,
  x11_11: 1/a11,
  x8_9: x8_9,
  a8: 1/x8_8,
  x10_12: x10_12,
  a14: 1/x14_14,
  x13_13: 1/a13,
  a3: 1,
  a10: 1/x10_10,
  x4_7: x4_7,
  x12_14: x12_14,
  x11_12: 0,
  x13_15: x13_15,
  x10_13: x10_13}]
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-02-18 19:57:18 +0100

Seen: 447 times

Last updated: Feb 19 '22