Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Infinity vs DirectedInfinity[1]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70544] Re: Infinity vs DirectedInfinity[1]
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Thu, 19 Oct 2006 03:22:07 -0400 (EDT)
  • References: <acbec1a40610162329m404af5d6h5d54098ec764d0ad@mail.gmail.com> <acbec1a40610180602r3edca17ic9c4004c3b2ba97d@mail.gmail.com> <A9E08A23-029D-4751-BA75-831DBF0BA570@mimuw.edu.pl>

Having seen Carl Woll's reply to this thread I realized that I should  
have used the word "format" rather than "parse", since parsing means  
something like "analyzing the syntax" of an expression, while turning  
it into some kind of visual form is "formatting". In fact, the old  
Kernel command Format does exactly that.
Of course MakeBoxes also involves formatting, but MakeBoxes is  
intended only for output formats and for use with the FrontEnd.  
Format on the other hand works with Input form and will affect the  
appearance of expressions even when only the command line is used.


Andrzej Kozlowski

On 18 Oct 2006, at 22:28, Andrzej Kozlowski wrote:

> 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/
>


  • Prev by Date: Re: Different results after update to Mathematica 5.2
  • Next by Date: RE: "particle" sliding along a curve
  • Previous by thread: Re: Infinity vs DirectedInfinity[1]
  • Next by thread: Re: Infinity vs DirectedInfinity[1]