|
From: Barton W. <wi...@un...> - 2020-02-04 21:50:11
|
Maybe documentation for things in share should be marked with something standard like:
unsupported (share library); has test file; ...
And there would be a global statement on what we mean by unsupported.
--Barton
________________________________
From: Barton Willis via Maxima-discuss <max...@li...>
Sent: Tuesday, February 4, 2020 07:39
To: Robert Dodier <rob...@gm...>; max...@li... <max...@li...>
Subject: Re: [Maxima-discuss] questions about simp_inequality, was: %and is not an infix operator
History: The non-user-level function standardize-inequality is defined in fourier_elim. As a pre-processor for fourier_elim, standardize-inequality attempts to convert nonlinear inequations into linear equations. There aren't all that many cases that can be linearized, so standardize-inequality is about as smart as my twelve-year old self.
The up shot is that standardize-inequality was not really intended to be a user-level function. Some of its functionality (not consulting the fact database) is tied directly to the needs of the Fourier elimination code.
Due to some combination of my poor judgement and unbridled ego, to_poly_solve has a user-level interface to standardize-inequality (but some functionality is hidden). The name of the function implies that it does much more than it actually does. And that misleads users.
The user documentation for simp_inequality isn't, I hope, an example of my best effort. Maybe a user wants to know exactly the simplification rules that are used--well, that would be mind-numbing read, I think. Maybe the following is somewhat better effort for user documentation:
The function 'simp_inequality' applies basic simplifications to inequations, returning either a boolean value (true or false) or the original inequation.
The simplification rules used by 'simp_inequality' include some facts about the ranges of the absolute value, power, and exponential functions along with some elementary algebra facts.
For conjunctions or disjunctions of inequations, 'simp_inequality' is applied to each individual
inequation, but no effort is made to simplify the entire logical expression.
Effectively, simp_inequality creates a new empty context, so database facts are not used to simplify inequations.
To use this function, a user must load to_poly_solve.
Examples:
(%i2) simp_inequality(1 # 0);
(%o2) true
(%i3) simp_inequality(1 < 0);
(%o3) false
(%i4) simp_inequality(a=a);
(%o4) true
(%i5) simp_inequality(a # a);
(%o5) false
(%i6) simp_inequality(a + 1 # a);
(%o6) true
(%i7) simp_inequality(a < a+1);
(%o7) true
(%i8) simp_inequality(abs(x) >= 0);
(%o8) true
(%i9) simp_inequality(exp(x) > 0);
(%o9) true
(%i10) simp_inequality(x^2 >= 0);
(%o10) true
(%i11) simp_inequality(2^x # 0);
(%o11) true
(%i12) simp_inequality(2^(x+1) > 2^x);
(%o12) true
The fact database is not consulted. For example
(%i13) assume(xx > 0)$
(%i14) simp_inequality(xx > 0);
(%o14) xx>0
And finally, for conjunctions or disjunctions of inequations, each inequation is simplified, but no effort is made to simplify the entire logical expression; for example
(%i15) simp_inequality((1 > 0) and (x < 0) and (x > 0));
(%o15) x<0 and x>0
--Barton
________________________________
From: Robert Dodier <rob...@gm...>
Sent: Tuesday, February 4, 2020 00:31
To: max...@li... <max...@li...>
Subject: [Maxima-discuss] questions about simp_inequality, was: %and is not an infix operator
On 2020-02-02, Barton Willis via Maxima-discuss <max...@li...> wrote:
> (%i1) load(to_poly_solve)$
>
> (%i2) simp_inequality((x > minf) %and (x < 0));
> (%o2) x<0
>
> The user documentation says to use this function, you need to
> load(fourier_elim). Maybe the user documentation is out of
> date--I'm not sure.
I've updated the documentation for simp_inequality (commit 83e6ae3).
Thanks for pointing it out.
Reading the documentation for simp_inequality, I came across something I
don't understand. It says in part:
Limitations The function 'simp_inequality' is limited in at least
two ways; first, the simplifications are local; thus
(%i1) simp_inequality((x > minf) %and (x < 0));
(%o1) (x>1) %and (x<1)
What does it mean that the simplifications are local? How does the
example illustrate that?
Also, I tried the example with a recent build and I get a different
output:
(%i2) load (to_poly_solve) $
(%i3) simp_inequality((x > minf) %and (x < 0));
(%o3) x < 0
Is that the expected output? It does seem to make sense.
Thanks for any info, and all the best.
Robert Dodier
_______________________________________________
Maxima-discuss mailing list
Max...@li...
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_maxima-2Ddiscuss&d=DwICAg&c=Cu5g146wZdoqVuKpTNsYHeFX_rg6kWhlkLF8Eft-wwo&r=Ln0CjFotuA7GyhsRS-QpQA&m=WmkCkvHUFYMK4tpoZke9nKj4qf0Pl29OetNcSyqu2vg&s=eOygsGWZllJRHujyjpYJseW9nfjFkdVGqmUMIyiZFrg&e=
|