Skip to main content
installed code fencing
Source Link
thorimur
  • 9.1k
  • 18
  • 32

How can we (loosely) check whether variable AA is determined, not directly computing A A?
(= How can we define DeterminedQDeterminedQ function ?)

For example,

In[1] x=a+b
In[2] a=2

Then x is not complementlycompletely determined yet. So,

In[3] DeterminedQ[x]
Out[3] False

But if we go further

In[4] b=2

then

Out[5] DeterminedQ[x]
Out[5] True

BecuaseBecause now x=4x=4.

I have an idea. My idea is inspecting Definition[x]Definition[x], and get variable names v1,v2,...v1,v2,... those constructing xx. Then inspect Definition[v1], Definition[v2], ...Definition[v1], Definition[v2], ..., repeat, repeat.
If we encounter a variable w such that defition[w] produces Null, then xx is not determined, Determined[x]DeterminedQ[x] must be false.
Otherwise, variables at bottom level will turn out to be mixture of determined numbers or strings, etc. In this case DeterminedQ[x]DeterminedQ[x] must be true.

But there is a problem in my idea. For example,

b=Sqrt[3+2Sqrt[2]] x=a*(b-1-Sqrt[2])

b=Sqrt[3+2Sqrt[2]]
x=a*(b-1-Sqrt[2])

Then xx is mathematically determined becuase x=a*0=0x == a*0 == 0, but according to my idea, DeterminedQ[x] DeterminedQ[x] becomes false, because Definition[a]Definition[a] becomes NullNull.

And if we make a mathematica code,

x = the least even number that is not sum of two prime numbers

x = the least even number that is not sum of two prime numbers  

(The code can be written using NestWhileNestWhile command)
Then the existence of xx is not known mathematically, but according to my idea,
DeterminedQ[x] DeterminedQ[x] becomes true.

I don't care whether xx is determined mathematically or not.
I just want DeterminedQDeterminedQ function, which is loose but super fast, always give true or false.

...Or, there may be a built-in function already. Can you construct/know
DeterminedQ like fuctionDeterminedQ-like function ?

How can we (loosely) check whether variable A is determined, not directly computing A ?
(= How can we define DeterminedQ function ?)

For example,

In[1] x=a+b
In[2] a=2

Then x is not complemently determined yet. So,

In[3] DeterminedQ[x]
Out[3] False

But if we go further

In[4] b=2

then

Out[5] DeterminedQ[x]
Out[5] True

Becuase now x=4.

I have an idea. My idea is inspecting Definition[x], and get variable names v1,v2,... those constructing x. Then inspect Definition[v1], Definition[v2], ..., repeat, repeat.
If we encounter a variable w such that defition[w] produces Null, then x is not determined, Determined[x] must be false.
Otherwise, variables at bottom level will turn out to be mixture of determined numbers or strings, etc. In this case DeterminedQ[x] must be true.

But there is a problem in my idea. For example,

b=Sqrt[3+2Sqrt[2]] x=a*(b-1-Sqrt[2])

Then x is mathematically determined becuase x=a*0=0, but according to my idea, DeterminedQ[x] becomes false, because Definition[a] becomes Null.

And if we make a mathematica code,

x = the least even number that is not sum of two prime numbers

(The code can be written using NestWhile command)
Then the existence of x is not known mathematically, but according to my idea,
DeterminedQ[x] becomes true.

I don't care whether x is determined mathematically or not.
I just want DeterminedQ function, which is loose but super fast, always give true or false.

...Or, there may be a built-in function already. Can you construct/know
DeterminedQ like fuction ?

How can we (loosely) check whether variable A is determined, not directly computing A?
(= How can we define DeterminedQ function ?)

For example,

In[1] x=a+b
In[2] a=2

Then x is not completely determined yet. So,

In[3] DeterminedQ[x]
Out[3] False

But if we go further

In[4] b=2

then

Out[5] DeterminedQ[x]
Out[5] True

Because now x=4.

I have an idea. My idea is inspecting Definition[x], and get variable names v1,v2,... those constructing x. Then inspect Definition[v1], Definition[v2], ..., repeat, repeat.
If we encounter a variable w such that defition[w] produces Null, then x is not determined, DeterminedQ[x] must be false.
Otherwise, variables at bottom level will turn out to be mixture of determined numbers or strings, etc. In this case DeterminedQ[x] must be true.

But there is a problem in my idea. For example,

b=Sqrt[3+2Sqrt[2]]
x=a*(b-1-Sqrt[2])

Then x is mathematically determined becuase x == a*0 == 0, but according to my idea, DeterminedQ[x] becomes false, because Definition[a] becomes Null.

And if we make a mathematica code,

x = the least even number that is not sum of two prime numbers  

(The code can be written using NestWhile command)
Then the existence of x is not known mathematically, but according to my idea, DeterminedQ[x] becomes true.

I don't care whether x is determined mathematically or not.
I just want DeterminedQ function, which is loose but super fast, always give true or false.

...Or, there may be a built-in function already. Can you construct/know
DeterminedQ-like function ?

Source Link
imida k
  • 4.3k
  • 10
  • 20

Checking variable A is determined. (DeterminedQ ?)

How can we (loosely) check whether variable A is determined, not directly computing A ?
(= How can we define DeterminedQ function ?)

For example,

In[1] x=a+b
In[2] a=2

Then x is not complemently determined yet. So,

In[3] DeterminedQ[x]
Out[3] False

But if we go further

In[4] b=2

then

Out[5] DeterminedQ[x]
Out[5] True

Becuase now x=4.

I have an idea. My idea is inspecting Definition[x], and get variable names v1,v2,... those constructing x. Then inspect Definition[v1], Definition[v2], ..., repeat, repeat.
If we encounter a variable w such that defition[w] produces Null, then x is not determined, Determined[x] must be false.
Otherwise, variables at bottom level will turn out to be mixture of determined numbers or strings, etc. In this case DeterminedQ[x] must be true.

But there is a problem in my idea. For example,

b=Sqrt[3+2Sqrt[2]] x=a*(b-1-Sqrt[2])

Then x is mathematically determined becuase x=a*0=0, but according to my idea, DeterminedQ[x] becomes false, because Definition[a] becomes Null.

And if we make a mathematica code,

x = the least even number that is not sum of two prime numbers

(The code can be written using NestWhile command)
Then the existence of x is not known mathematically, but according to my idea,
DeterminedQ[x] becomes true.

I don't care whether x is determined mathematically or not.
I just want DeterminedQ function, which is loose but super fast, always give true or false.

...Or, there may be a built-in function already. Can you construct/know
DeterminedQ like fuction ?