Re: Re: Re: Re: Mathematica language issues

• To: mathgroup at smc.vnet.net
• Subject: [mg53157] Re: [mg53142] Re: [mg53112] Re: [mg53050] Re: Mathematica language issues
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Mon, 27 Dec 2004 06:41:27 -0500 (EST)
• References: <200412241058.FAA05777@smc.vnet.net> <200412250900.EAA18524@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```I am sure Fred will provide his own answers, but on the principle "the
more the merrier" (especially at Christmas) , I thought I would
contribute my own comments:

On 25 Dec 2004, at 18:00, DrBob wrote:

> Fred,
>
> At several points you made statements I simply don't understand. The
> examples clarify what you meant for the most part, but I'm still
> wondering, so here goes:
>
>>> Unevaluated is meant to pass unevaluated arguments to a function
>>> body and as such it works perfectly. No one in practice is interested
>>> in (1+1)*Unevaluated[2+2].
>
> Do you mean a Function body? If not, Times in that example qualifies
> as a function body. (I think.)

One uses Unevaluated to prevent a rule from being applied. This means
that a rational person will only do it when he knows there is a rule
that he does not want to be used. There is no normal situation where
one would use Unevaluated and there was no specific evaluation one
wanted to prevent.

>
>>> If now no rules for f can be applied, Mathematica returns the result
>>> so far, with Unevaluated wrapped again around the labeled arguments.
>
> So it's only rules FOR F that matter? Does the distributive property
> count as a rule for Times?

You do not need Unevaluated to prevent the distributive rule being used
because it is never used automatically. You need to apply something
like Distribute etc.

>
>>> If a rule for f can be applied, the administration of arguments
>>> that come from Unevaluated is completely skipped.
>
> I don't get any meaning from the phrase "administration of arguments".

I think Fred meant that the rule is applied to the arguments "as
given", without changing them or rearranging in any way.

>
>>> I first formulate my assumption (only WRI and maybe a few others
>>> know if I am right!)
>
> Even if your assumption is correct (as I suspect it is), this
> statement doesn't really square with a later claim that there's no
> mystery.

A certian mystery exists even when we have full documentation, because
even that is only a description of expected behaviour of Mathematica
and does not include the actual mechanism behind the behaviour (of
which at most a vague idea is provided). Everything else requires the
source code. If Fred's "speculations" came form an employee of WRI they
could have the status of "documentation" without changing a word. The
mystery here is simply a question of authoritativeness.

Andrzej Kozlowski
Chiba, Japan
http://www.akikoz.net/~andrzej/
http://www.mimuw.edu.pl/~akoz/

```

• Prev by Date: Re: Re: Re: Re: Mathematica language issues
• Next by Date: Unevaluated, Plus and Times (was Re: Re: Re: Re: Mathematica language issues)
• Previous by thread: Re: Re: Re: Re: Mathematica language issues
• Next by thread: Re: Re: Re: Re: Mathematica language issues