Could you post an example of a large system?

Attached one with 239 equations to this email. Not sure if attached files go through, though. If not, I can paste it directly into the email body, it's size is 17K.

Variables are v0 to v238, all are real, and they should obtain values from Interval(0, 1). Their definition was
v = sympy.symbols('v:{n}'.format(n=n), real=True)

Not sure how to load the system from this form, though. It must be in the docs somewhere, but don't recall reading it. :-(

System has 239 equations, all of them have lhs as one of the variables.
115 has even the rhs as a variable.
74 has Max on rhs, which always have two arguments, a number and another symbol. Rest are linear in the variables. In fact, they are a convex combination of the variables and a rational number.

This is a pretty good representation of the systems I'm working with.

What I did so far is to solve the linear part, substitute back into the equations with Max, then use the domain conditions and some easy consequences of the equations to further restrict the potential domains for the variables. For example, v12 equals to Max(r, v44), thus domain of v12 is always at least r, and the domain of it can be updated from Interval(0, 1) to Interval(r, 1). Another example is v71 equals to a*v141 + b*v178 + c*v45 + d, and here using the (potentially restriced) domain conditions on the variables, I can further restrict the domain of v71.

With this approach I managed to decrease the number of equations with Max to 20, which then results in traversing through 2**20 cases, taking too long. I probably need to do this recursively, applying the domain shrinking heuristic at every recursive step, but I haven't yet managed to do that.

Thanks,
Gábor

/c

On Wednesday, August 20, 2025 at 9:45:00 AM UTC-5 [email protected]
wrote:

      Hi Oscar,

      Sorry for the late reply, I opened the two issues:

      https://github.com/sympy/sympy/issues/28331
      https://github.com/sympy/sympy/issues/28332

      Not quite sure if the format and the text is fine, let me know
      if I need
      to modify anything.

      Thanks very much for the detailed explanation on solve vs
      solveset. I
      found it very interesting, and I agree with the points. For my
      usecase I
      definitely need to use solve, because I need the solutions
      afterwards.

      I'm writing an implementation for my very special and restricted
      usecase
      of systems, where I might need to convert between dicts and
      sets, mainly
      to keep track of the potential infinite solutions:
      {x[0]: x[2], x[1]: x[2], x[2]: x[2]} == {x[0]: x[1], x[1]: x[1],
      x[2]:
      x[1]} is False for dicts, but they both represent the same
      FiniteSet if
      the domain for x[1] and x[2] are the same. Is there some code in
      sympy
      which converts between these in certain cases, or I can just go
      with my
      (rather naive) approach with something like:

      def subs_to_fset(subs:list[dict],
      variables:Iterator[sympy.Symbol]) -> sympy.FiniteSet:
      if any(len(d) != len(variables) for d in subs):
      raise SubstitutionSizeNotMatcingNumberOfVariablesError
      return sympy.FiniteSet(*[tuple(d[v] for v in variables) for d in
      subs])

      def fset_to_subs(fset:sympy.FiniteSet,
      variables:Iterator[sympy.Symbol]) -> tuple[tuple]:
      if any(len(p) != len(variables) for p in fset):
      raise FiniteSetDimensionNotMatcingNumberOfVariablesError
      return tuple(tuple(zip(variables, p)) for p in fset)


      You also mention that there is no benefit using linsolve and
      nonlinsolve
      vs solve. Do you mean that for the performance, as well, or only
      for
      capability? To me performance may matter, and the awkward
      conversion
      between sets and list[dicts] might be worth it in case linsolve
      is
      significantly faster than solve. But if they essentially have
      the same
      underlying code, then solve is far superior for its output.


      Thanks for the pointers on how to handle systems w Min/Max. For
      now I
      ended up using an extra domain parameter that restricts the
      potential
      solution onto an interval (in my special usecase that's the
      situation),
      and since all non-MinMax equations are linear, I can use some
      heuristics
      to compute upper and lower bounds for each variable based on
      what
      subsolutions / substitutions I found so far, and intersect that
      with the
      domain of interval of possible solutions. In certain cases
      (apparently a
      lot of the cases for my systems) this provides a solution to a
      lot of
      variables, just like in the case for the minimal example I
      provided. This
      way I can significantly reduce the number of equations having
      MinMax in
      them.
      For some big systems there still are many of those MinMax
      equations,
      though (many meaning ~20, but that is already >1mil different
      cases to
      solve for). So for those I'll try your suggested approach of
      recursively
      solve one equation and substitute back, but that seems to be
      less
      efficient for now that simply enumerating all potential
      2**20-many
      possibilities. I must have some silly mistake in my code, which
      I'll have
      to check.

      In any case, thank you very much for all the help!

      Thanks,
      Gábor

      > On Sat, 9 Aug 2025 at 17:31, Gábor Horváth
      <[email protected]> wrote:
      >>> On Sat, 9 Aug 2025 at 13:26, Gábor Horváth
      <[email protected]> wrote:
      >>>>
      >>>> So my questions are:
      >>>> 1) Is the expected behaviour for sympy.solve for the
      Piecewise case to throw a NaN comparison exception, or is this a
      sign of some underlying issue in sympy.solve for Piecewise
      functions?
      >>>
      >>> No, that is just a bug.
      >>
      >> Ok, thanks. Should I report it in some official way somewhere
      (if yes,
      >> where and how), or has this email already taken care of the
      bugreport?
      >> Maybe I should open an issue on
      https://github.com/sympy/sympy/issues ?
      >
      > Yes, please open an issue there.
      >
      > I think that the expected behaviour here is to raise an error
      but it
      > should be an explicit error like "equation type not
      supported".
      >
      >>>> 2) Is sympy.solve expected to rewrite Min and Max to
      Piecewise at some point in the future? I found some piece of
      code in solvers/solvers.py:944-957 which does some sort of
      rewriting for Abs, but didn't find any for Min or Max.
      >>>
      >>> It probably does make sense to rewrite Min and Max as
      Piecewise if
      >>> they contain the variables of interest.
      >>
      >> Ok, thanks. Same question as above: should I open some issue
      on
      >> https://github.com/sympy/sympy/issues or elsewhere, or this
      is already
      >> taken care of by this email?
      >
      > Yes, please open an issue. It can be the same issue.
      >
      >>>> 3) From some reading on the sympy docs page, I figured
      solveset is expected to be the future solver. Is there a direct
      way I can apply solveset on a system, rather than on one
      equation?
      >>>
      >>> This documentation needs to be changed. The solveset
      function is not
      >>> going to replace solve. It was originally intended as a
      replacement
      >>> for solve but was then misdesigned as something different
      that cannot
      >>> replace solve because it does not provide comparable
      functionality or
      >>> interface.
      >>
      >> Ah, I see. This was the page I found first:
      >>
      https://lidavidm.github.io/sympy/modules/solvers/solveset.html
      >
      > That is an old version hosted from someone's outdated fork.
      Can you
      > open a separate sympy github issue about that? We can tag the
      owner of
      > the fork and ask them to remove this. It isn't possible to
      open an
      > issue in their repo as it has issues disabled I think:
      > https://github.com/lidavidm/sympy
      >
      >> BTW, are there some old threads somewhere maybe where such
      discussions
      >> can be read? I would be curious what you mean by misdesign,
      and what were
      >> the discussion and decision points around solve an solveset.
      >
      > Some will be here on the mailing list which you can search.
      Others
      > will be on GitHub.
      >
      > What I mean by misdesign here is not that solveset is
      misdesigned in
      > general but rather that if the intention was to replace solve
      then it
      > was misdesigned for that purpose. It is not possible to
      replace solve
      > with solveset because they just don't do the same thing.
      >
      > The purpose of a function like solve is that it turns an
      implicit
      > representation of the solutions (equations to be solved) into
      an
      > explicit representation which is a list of assignments like x
      = ..., y
      > = .... Its return value is therefore a list of dicts each of
      which
      > could be passed to subs.
      >
      > There are some limitations in this explicit format which mean
      that it
      > cannot always be fully mathematically correct/complete. For
      example
      > your system of equations has the solution set:
      >
      > {(a, a) for a in [2, oo)}
      >
      > The best solve can do to represent that solution set is to
      return
      >
      > [{x: y}]
      >
      > but that loses the information that y >= 2 is a constraint on
      the
      > solutions. It could be possible to extend solve to also return
      the
      > condition like
      >
      > [({x: y}), y >= 2)]
      >
      > but that would be an incompatible change in its output format.
      >
      > With solveset the intention is that the output is always
      > mathematically correct/complete but then by design it does not
      > necessarily return an explicit representation of the solutions
      which
      > contradicts the basic purpose of solve. There is a tradeoff
      here where
      > you have to choose between having explicit representations but
      with
      > some attached explicit or implicit conditions vs not having an
      > explicit representation at all.
      >
      > The purpose of the solve function is to have the explicit
      > representations subject to the fact that they may be
      incomplete or not
      > always valid whereas the purpose of solveset is to be always
      complete
      > and valid and therefore not necessarily give an explicit
      > representation of the solutions. These are contradictory goals
      and so
      > in a basic way solveset cannot replace solve.
      >
      > There are other reasons why solveset cannot replace solve.
      Another
      > reason is that solveset returns output in an unstructured form
      that is
      > not easily usable even when the solutions can be given
      explicitly.
      > There are some places in the sympy codebase that try to use
      solveset
      > and they always have awkward scaffolding code that basically
      tries to
      > turn the output of solveset into something that looks like the
      output
      > of solve. This is because the sets that solveset returns are
      only
      > really nice just to "look at". If you actually want to use the
      > solutions of the equation for something then you want an
      explicit
      > representation i.e. you basically want solve rather than
      solveset.
      >
      > An even more obvious reason why solveset cannot replace solve
      is that
      > it only handles single univariate equations rather than
      systems of
      > equations. It has not even been designed in a way that it
      could be
      > extended to handle systems of equations in future.
      >
      >> There is also mention in the docs about FiniteSet handling
      tuples
      >> corresponds to a finite subset of points in the
      multi-dimensional space.
      >> That suggests that solveset was intended to be able to solve
      multi-variate
      >> equations or even systems. Is that indeed the case, or only
      some special
      >> cases (like linsolve) can really handle multi-variate
      equations/systems?
      >
      > The linsolve and nonlinsolve functions do handle systems of
      equations
      > and are useful. They also return a somewhat awkward output
      format and
      > do not really handle infinite solution sets in a coherent way
      which
      > undermines the benefit of not simply returning a list of dicts
      like
      > solve does. I am not sure that there is any particular benefit
      in
      > using either of these functions rather than just using solve.
      They are
      > basically just new implementations of the way that solve
      handles
      > systems and perhaps have cleaner code but otherwise do not
      > fundamentally increase capability or usefulness.
      >
      >>> In general I think that what you should really want in a
      situation
      >>> like this is something like Mathematica's Reduce function
      rather than
      >>> Solve. Unfortunately SymPy has several versions of solve but
      nothing
      >>> like reduce.
      >>
      >> Hm, all are very good points. I have some very crude code to
      solve these
      >> systems exactly as you suggest, by splitting at the various
      Min and Max
      >> occurrences, solving the underlying linear system (with
      linsolve), and
      >> then check if the obtained solutions indeed solve the
      original system with
      >> Min and Max.
      >>
      >> That said, somehow my code is rather slow, especially when
      there are many
      >> Max occurrences. I feel that sympy.solve is faster when it
      doesn't fail,
      >> so somehow sympy handles Piecewise functions pretty fast. I
      guess I'll
      >> have to do some profiling on where I can still gain on
      performance.
      >>
      >> Your comment also made me realize that in my systems there
      are some
      >> underlying assumptions, as well, as inequalities. For the
      above system I
      >> quickly checked and the corresponding assumption would be
      1<=Min(x,y) and
      >> Max(x,y)<=2. With that assumption the solution becomes
      unique. I guess
      >> I'll need to handle these assumptions in my code, as well.
      (sympy.solve
      >> dies with the same NaN comparison error even with the
      extended
      >> assumptions)
      >
      > Okay, so your actual system here is:
      >
      > x = Max(y, 1)
      > y = Max(2, x)
      > 1<=Min(x,y)
      > Max(x,y)<=2
      >
      > If I wanted to make a solver for systems like this then I
      would make
      > something that turns it into separate systems of inequalities
      that
      > don't involve Min and Max. For example x = Max(y, 1) can be
      separated
      > into two disjoint cases represented by pairs of inequalities:
      >
      > (1)
      > x = y
      > y > 1
      >
      > (2)
      > x = 1
      > y <= 1
      >
      > You can do the same for each Max and Min. That will give you 8
      (2^3)
      > systems of linear equations and inequalities. To solve those
      first
      > solve the linear equations and then substitute into the
      inequalities.
      > Then Fourier-Motzkin can solve the remaining system of
      inequalities.
      >
      > If you have a large number of Max/Min then the approach I just
      > described might be inefficient but it depends how many of the
      Max/Min
      > are actually distinct. In the above case Max(x,y) and Min(x,y)
      can
      > both switch in the same condition x>y. That is why we get 2^3
      cases
      > rather than 2^4. If your 2^n here is large then a better
      approach is
      > something that works by progressively solving and substituting
      e.g.
      > for case (1) above you substitute x = y into all remaining
      > inequalities before splitting any of the other Min/Max at
      which point
      > they simplify significantly.
      >
      > If SymPy were to have a solver for this kind of system it
      would be one
      > of the inequality solvers but I don't think any of those
      handles a
      > multivariate system as is needed here. Ideally SymPy would
      have a
      > reduce function that would be able to handle exactly this kind
      of
      > system but it does not. Much of the effort that went into
      solveset
      > would have been better spent on a reduce function which would
      have
      > then been a good foundation for building a new version of
      solve.
      >
      > --
      > Oscar
      >
      > --
      > You received this message because you are subscribed to the
      Google Groups "sympy" group.
      > To unsubscribe from this group and stop receiving emails from
      it, send an email to [email protected].
      > To view this discussion 
visithttps://groups.google.com/d/msgid/sympy/CAHVvXxQ%3D0t4J9hqjhW43wYezd5%2BBwx
      KN8aeG6oBWmjkJU9hapQ%40mail.gmail.com.
      >

--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To view this discussion 
visithttps://groups.google.com/d/msgid/sympy/1d1c80c9-8b37-48b6-ac1e-1286d2eb83e
en%40googlegroups.com.



--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sympy/dd6bb4da-6361-1bef-7324-415df45dc53%40SamsungLaptop.WORKGROUP.
[Eq(v0, v39),
 Eq(v1, v21),
 Eq(v2, v160),
 Eq(v3, 125*v136/1296 + 143*v157/648 + 13*v158/162 + 35*v196/324 + 
125*v230/1296 + 7*v67/162 + 5*v96/81 + 155/648),
 Eq(v4, v46),
 Eq(v5, v21),
 Eq(v6, 7*v103/162 + 13*v13/162 + 143*v138/648 + 5*v165/81 + 125*v188/1296 + 
35*v56/324 + 145/432),
 Eq(v7, v21),
 Eq(v8, 125*v136/1296 + 143*v157/648 + 13*v158/162 + 125*v238/1296 + 35*v64/324 
+ 7*v67/162 + 13*v70/162 + 5*v96/81 + 103/648),
 Eq(v9, 125*v107/1296 + 5*v114/81 + 35*v169/324 + 125*v176/1296 + 143*v234/648 
+ 13*v77/162 + 155/648),
 Eq(v10, v152),
 Eq(v11, 5*v150/81 + 35*v182/324 + 125*v23/1296 + 143*v48/648 + 13*v69/162 + 
145/432),
 Eq(v12, Max(11973429987871294032791/15614510052024077690880, v44)),
 Eq(v13, v9),
 Eq(v14, 143*v131/648 + 35*v164/324 + 125*v174/1296 + 13*v179/162 + 
125*v224/1296 + 155/648),
 Eq(v15, v97),
 Eq(v16, 
Max(22153944431869014019426428453312493667994869174799325454923686985538985161903624297370947248977440887249367238742791250601673384171676607719/32454635176053367993998877873873950990459011341470372284598283919422255066489869933707729610512961907754883836467874521812063002516520960000,
 v232)),
 Eq(v17, v87),
 Eq(v18, v236),
 Eq(v19, Max(8153526396622056593187661712693/9765476659969457979924424224000, 
v153)),
 Eq(v20, v97),
 Eq(v21, 35*v104/324 + 7*v115/162 + 125*v163/1296 + 125*v190/1296 + 5*v65/81 + 
13*v66/162 + 143*v89/648 + 155/648),
 Eq(v22, 
Max(7275710867969158635412531309174807/8437371834213611694654702529536000, 
v180)),
 Eq(v23, v9),
 Eq(v24, 
Max(2614555075632615128064129937148739196765976986107121040972735374362471663685097832269563604123454373834497709933777759023191743438472863355594852611/3252479130413442679612535606086476366411081822411880393493248150349958821111651172916031511388192323765980310338178294488167832084589834141696000000,
 v229)),
 Eq(v25, 5*v168/81 + 7*v202/162 + 13*v36/162 + 35*v43/324 + 35*v68/1296 + 
143*v7/648 + 125*v78/1296 + 145/432),
 Eq(v26, 
Max(3854097996225308316203175283663385/5973659258623237079815529390911488, 
v231)),
 Eq(v27, v35),
 Eq(v28, 
Max(7082014151066409483273977986654807/8437371834213611694654702529536000, 
v218)),
 Eq(v29, v3),
 Eq(v30, v156),
 Eq(v31, v32),
 Eq(v32, 5*v100/81 + 143*v162/648 + 35*v186/324 + 125*v40/1296 + 125*v49/1296 + 
13*v52/162 + 13*v59/162 + 103/648),
 Eq(v33, v9),
 Eq(v34, v145),
 Eq(v35, 125*v126/1296 + 13*v173/162 + 125*v181/1296 + 13*v206/162 + 
35*v211/324 + 143*v98/648 + 103/648),
 Eq(v36, v97),
 Eq(v37, v39),
 Eq(v38, Max(435458653906733290600307/519997654931407615526400, v106)),
 Eq(v39, 125*v159/1296 + 13*v19/162 + 125*v74/1296 + 35*v82/324 + 143*v91/648 + 
13*v94/162 + 103/648),
 Eq(v40, 
Max(226542105817153888727102225905133917442673378023193639810034013/282361652451162721818510415100150396932752441247124690042880000,
 v25)),
 Eq(v41, v9),
 Eq(v42, 
Max(2394733571844680723947486046892229995824719990932886027/3293635682949831743806860531669548694292913046945792000,
 v213)),
 Eq(v43, 
Max(7275710867969158635412531309174807/8437371834213611694654702529536000, 
v180)),
 Eq(v44, 5*v150/81 + 125*v23/1296 + 143*v48/648 + 13*v69/162 + 575/1296),
 Eq(v45, v147),
 Eq(v46, 143*v134/648 + 125*v204/1296 + 35*v63/324 + 125*v75/1296 + 13*v86/162 
+ 103/648),
 Eq(v47, 
Max(17774053714151175033989655690633134825729039/24642541563136281050949853769599826662195200,
 v184)),
 Eq(v48, v97),
 Eq(v49, v39),
 Eq(v50, v46),
 Eq(v51, v147),
 Eq(v52, v35),
 Eq(v53, v151),
 Eq(v54, 
Max(279093664883899921882792279729481055727296597875364409018874143/330075542795919385459138332466610996414444404698606408499200000,
 v201)),
 Eq(v55, 
Max(279093664883899921882792279729481055727296597875364409018874143/330075542795919385459138332466610996414444404698606408499200000,
 v201)),
 Eq(v56, Max(17162041845107476095157951754621/19530953319938915959848848448000, 
v84)),
 Eq(v57, 
Max(134845448633481464957323497536579332465563743749277/172297325954688833637102978220838496248844582912000,
 v6)),
 Eq(v58, v147),
 Eq(v59, 
Max(7275710867969158635412531309174807/8437371834213611694654702529536000, 
v180)),
 Eq(v60, v183),
 Eq(v61, v229),
 Eq(v62, 35*v104/324 + 143*v118/648 + 7*v123/162 + 13*v125/162 + 35*v144/1296 + 
125*v163/1296 + 125*v18/1296 + 5*v93/81 + 155/648),
 Eq(v63, 
Max(175636969241485433817388790704239855296988799222569480849525214868889482808102263013043142576463500794632154622270708701/294314475806011059781427635267647592615090539835558997573966535841876742686892500252978044232249079792621628328850227200,
 v160)),
 Eq(v64, 
Max(5061423529750895019224713210229530919488626594511426252665941900089074860550587856332801957246398173667897955595061549032234894743025570361086403/6440552733491965702203040804131636369130855093884911670283659703663284794280497372110953487897410542110852099679560979184490756603148186419200000,
 v183)),
 Eq(v65, v156),
 Eq(v66, v152),
 Eq(v67, v46),
 Eq(v68, v147),
 Eq(v69, v87),
 Eq(v70, Max(17162041845107476095157951754621/19530953319938915959848848448000, 
v84)),
 Eq(v71, 125*v141/1296 + 143*v178/648 + 13*v45/162 + 575/1296),
 Eq(v72, 
Max(253802678761938692393280149165758641400287017359935136027687/326807468114771668771424091551099996449944955147135057920000,
 v111)),
 Eq(v73, v236),
 Eq(v74, v156),
 Eq(v75, 
Max(3854097996225308316203175283663385/5973659258623237079815529390911488, 
v231)),
 Eq(v76, 
Max(7275710867969158635412531309174807/8437371834213611694654702529536000, 
v180)),
 Eq(v77, v35),
 Eq(v78, v183),
 Eq(v79, 
Max(8850883678872758268947173651427717/9863131426569152559723668466240000, 
v189)),
 Eq(v80, Max(8153526396622056593187661712693/9765476659969457979924424224000, 
v153)),
 Eq(v81, v97),
 Eq(v82, 
Max(2358584054497148792710148400261053499897881214516493192068924801916534408118507179932080824564044765382257088703238080044388691345123909081442699/3220276366745982851101520402065818184565427546942455835141829851831642397140248686055476743948705271055426049839780489592245378301574093209600000,
 v21)),
 Eq(v83, 
Max(3636449405556959850095431375189982793388139699327/5173750886263588479209023698635022807381206630400,
 v11)),
 Eq(v84, 7*v112/162 + 13*v139/162 + 5*v155/81 + 35*v198/1296 + 125*v5/1296 + 
143*v60/648 + 575/1296),
 Eq(v85, Max(11973429987871294032791/15614510052024077690880, v44)),
 Eq(v86, Max(16191931/22535817, v71)),
 Eq(v87, 125*v12/1296 + 35*v214/324 + 143*v50/648 + 155/648),
 Eq(v88, 7*v112/162 + 13*v139/162 + 5*v155/81 + 35*v198/1296 + 35*v205/324 + 
125*v5/1296 + 143*v60/648 + 145/432),
 Eq(v89, v236),
 Eq(v90, v8),
 Eq(v91, v152),
 Eq(v92, 
Max(8850883678872758268947173651427717/9863131426569152559723668466240000, 
v189)),
 Eq(v93, v152),
 Eq(v94, v46),
 Eq(v95, 
Max(8850883678872758268947173651427717/9863131426569152559723668466240000, 
v189)),
 Eq(v96, v122),
 Eq(v97, 35*v108/324 + 125*v175/1296 + 125*v74/1296 + 143*v91/648 + 13*v94/162 
+ 155/648),
 Eq(v98, v35),
 Eq(v99, v152),
 Eq(v100, v46),
 Eq(v101, v46),
 Eq(v102, 
Max(220238025723283192366108519240454879220580984891661788157350013/282361652451162721818510415100150396932752441247124690042880000,
 v154)),
 Eq(v103, v147),
 Eq(v104, 
Max(226542105817153888727102225905133917442673378023193639810034013/282361652451162721818510415100150396932752441247124690042880000,
 v25)),
 Eq(v105, v14),
 Eq(v106, 7*v103/162 + 13*v13/162 + 143*v138/648 + 5*v165/81 + 125*v188/1296 + 
575/1296),
 Eq(v107, Max(435458653906733290600307/519997654931407615526400, v106)),
 Eq(v108, 
Max(253802678761938692393280149165758641400287017359935136027687/326807468114771668771424091551099996449944955147135057920000,
 v111)),
 Eq(v109, v87),
 Eq(v110, v35),
 Eq(v111, 5*v109/81 + 143*v194/648 + 125*v20/1296 + 13*v41/162 + 35*v43/324 + 
7*v58/162 + 145/432),
 Eq(v112, v160),
 Eq(v113, 
Max(1258342213853621367032641137686368091858037627209580572330220504142983507324061383727708018843022293004047445501873262810166895090483369/1697773340450584222326787919746492518856403606479931590531402171972287877510455635787179828965942765628524996676494796077216101826560000,
 v3)),
 Eq(v114, v46),
 Eq(v115, v46),
 Eq(v116, Max(8153526396622056593187661712693/9765476659969457979924424224000, 
v153)),
 Eq(v117, v152),
 Eq(v118, v151),
 Eq(v119, v46),
 Eq(v120, 125*v105/1296 + 143*v133/648 + 5*v187/81 + 13*v209/162 + 575/1296),
 Eq(v121, 13*v191/162 + 125*v33/1296 + 143*v34/648 + 5*v51/81 + 575/1296),
 Eq(v122, 143*v110/648 + 35*v142/324 + 125*v195/1296 + 125*v227/1296 + 
13*v80/162 + 103/648),
 Eq(v123, v156),
 Eq(v124, 
Max(2394733571844680723947486046892229995824719990932886027/3293635682949831743806860531669548694292913046945792000,
 v213)),
 Eq(v125, v39),
 Eq(v126, v223),
 Eq(v127, v151),
 Eq(v128, v46),
 Eq(v129, Max(16191931/22535817, v71)),
 Eq(v130, v35),
 Eq(v131, v152),
 Eq(v132, v151),
 Eq(v133, v9),
 Eq(v134, v46),
 Eq(v135, Max(11269204546127/14346413781285, v120)),
 Eq(v136, v32),
 Eq(v137, 
Max(7275710867969158635412531309174807/8437371834213611694654702529536000, 
v180)),
 Eq(v138, v3),
 Eq(v139, v3),
 Eq(v140, v207),
 Eq(v141, v221),
 Eq(v142, 
Max(2358584054497148792710148400261053499897881214516493192068924801916534408118507179932080824564044765382257088703238080044388691345123909081442699/3220276366745982851101520402065818184565427546942455835141829851831642397140248686055476743948705271055426049839780489592245378301574093209600000,
 v21)),
 Eq(v143, 
Max(226542105817153888727102225905133917442673378023193639810034013/282361652451162721818510415100150396932752441247124690042880000,
 v25)),
 Eq(v144, v46),
 Eq(v145, 5*v100/81 + 125*v137/1296 + 35*v143/324 + 143*v162/648 + 125*v49/1296 
+ 13*v52/162 + 155/648),
 Eq(v146, 125*v102/1296 + 143*v131/648 + 125*v174/1296 + 13*v179/162 + 
35*v192/324 + 13*v212/162 + 103/648),
 Eq(v147, 125*v129/1296 + 143*v134/648 + 125*v204/1296 + 35*v26/324 + 155/648),
 Eq(v148, v156),
 Eq(v149, 
Max(279093664883899921882792279729481055727296597875364409018874143/330075542795919385459138332466610996414444404698606408499200000,
 v201)),
 Eq(v150, v147),
 Eq(v151, 7*v115/162 + 125*v167/1296 + 35*v171/324 + 125*v190/1296 + 5*v65/81 + 
13*v66/162 + 13*v76/162 + 143*v89/648 + 103/648),
 Eq(v152, 35*v113/324 + 5*v114/81 + 125*v176/1296 + 13*v200/162 + 143*v234/648 
+ 125*v57/1296 + 13*v77/162 + 103/648),
 Eq(v153, 5*v109/81 + 143*v194/648 + 125*v20/1296 + 13*v41/162 + 7*v58/162 + 
575/1296),
 Eq(v154, 143*v1/648 + 7*v161/162 + 5*v2/81 + 35*v22/324 + 125*v29/1296 + 
13*v81/162 + 145/432),
 Eq(v155, v97),
 Eq(v156, 35*v203/324 + 143*v50/648 + 125*v83/1296 + 13*v85/162 + 103/648),
 Eq(v157, v8),
 Eq(v158, v152),
 Eq(v159, 
Max(253802678761938692393280149165758641400287017359935136027687/326807468114771668771424091551099996449944955147135057920000,
 v111)),
 Eq(v160, 125*v126/1296 + 125*v135/1296 + 13*v206/162 + 35*v47/324 + 
143*v98/648 + 155/648),
 Eq(v161, v147),
 Eq(v162, v8),
 Eq(v163, 
Max(7275710867969158635412531309174807/8437371834213611694654702529536000, 
v180)),
 Eq(v164, 
Max(220238025723283192366108519240454879220580984891661788157350013/282361652451162721818510415100150396932752441247124690042880000,
 v154)),
 Eq(v165, v193),
 Eq(v166, v39),
 Eq(v167, 
Max(226542105817153888727102225905133917442673378023193639810034013/282361652451162721818510415100150396932752441247124690042880000,
 v25)),
 Eq(v168, v9),
 Eq(v169, 
Max(134845448633481464957323497536579332465563743749277/172297325954688833637102978220838496248844582912000,
 v6)),
 Eq(v170, v8),
 Eq(v171, 
Max(2105200769737816505172382620601987033203554288183000146797721880918236299783478163617023469627750000504871656527720958235556227417449073238133508201/2782318780868529183351713627384866911464529400558281841562540991982539031129174864751931906771681354191888107061570343007700006852560016533094400000,
 v62)),
 Eq(v172, v9),
 Eq(v173, Max(11269204546127/14346413781285, v120)),
 Eq(v174, v122),
 Eq(v175, Max(8153526396622056593187661712693/9765476659969457979924424224000, 
v153)),
 Eq(v176, v146),
 Eq(v177, 
Max(279093664883899921882792279729481055727296597875364409018874143/330075542795919385459138332466610996414444404698606408499200000,
 v201)),
 Eq(v178, v160),
 Eq(v179, v46),
 Eq(v180, 5*v168/81 + 7*v202/162 + 13*v36/162 + 35*v68/1296 + 143*v7/648 + 
125*v78/1296 + 575/1296),
 Eq(v181, 
Max(17774053714151175033989655690633134825729039/24642541563136281050949853769599826662195200,
 v184)),
 Eq(v182, Max(8153526396622056593187661712693/9765476659969457979924424224000, 
v153)),
 Eq(v183, 13*v170/162 + 35*v177/324 + 125*v215/1296 + 7*v217/162 + 5*v237/81 + 
35*v4/1296 + 125*v53/1296 + 143*v73/648 + 155/648),
 Eq(v184, 125*v105/1296 + 143*v133/648 + 5*v187/81 + 13*v209/162 + 35*v38/324 + 
145/432),
 Eq(v185, Max(7839007286424827564645117347/9940275171668787978402662400, v121)),
 Eq(v186, 
Max(2105200769737816505172382620601987033203554288183000146797721880918236299783478163617023469627750000504871656527720958235556227417449073238133508201/2782318780868529183351713627384866911464529400558281841562540991982539031129174864751931906771681354191888107061570343007700006852560016533094400000,
 v62)),
 Eq(v187, v147),
 Eq(v188, v145),
 Eq(v189, 5*v15/81 + 35*v17/1296 + 7*v172/162 + 5*v220/324 + 13*v225/162 + 
125*v235/1296 + 143*v61/648 + 575/1296),
 Eq(v190, v39),
 Eq(v191, v193),
 Eq(v192, 
Max(2045078160365334499396949348874892561929655603986003104366740054193468546098285839528846751540950480006451342487403164371269925361888435218161080201/2782318780868529183351713627384866911464529400558281841562540991982539031129174864751931906771681354191888107061570343007700006852560016533094400000,
 v216)),
 Eq(v193, 143*v110/648 + 125*v116/1296 + 125*v227/1296 + 35*v72/324 + 155/648),
 Eq(v194, v183),
 Eq(v195, 
Max(253802678761938692393280149165758641400287017359935136027687/326807468114771668771424091551099996449944955147135057920000,
 v111)),
 Eq(v196, 
Max(540603656426932533425269180020889323149790647994708176949439/653614936229543337542848183102199992899889910294270115840000,
 v88)),
 Eq(v197, Max(7839007286424827564645117347/9940275171668787978402662400, v121)),
 Eq(v198, v147),
 Eq(v199, 
Max(8850883678872758268947173651427717/9863131426569152559723668466240000, 
v189)),
 Eq(v200, Max(435458653906733290600307/519997654931407615526400, v106)),
 Eq(v201, 5*v15/81 + 35*v17/1296 + 7*v172/162 + 5*v220/324 + 13*v225/162 + 
125*v235/1296 + 143*v61/648 + 35*v79/324 + 145/432),
 Eq(v202, v87),
 Eq(v203, 
Max(33555258956212545159265306236629059868117420803200021272171253837071413093415619201625551702480684238035240126327735818814535013747339/50980804700015500968416644345982125478843256558573011969114731928624900945625419111863289811598969388796638160975604215819955863552000,
 v208)),
 Eq(v204, v46),
 Eq(v205, 
Max(8850883678872758268947173651427717/9863131426569152559723668466240000, 
v189)),
 Eq(v206, v46),
 Eq(v207, 7*v10/162 + 5*v128/324 + 125*v132/1296 + 143*v140/648 + 35*v148/1296 
+ 35*v226/324 + 13*v228/162 + 5*v37/81 + 125*v54/1296 + 13*v92/162 + 103/648),
 Eq(v208, 143*v0/648 + 5*v101/81 + 35*v108/324 + 125*v117/1296 + 125*v175/1296 
+ 13*v30/162 + 155/648),
 Eq(v209, v160),
 Eq(v210, v122),
 Eq(v211, 
Max(164303259789428574676434357424189686228606168309404001224495213032351595510640234280468301450122934132127132665995958212872858503/242821238664149429242953838715430791222961708193172782203145156648304855136533203360117025851618319372030931646164857757106176000,
 v9)),
 Eq(v212, 
Max(7082014151066409483273977986654807/8437371834213611694654702529536000, 
v218)),
 Eq(v213, 13*v191/162 + 35*v28/324 + 125*v33/1296 + 143*v34/648 + 5*v51/81 + 
145/432),
 Eq(v214, 
Max(3636449405556959850095431375189982793388139699327/5173750886263588479209023698635022807381206630400,
 v11)),
 Eq(v215, 
Max(8850883678872758268947173651427717/9863131426569152559723668466240000, 
v189)),
 Eq(v216, 143*v127/648 + 5*v130/81 + 125*v137/1296 + 35*v143/324 + 13*v166/162 
+ 7*v219/162 + 125*v90/1296 + 155/648),
 Eq(v217, v35),
 Eq(v218, 143*v1/648 + 7*v161/162 + 5*v2/81 + 125*v29/1296 + 13*v81/162 + 
575/1296),
 Eq(v219, v46),
 Eq(v220, v147),
 Eq(v221, 35*v124/324 + 125*v197/1296 + 125*v233/1296 + 143*v27/648 + 155/648),
 Eq(v222, Max(11269204546127/14346413781285, v120)),
 Eq(v223, 35*v16/324 + 13*v185/162 + 125*v233/1296 + 143*v27/648 + 125*v42/1296 
+ 103/648),
 Eq(v224, 
Max(7082014151066409483273977986654807/8437371834213611694654702529536000, 
v218)),
 Eq(v225, v183),
 Eq(v226, 
Max(2614555075632615128064129937148739196765976986107121040972735374362471663685097832269563604123454373834497709933777759023191743438472863355594852611/3252479130413442679612535606086476366411081822411880393493248150349958821111651172916031511388192323765980310338178294488167832084589834141696000000,
 v229)),
 Eq(v227, v46),
 Eq(v228, v236),
 Eq(v229, 7*v10/162 + 5*v128/324 + 125*v132/1296 + 143*v140/648 + 35*v148/1296 
+ 35*v149/324 + 125*v199/1296 + 13*v228/162 + 5*v37/81 + 155/648),
 Eq(v230, 
Max(17162041845107476095157951754621/19530953319938915959848848448000, v84)),
 Eq(v231, 125*v141/1296 + 143*v178/648 + 35*v222/324 + 13*v45/162 + 145/432),
 Eq(v232, 5*v119/81 + 35*v164/324 + 13*v210/162 + 125*v224/1296 + 143*v31/648 + 
125*v99/1296 + 155/648),
 Eq(v233, v46),
 Eq(v234, v152),
 Eq(v235, v21),
 Eq(v236, 13*v170/162 + 7*v217/162 + 5*v237/81 + 35*v24/324 + 35*v4/1296 + 
125*v53/1296 + 125*v55/1296 + 143*v73/648 + 13*v95/162 + 103/648),
 Eq(v237, v39),
 Eq(v238, 
Max(540603656426932533425269180020889323149790647994708176949439/653614936229543337542848183102199992899889910294270115840000,
 v88))]

Reply via email to