Re: simple question

• To: mathgroup at smc.vnet.net
• Subject: [mg76416] Re: [mg76399] simple question
• From: Carl Woll <carlw at wolfram.com>
• Date: Tue, 22 May 2007 02:39:47 -0400 (EDT)
• References: <200705211004.GAA10140@smc.vnet.net>

```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
>
>
>
Version 6 formats Element in the way you want. One possibility to get
the same behavior in 5.2 (or earlier) is the following:

In[1]:=
Unprotect[Element];
Format[Element[a_,b_],InputForm]:=Format[Element,InputForm][a,b]
Protect[Element];

For example, consider the following expression:

In[4]:=
expr = Subscript[a, b] \[Element] Subscript[b, c]

Cell | Convert To | InputForm

or

expr //InputForm

and obtain the format you want, without the character \[Element].

Carl Woll
Wolfram Research

```

• Prev by Date: Re: Simplify (-1)^((-1)^n)
• Next by Date: [Mathematica 6]3 lines of code which crashes Mathematica every time
• Previous by thread: simple question
• Next by thread: Re: simple question