Re: simple question
- To: mathgroup at smc.vnet.net
- Subject: [mg76447] Re: simple question
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Tue, 22 May 2007 02:55:59 -0400 (EDT)
- Organization: Uni Leipzig
- References: <f2rrb1$a36$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi,
Unprotect[Element]
Element /: MakeBoxes[Element[a__, dom_],
fmt_: StandardForm] := (Print[a];
RowBox[{"Element", "[", MakeBoxes[a, fmt], ",", MakeBoxes[b, fmt],
"]"}])
Protect[Element]
will do that.
Regards
Jens
dimitris wrote:
> I think the following is very simple but anyway...
>
> Suppose the following expression
>
> In[4]:=
> \!\(o = \((\((2\/\(27 + 3\ \@69\))\)\^\(1/3\) + 1\/3\ \((1\/2\ \((27 +
> 3\ \
> \@69)\))\)\^\(1/3\))\)\^27369\)
>
> Out[4]=
> \!\(\((\((2\/\(27 + 3\ \@69\))\)\^\(1/3\) + 1\/3\ \((1\/2\ \((27 + 3\
> \
> \@69)\))\)\^\(1/3\))\)\^27369\)
>
> (It is in StandardForm!)
>
> In[5]:=
> o//InputForm
> Out[5]//InputForm=
> ((2/(27 + 3*Sqrt[69]))^(1/3) + ((27 + 3*Sqrt[69])/2)^(1/3)/3)^27369
>
> Now consider the command
>
> In[7]:=
> Element[o,Integers]//InputForm
>
> Out[7]//InputForm=
> ((2/(27 + 3*Sqrt[69]))^(1/3) + ((27 + 3*Sqrt[69])/2)^(1/3)/3)^27369
> Integers
>
> Even the presence of //InputForm it appears the special
> character \[Element].
>
> However I would like as output of In[7]
>
> Element[((2/(27 + 3*Sqrt[69]))^(1/3) + ((27 + 3*Sqrt[69])/2)^(1/3)/
> 3)^27369, Integers]
>
> What must be modified to this end?
>
> Thanks
> Dimitris
>
>