Re: Re: Free variables in an expression

• To: mathgroup at smc.vnet.net
• Subject: [mg54828] Re: [mg54794] Re: [mg54758] Free variables in an expression
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Wed, 2 Mar 2005 22:29:17 -0500 (EST)
• References: <200503020626.BAA08074@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```The problem is that the OP completely failed to explain the meaning of
"free" and "bound". With the usual meaning of these terms in  logic the
following sentence:

expr=Exists[y, Element[y, Reals], x*y - 1 == 0]

contains just one free variable x.  In this case however

Cases[expr, _Symbol?( !NumericQ[#1] & ), Infinity]

{y, y, Reals, y, x}

which is of course wrong. However,

Union[Cases[Resolve[expr],_Symbol?
(FreeQ[Attributes[#],Protected]&),Infinity]]

{x}

returns the correct answer.

I have to admit I rather doubt that this is what the OP meant, but if
not than his use of "free" and "bound" is non-standard.

Andrzej Kozlowski

On 2 Mar 2005, at 07:26, Bob Hanlon wrote:

> expr=Log[6x]+y/3-Exp[z]*Pi-3*I;
>
> Cases[expr, _Symbol?(!NumericQ[#]&),Infinity]
>
> {z,y,x}
>
>
> Bob Hanlon
>
>>
>> From: Sascha Kratky <notvalid at notvalid.com>
To: mathgroup at smc.vnet.net
>> Date: 2005/03/01 Tue AM 01:58:13 EST
>> Subject: [mg54828] [mg54794] [mg54758] Free variables in an expression
>>
>> Is there a Mathematica built-in function that gives a list of free
>> (unbound) variables in an arbitrary expression?
>>
>> Thanks,
>> Sascha
>>
>>
>
>

```

• Prev by Date: Re: Bug in Import?
• Next by Date: Re: Yukawa
• Previous by thread: Re: Free variables in an expression
• Next by thread: Re: Free variables in an expression