Re: Infinity vs DirectedInfinity[1]
- To: mathgroup at smc.vnet.net
- Subject: [mg70539] Re: Infinity vs DirectedInfinity[1]
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Thu, 19 Oct 2006 03:21:56 -0400 (EDT)
- References: <acbec1a40610162329m404af5d6h5d54098ec764d0ad@mail.gmail.com> <acbec1a40610180602r3edca17ic9c4004c3b2ba97d@mail.gmail.com>
I definitely do not. I have been trying, it seems without effect, to persuade Chris that this has nothing to do with MakeBoxes or anything "like" MakeBoxes, since MakeBoxes involves and interplay between the Kernel and the FrontEnd and this phenomenon ivolves the Kernel alone and has nothing at all to do with the FrontEnd. In fact can be demonstrated using the command line and without making any use of the FrontEnd. The phenomenon involves two of the basic function of the Kernel, known as "parsing" and "evaluation". Evaluation involves only the FullForm of expressions. The process of evaluation involved is thus demonstrated below: In[1]:= FullForm[Hold[Infinity]] Out[1]//FullForm= Hold[Infinity] In[2]:= FullForm[Infinity] Out[2]//FullForm= DirectedInfinity[1] In the first example Evaluation is prevented by Hold, which shows that Infinity evaluates to DirectedInfinity[1]. Note that Hold prevents evaluation but it does not prevent "parsing", e.g: Hold[Plus[a,b]] Hold[a+b] Here no evaluation took place, but Plus[a,b] was parsed into the input form a+b. (This has nothing to do with the FrontEnd or MakeBoxes!). Now observe this: In[7]:= Hold[DirectedInfinity[1]]//InputForm Out[7]//InputForm= Hold[Infinity] This is pure parsing in action - again no FrontEnd involved. No evaluation took place because Hold prevents evaluation. Moreover, the FullForm actually remains unchanged: In[8]:= FullForm[%] Out[8]//FullForm= Hold[DirectedInfinity[1]] In fact, we can now demonstrate here that two expressions can be parsed to look exactly the same *in InputForm* (this is important, because the fact that two different expressions may look the same in StandardForm or TraditionalForm is well known and easy to demonstrate) although they are actually different objects as far as evaluation is concerned: a = Hold[DirectedInfinity[1]]; b = Hold[Infinity]; In[13]:= InputForm[a] Out[13]//InputForm= Hold[Infinity] In[14]:= InputForm[b] Out[14]//InputForm= Hold[Infinity] In[15]:= a===b Out[15]= False In[16]:= FullForm[a] Out[16]//FullForm= Hold[DirectedInfinity[1]] In[17]:= FullForm[b] Out[17]//FullForm= Hold[Infinity] To me this seems pretty clear and it certainly has no relation to MakeBoxes. Andrzej Kozlowski On 18 Oct 2006, at 22:02, Chris Chiasson wrote: > So, after talking further with Andrzej Kozlowski, I now think that > > Infinity is defined to be DirectedInfinity[1] (perhaps via Set, i.e. > Infinity=DirectedInfinity[1] ) > > and that it is DirectedInfinity[1] that has a MakeBoxes (or > equivalent) rule to display as Infinity in StandardForm and > TraditionalForm (or actually, \[Infinity], if you are in the FrontEnd > looking at an Output cell). > > Although, I am not sure Andrzej actually agrees with me :-] > > On 10/17/06, Chris Chiasson <chris at chiasson.name> wrote: >> Infinity is a symbol, as far as I know. However, in FullForm it is >> shown as the equivalent DirectedInfinity[1]. >> >> Is there some kind of MakeBoxes rule for FullForm that makes Infinity >> show up that way? >> >> -- >> http://chris.chiasson.name/ >> > > > -- > http://chris.chiasson.name/
- Follow-Ups:
- Re: Re: Infinity vs DirectedInfinity[1]
- From: "Chris Chiasson" <chris@chiasson.name>
- Re: Re: Infinity vs DirectedInfinity[1]