Re: TagSet and Unprotect

*To*: mathgroup at smc.vnet.net*Subject*: [mg77738] Re: TagSet and Unprotect*From*: dimitris <dimmechan at yahoo.com>*Date*: Fri, 15 Jun 2007 04:59:42 -0400 (EDT)*References*: <f4omjv$7l3$1@smc.vnet.net><f4r14b$65e$1@smc.vnet.net>

So how can I overcome the situation? Remember, I have > > o=(2*Pi^2)/3) - (3/2)*Log[9/4]*Log[4] - Log[8]^2/2 - PolyLog[2, - > > (1/8)] + 3*PolyLog[2, 1/4] > > 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. ??? Dimitris and I want / Jens-Peer Kuska : > Hi, > > yes, you can't set an UpValue[] for a protected function > > Try > Blub[x_?NumericQ] := "Ach" > > Protect[Blub] > > and > > Blub /: x_Blub + y_Blub := "Oh je!" > > Regards > Jens > > > 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 > > > >