[Date Index]
[Thread Index]
[Author Index]
Re: TagSet and Unprotect
*To*: mathgroup at smc.vnet.net
*Subject*: [mg77778] Re: [mg77594] TagSet and Unprotect
*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>
*Date*: Sat, 16 Jun 2007 03:58:51 -0400 (EDT)
*References*: <200706131141.HAA07156@smc.vnet.net>
Here is the answer.
In Mathematica 6 there is no problem, in other words, you can assign
your rule to Plus after Unprotecting it.
In Mathematica 5.2 you have to Unprotect Plus twice. Here is what
happens:
In[1]:=
Unprotect[Plus];
In[2]:=
Plus /: -PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4] =
Pi^2/6 - (3*Log[2]^2)/2
Plus in .... is Protected.
Out[2]=
Pi^2/6 - (3*Log[2]^2)/2
In[3]:=
Unprotect[Plus];
In[4]:=
Plus /: -PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4] =
Pi^2/6 - (3*Log[2]^2)/2
Out[4]=
Pi^2/6 - (3*Log[2]^2)/2
In[5]:=
-PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4]
Out[5]=
Pi^2/6 - (3*Log[2]^2)/2
I think the reason for this is very similar to one that we alrady
once discussed on this forum earlier.
Andrzej Kozlowski
On 13 Jun 2007, at 20:41, dimitris wrote:
> Following a idea by Raymond Manzoni
> let me prove that
>
> - PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4]=Pi^2/6 - (3*Log[2]^2)/2
>
> Indeed
>
> Off[N::meprec] (*turn off a message*)
> PolyLog[2, z/(z + 1)] + PolyLog[2, z/(z - 1)] - (1/2)*PolyLog[2, z^2/
> (z^2 - 1)] + (1/4)*Log[(1 + z)/(1 - z)]^2 == 0
> (*an identity of dilogarithms*)
> (FunctionExpand[Expand[2*#1]] & ) /@ (% /. z -> -3^(-1))
> (*Mathematica does
> the rest*)
> Reverse[(Plus @@ Cases[%, (a_)*PolyLog[x_, y_], Infinity] - #1 & ) /@
> %]
>
> (1/4)*Log[(1 + z)/(1 - z)]^2 + PolyLog[2, z/(-1 + z)] + PolyLog[2, z/
> (1 + z)] - (1/2)*PolyLog[2, z^2/(-1 + z^2)] == 0
>
> -(Pi^2/6) + (3*Log[2]^2)/2 - PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4] ==
> 0
>
> -PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4] == Pi^2/6 - (3*Log[2]^2)/2
>
> I try to add this result to Plus, so that
> in the following to have additional substitution.
>
> rul1 = {PolyLog[2, z_] /; z < -3 -> -PolyLog[2, 1/z] - Pi^2/6 -
> (1/2)*Log[-z]^2,
> PolyLog[2, z_] -> PolyLog[2, 1/(1 - z)] - Pi^2/6 + (1/2)*Log[1 -
> z]*Log[(1 - z)/z^2]};
> o = Expand[3*PolyLog[2, -3] + PolyLog[2, -8] /. rul1]
>
> -((2*Pi^2)/3) - (3/2)*Log[9/4]*Log[4] - Log[8]^2/2 - PolyLog[2, -
> (1/8)] + 3*PolyLog[2, 1/4]
>
> That is, I want Mathematica to substitute - PolyLog[2, -(1/8)] +
> 3*PolyLog[2, 1/4]
> by Pi^2/6 - (3*Log[2]^2)/2 in the expression o.
>
> In the beggining I tried:
>
> Unprotect[PolyLog];
> PolyLog /: -PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4] = Pi^2/6 -
> (3*Log[2]^2)/2
>
> TagSet::tagpos : Tag PolyLog in -PolyLog[2, -(1/8)] + 3*PolyLog[2,
> 1/4] is \
> too deep for an assigned rule to be found.
> Pi^2/6 - (3*Log[2]^2)/2
>
> I understood the presence of this message.
> That's why I try to assign this equality to Plus.
>
> Unprotect[Plus];
> Plus /: -PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4] = Pi^2/6 -
> (3*Log[2]^2)/2
> TagSet::write: Tag Plus in-PolyLog[2, -(1/8)] + 3*PolyLog[2, 1/4] is
> Protected
>
> Now I don't understand the presence of this message.
> I can't assign an UpValue to a built in function?
>
> Can somebody explain me what is going on?
> And how I must work in order to overcome the problem?
>
> Thanks
> Dimitris
>
>
Prev by Date:
**Re: Notebook History -- what is it good for?**
Next by Date:
**Re: Re: :: notation**
Previous by thread:
**TagSet and Unprotect**
Next by thread:
**Re: TagSet and Unprotect**
| |