#Amend
def p ():
w = set()
N = [w]
i = [w]
p = [w]
x = [i, p]
o = 0
for o in range(len(N)):
w = set(w)
N = N.append(w)
i = i.append(w)
o = o + 1
return N
if o == float('inf'):
p = i.append(i)
break
k = N.index(float('inf')) is x in x.union(2 >= N) | all(i) in N(x.index(i) >= x.index(p))
return k
global X
X = 0
while X <= 2:
X = X + 1
any(k) in X(p(k) is 0) or all(k) in X(p(k) is 1)
q=""
while True:
i=11
while i < 126:
i= i + 1
o = chr(i)
p ()
v = p()
if v == 1:
q = q + o
elif v == 0:
q = q
if q == q + "":
break
print (q)

The equations for this can be found on the first page of this article

Itās kind of a mess, but i feel itās worth my time.

So without further ado, why wonāt this code work?

Between the terse variable names and the lack of comments, I am not sure what you want this code to do. Itās really unreasonable to ask people to decipher a research paper and divine the intent of your code from that paper. I could, but I donāt have the time, and most people here donāt have advanced degrees in Math or CS.

What do you actually understand about programming? I think you may need to back way up and learn some basics. Python looks friendly, but you canāt quite write equations directly from a research paper and get it to run.

Youāre basically saying āOk, letās use a car instead of a motorcyle or an airplane. Can I also use the car as a boat?ā

A symbol can only be one type of thing. In this case, X could be a number OR a function OR an object, but not all three in the same scope.

Your code makes no sense. Your questions do not make sense. Based on the questions you are asking, you do not seem to know the difference between a variable, a function, and a loop. I donāt know what you are trying to do, and as we said before, Iām not going to read the entire paper to try to figure out your code.

First you complain about Python not being an exact representation of the equations involved, then you say the correlation isnāt good enough. Iām through. Please stop spamming my page.

Here you have redefined p as an array holding a single set.

Here you have redefined w as as set containing itself.

Here you have said that you wish to loop over the length of N

But here you keep increasing the length of N

Here you have a return statement which will halt your function and prevent the rest of the code from running.

This seems to be saying that you intend to take the length of N out to infinity, which is not possible.

Why?

This is treating X as a number.

This is treating X as a function.

Here you have declared q as a string.

And here youāre making the character codes Vertical tab through Tilde? Why?

Why?

When wonāt a string be equal to itself with nothing added?

This is not a sensible representation of the two equations that are in your linked paper, even if you could actually just write equations straight from a paper as Python code.

So, you seem to lack fundamental knowledge about how to use Python and I recommend you learn the basics of how to write Python before you try to make programs to explore set theory.

There just isnāt a sensible way to represent an infinite set in Python, let alone test āevery function pā against an infinite set in Python.

You canāt test an infinite set against all possible two valued functions in Python

You donāt seem to know how to use fundamental control structures in Python

Python just doesnāt work the way you are attempting to use it.

You could use Python to verify that a specific finite set meets the omniscience principle for a specific two valued function. But that is disregarded as a trivial case in Escardoās paper (understandably so).

No. For loops do not ādo the entire thing at onceā. Loops repeat their entire body for every value in the control set

for i in range(10):
print("i: " + str(i))

Infinite recursion is a separate thing. Infinite recursion leads to a stack overflow.

Python wonāt automatically sum infinite series for you, if thatās what you are thinking of. You may get sympy to compute the sum of some infinite series.