MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How can I make FullSimplify work for user-defined functions?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52590] Re: [mg52569] How can I make FullSimplify work for user-defined functions?
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Fri, 3 Dec 2004 03:53:58 -0500 (EST)
  • References: <200412020721.CAA05840@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

This has nothing or little to do with "user defined functions". It's 
simply that FullSimplify knows nothing at all about Prime or PrimePi 
and can't decide even the simplest facts about them, for example:


FullSimplify[Prime[n+1]>Prime[n],Element[n,Integers]&&n>0]

Prime[n+1]>Prime[n]

and so on. You can't really expect it to be otherwise; there are very 
few general rules or transformation that one can apply in an 
algorithmic way to such functions. You can use Mathematica to answer 
questions about concrete integers, but it won't prove any theorems for 
you, even the simplest one (like that the n+1 th prime is larger than 
the n-th prime). For the foreseeable future you will have to do this 
using your own brain.

Andrzej Kozlowski

On 2 Dec 2004, at 16:21, Gilmar Rodr?guez Pierluissi wrote:

> (First; a necessary short introduction, and then
>  two questions.  Please, bear with me...)
>
> Let N be an even integer greater or equal to 4.
>
> Assume that there exist points (Pi, Qi) on the line
> Y = -X + N such that:
>
> (1.) both Pi, and Qi are primes,
>
> (2.) the points (Pi,0) are on the subinterval [2,N/2]
>       of the X-Axis,
>
> (3.) the points (0,Qi) are on the subinterval [N/2,N-2]
>       of the Y-Axis.
>
> A Minimal Goldbach Prime Partition Point corresponding
> to N,(abbreviated: "MGPPP[N]")is a point (P,Q) among
> the points (Pi,Qi)  such that:
>
> the distance between the point (P,Q) and the point (N/2,N/2)
>
> = smallest distance among all distances between
>   the points (Pi, Qi) and the point (N/2, N/2).
>
> If N is of the form N = 2P then MGPPP[N] = (N/2,N/2).
>
> If N is of the form N = P + Q, with P not equal to Q, then
> MGPPP[N] = (P,Q).
>
> For geometrical pictures please visit:
> http://gilmarlily.netfirms.com/goldbach/goldbach.htm
>
> Please download the following Mathematica notebook
> (version 5.0)by double-cliking this link:
>
> http://gilmarlily.netfirms.com/download/FullSimplify.nb
>
> You can use this notebook to duplicate the evaluations
> appearing in the discussion below:
>
> Having said the above; the following program
> calculates the MGPPP[N]:
>
> MGPPP[n_] := Module[{p, q},
>     {m = n/2; If[Element[m,
>     Primes], {p = m, q = m}, {k =PrimePi[m];
>     Do[If[Element[n - Prime[i], Primes], hit = i;
>     Break[]], {i, k, 1, -1}],p = Prime[hit],
>     q = n - p}]}; {p, q}]
>
> Examples:
>
> MGPPP[4]={2,2}
>
> MGPPP[100]={47,53}.
>
> The above program can be easily changed as follows to give
> only the "p-value" (instead of the point {p,q}):
>
> pvalue[n_] := Module[{p},
>     {m = n/2; If[Element[m,
>     Primes], {p = m}, {k =PrimePi[m];
>     Do[If[Element[n - Prime[i], Primes], hit = i;
>     Break[]],{i, k, 1, -1}], p = Prime[hit]}]}; p]
>
> A plot to depict the p-values is given by:
>
> plt1=ListPlot[Table[pvalue[n],{n,4,100,2}],PlotJoined®True,
> PlotStyle®Hue[0.1]]
>
> It has been conjectured that the Minimal Goldbach Prime Partition
> p-values have a lower bound given by:
>
> Prime[PrimePi[Sqrt[N]].
>
> To visualize this do:
>
> (** oldlb= abbreviation for old lower bound. **)
>
> oldlb[n_]:=Prime[PrimePi[Sqrt[n]]];
>
> plt2=ListPlot[Table[oldlb[n],{n,4,100,2}],
> PlotJoined®True,PlotStyle®Hue[0.2]]
>
> Show[plt1,plt2]
>
> Try also:
>
> TableForm[Table[{n,oldlb[n],pvalue[n]},{n,4,100,2}],
> TableHeadings->{None,{"n","oldlb[n]","p"}},
> TableAlignments->Center]
>
> However; that lower bound can be improved by the following
> new lower bound:
>
> Prime[PrimePi[(N+2*Sqrt[N])/4].
>
> The following program makes use of this latest interval:
>
> pval[n_] := Module[{p},
>     {m = n/2; If[Element[m,
>     Primes], {p = m}, {k =PrimePi[m];
>     l=PrimePi[(n+2*Sqrt[n])/4];
>     Do[If[Element[n - Prime[i], Primes], hit = i;
>           Break[]], {i, k, l, -1}], p = Prime[hit]}]}; p]
>
> To compare the p-values with the old and new lower bounds do:
>
> plt3=ListPlot[Table[pval[n],{n,4,100,2}],PlotJoined®True,
> PlotStyle®Hue[0.1]]
>
> newlb[n_]:=Prime[PrimePi[(n+2*Sqrt[n])/4]]
>
> plt4=ListPlot[Table[newlb[n],{n,4,100,2}],
> PlotJoined®True,PlotStyle®Hue[0.6]]
>
> Show[plt3,plt4]
>
> Show[plt2,plt3,plt4]
>
> Try also:
>
> TableForm[Table[{n,newlb[n],pval[n]},{n,4,100,2}],
> TableHeadings->{None,{"n","newlb[n]","p"}},
> TableAlignments->Center]
>
>
> Finally; I try the FullSimplify command, to test the validity
> of the new bound,via:
>
> FullSimplify[newlb[n]<= pval[n],Element[n,EvenQ]&&n³4]
>
> hoping that this evaluation gives me "True" as a result.
>
> I get instead a cryptic:
>
> "Prime[PrimePi[1/4(2Sqrt[n]+n)]]<= p$214"
>
> as answer.
>
> Then I realize: one would really need to prove Goldbach's Conjecture 
> first,
> so that the "True" after the above FullSimplify evaluation is truly 
> valid.
>
> So I try instead:
>
> FullSimplify[newlb[n]<=pval[n],Element[n,EvenQ]&&n³4&&n<10^6]
>
> and this time I get:
>
> "Prime[PrimePi[1/4(2Sqrt[n]+n)]]<= p$358".
>
> My questions are:
>
> (1.) How can I make FullSimplify work for user-defined functions?
>
> (2.) How can I make
>      FullSimplify[newlb[n]<=pval[n],Element[n,EvenQ]&&n³4&&n<10^6]
>      "True"?
>
> Thank you for your attention, and your help!
>
>


  • Prev by Date: Re: Re: Inserting user material in the HelpBrowser
  • Next by Date: Re: How can I make FullSimplify work for user-defined functions?
  • Previous by thread: How can I make FullSimplify work for user-defined functions?
  • Next by thread: Re: How can I make FullSimplify work for user-defined functions?