No, you’re missing the point. Stop talking about code. Stick to what Steven is asking of you.
Programs are written to solve a problem, but as of yet, we don’t know what problem you’re trying to solve. Talking about the solution isn’t helping anyone.
Your questions appear to be not only an XY problem, but a recursive one (at times, I wonder if perhaps an infinitely so).
Given that, we need to understand your ultimate objective here (prove a theorem? evaluate a set property? build an omniscient AI?), or this conversation is likely to continue going in circles forever—at least until the finite reserves of time, energy and patience of those volunteering their time to try to help you are exhausted.
Looking back at the long, cyclic history of your many threads on here, Python-List and the freecodecamp forum, maybe the real infinite loop was the discussions you had along the way…
Ive been told before that its the thought that counts…
however I do believe someone should write the omniscient AI before things get out of hand again…
you smoked that cig G.A.F. btw thank you
Problems like:
What is the best medicine
How do I bring people back to life
How can we have freedom for animals
How do we colonize other planets
How can we do quantum Thermodynamics more efficiently
How do we know what’s out there in the metaphysical realms
What is the best music
What are the best graphics
Write _____ program for me
Write a good book
Invent Something
Find the mathematical formula for _____
But most importantly:
How do we logically prove these things are what is said
The limited principle of omniscience (LPO) has nothing to do with someone/something being all-knowing. It’s just another case of mathematicians re-using English words and coming up with a technical definition for them. “Field theory” has nothing to do with a field of grass, and “ring theory” has nothing to do with wedding rings. Sometimes, there’s a nice analogy or inspiration for terminology, and that Wikipedia article has some sort of justification for why the word “omniscience” is used, but it’s not used to mean literally “knowing everything”.
LPO says the equivalent of facts like “it either rains every day, or there’s some day it doesn’t rain”. Most humans and most mathematics would just count this as obvious. It’s only non-obvious when someone decides to do “constructive mathematics” (nothing to do with hammers or nails or hardhats :), in which they only consider a theorem to be proved if they can produce an example. Constructive mathematics is rather strange to work with sometimes, since you can’t assume basic things like “any given proposition is either true or its negation is true”. Constructive reasoning is apparently useful for some theorem-proving systems like Lean or Coq or Agda. By itself though, LPO won’t tell you any information that isn’t already obvious.
One more thing: there are limitations on what a computer can compute, even theoretical super-powerful computers. For example, the Halting problem is uncomputable, so it’s impossible to make a computer that detects whether a given program will finish. So I’m afraid that omniscience in the “knowing/proving literally everything” sense is impossible to achieve.
But at this point we’re rather off-topic for a Python forum.
Are you referring to passing functions as arguments to your functions? If so, and if those functions that serve as arguments are defined within certain modules, then import those modules. Here is an example:
import math # source of the definitions
def sum_of_function_results(val, *funcs):
return sum([func(val) for func in funcs])
print(sum_of_function_results(math.pi / 4, math.sin, math.cos, math.tan))
No, see how you defined the arguments in the function call? They were different than the original parameters in the function definition. I need to keep them the same.
If there are calculations you’ve done to do something useful and you need help expressing those in Python, it would be useful to see those calculations.
At this point, I’m afraid this just sounds like some sort of fantasy.
Then, would you be referring to default values for parameters, such as references to function definitions? We do seem to have departed from the original topic of this discussion, so maybe a new discussion is needed to accommodate the topic of importing definitions.
It now appears that when you initiated this discussion, perhaps you had some broad societal questions in mind. This forum, however, focuses on Python, so you may need another forum for addressing the broad questions.