last day (16 days later) » 

00:40
0
Q: Sampling irrational numbers

babyKContext: Mathematically, the probability of randomly sampling an irrational number from the number axis equal to 1. Except for like "Pi,E", Mma cannot produce irrational numbers. Question: Can a computer or Mathematica sample irrational numbers? My test: Both trigonometric...

As the product or sum of an rational number and an irrational number is irrational, MMA may sample irrational numbers
it can construct an interval like (0,1) containing the irrational numbers?
Any real irrational number is an infinite non-periodic decimal. No computer system can operate with these.
@user64494: You're simply incorrect here. Mathematica "knows" fully about irrational numbers, operates with them, and represents them as $\pi$, $e$, $\sqrt{3}$, $\phi$, and infinite others. The only thing a finite computer cannot do is produce an exact decimal representation of those numbers.
@DavidlG.Stork: Yes, Mathematica can operate with some irrational numbers from a countable set. However, all the real irrational numbers form an uncountable set. BTW, I am PhD in math for ages and I am too old for your remarks. Do you understand me?
00:40
@user64494: You said "No computer system can operate with these [irrational numbers]." That is provably false. Your "reasoning" about computers and irrational numbers applies likewise to integers, then. [By the way, I have a PhD in Physics, was a professor of mathematics at a major east coast university, currently hold faculty positions in two departments and two programs at Stanford University, and teach CME/SymSys 294, Computational symbolic mathematics, which is in Mathematica, and just last month won a Wolfram Mathematica Innovator's Award.]
In fact, RandomReal[{0,1},WorkingPrecision->10] produces a random rational from the set Table[j/10^10,{j,0,10^10}]. See the documentation for info.
@DavidlG.Stork: "You said "No computer system can operate with these [irrational numbers]." That is provably false.". The exact quote is "Any real irrational number is an infinite non-periodic decimal. No computer system can operate with these". Sorry, I prefer arguments over ungrounded claims. That's all.
I'm not sure I understand the question. If by "sample" we mean produce an actual irrational number randomly chosen uniformly-over-the-irrationals from some interval, then this cannot be done. Sure, Mathematica can represent special irrational values and special forms for irrational numbers, but the probability of selecting any of those special values is 0. The "non-special" irrationals cannot be forced into such a special form, and so the "typical" irrational is not representable in any way. Is there some other definition of "sample" being used here?
@DavidG.Stork I think it's pretty safe to assume that user64494 was speaking about the general case. My understanding is that the typical real number cannot be represented in any finite manner. Sure, we can perform certain operations with certain representations of certain special real numbers, but "sampling" suggests a general representation for arbitrary reals. If I'm wrong, please educate me with a reference where I can learn the strategy.
I think that the core question is "Can a computer ... sample irrational numbers?" That sounds like a math or comp-sci question and so not specific to Mathematica. If such a method actually exists, then an acceptable question would be how to implement the method in Mathematica. So, I’m voting to close this question.
@user64494. Well, since you want to drag this out: "Any real irrational number is an infinite non-periodic decimal. No computer system can operate with these". Again, not quite. An irrational number, if represented as a decimal, would require an infinite number of digits. But computer systems do NOT need to operate with those. They can deal, just fine, with other representations, and Mathematica does this all the time. How do you explain that Mathematica can easily compute $\pi - \pi$? Or find that $\pi - e$ is irrational? All grounded claims that eschew "infinite decimals."
I’m not a PhD, do you understand me? You both.
@DavidG.Stork I'm sorry for being confrontational, but it seems like you're being deliberately obtuse. No one is arguing that there are literally zero irrational numbers that can be represented and manipulated in useful ways by computers, e.g. Pi. We're talking about the general case. If one did indeed select a random irrational, one would have no way to represent it, no way to compute with it, and indeed no way to prove anything about it.
00:40
@lericr: How do you sample integers using a computer in the general case? Please explain.
@DavidG.Stork I'm not aware of any way to sample integers in the general case from the (infinite) set of all integers. For a finite range it's a simple discrete uniform distribution. But what does that have to do with anything? Again, I'm interpreting "sample" in the sense of probability distributions. If by "sample" you simply mean "generate", then the question is trivial and I don't know why anyone would even ask it.
@DavidG.Stork If there was some way to randomly select an integer, the probability that the binary representation of that integer would fit into any computer is 0. And unlike Pi, which has a rigorous conceptual definition that we've just attached a name to, for our randomly selected integer we obviously have no a priori definition, so we could only manipulate it symbolically. Let's call our integer Eric. We can talk about 2 Eric and prove that 2 Eric is even, but we can't do anything interesting with Eric because there's no semantic distinct from the symbol.
@DavidG.Stork The reason we can compute with Pi and Sqrt[2] is not because we've been able to give them a symbolic representation, but because we've defined a rigorous semantic for those numbers. But we have no semantic for any randomly selected irrational. In the general case, the only semantic we could possibly have for a randomly selected number is some computational representation of that number, e.g. a decimal representation. But the decimal representation of an irrational number (or indeed any randomly selected integer) cannot fit into a computer.
@DavidG.Stork Indeed, the only way your algorithm works to generate irrationals is because Pi is irrational. But irrationality is not an inherent part of the definition of Pi--instead it's something we've proven about Pi. If the irrationality of Pi wasn't proven, your algorithm would be worthless. If the OP's question was "how can I generate an arbitrary number of irrational numbers?", then sure, an obvious answer is "start with a number known to be irrational and perform such-and-such calculation". The triviality of that makes me think the OP's question was something else.
@DavidG.Stork To be fair, after reading the original post several times, I can't say definitively that I understand it.
I voted to close this question, as it is based on a misconception. If you talk about uniform sampling from an interval, this only makes sense for floating point numbers. In this context, it makes no sense to talk about rational vs irrational: computers only represent floating point approximations.
Let $\scr B$ be a finite set of irrational numbers that are linearly independent over $\Bbb Q$. Then one may sample a finite subset of the $\Bbb Q$-span of $\scr B$. The process described does not sample (all) irrational numbers in any interval. However, the nonzero sampled numbers are irrational. In general, pseudorandom generators have a finite number of states. The probability that one will generate a number equal to a given randomly chosen number of an interval is zero. In the case of ``RandomReal[1]`, I'd bet it doesn't generate all the floating-point numbers in $[0,1]$.
@lericr: Of course I'm building upon the fact that $\pi$ is irrational (indeed, transcendental). If proving some number is irrational is somehow important to you, replace every $\pi$ in my answer with $\sqrt{2}$, which takes just two lines to prove is irrational.
@DavidG.Stork Look, I'm sorry for being confusing. But you keep missing the point in an incredibly obstinate fashion. You were making the point that we could manipulate irrational numbers without knowing their decimal form. You said Pi - Pi == 0. But I could just as easily say a - a == 0. In fact MMA does exactly that for undefined symbols--and of course that's completely meaningless. What you cannot say is "hey, I've been given a random irrational number and here are the non-trivial things I know about it."
00:40
When the great @Szabocs (whom I admire, whose software I use and teach) gets math/mathematica wrong, I really sit up. He writes "computers only represent floating point approximations." Absolutely positively false! Mathematica's representation of $\pi$, $e$, $\phi$, and any numerical operation on those numbers is NOT a floating point approximation! Absolutely not. I've shown a computational method for selecting (sampling) an irrational number between [0,1], and (based on a simple proof) can always generate an irrational number within any $\delta <0$ from others.
@DavidG.Stork I was explaining (badly) that Pi has semantics but a "random" irrational doesn't. As soon as you've pegged your sampling algorithm to a known irrational, it's no longer random. Now, as I've said repeatedly, I may just not understand what the OP meant by "sampling", but given MY definition of sampling, your algorithm cannot sample the irrationals. If your definition of "sample" is simply "generate", then (as I've previously said) you're algorithm is fine. It's also trivial, so either the OP went to lengths to obfuscate a trivial question, or the OP was asking for something else.
@lericr: Choose $n$ in my algorithm by any algorithm you would accept as "random." If you're saying "no computer can ever produce a random number..." well... yes. But that is not the issue, and certainly not the issue from the OP, who would grant that one can select a "random" number between [0,1]... if that is to mean anything. And "semantics" is irrelevant. You write: "What you cannot say is 'hey, I've been given a random irrational number and here are the non-trivial things I know about it.'" Go ahead, give me an irrational and I'll show you what Mathematica CAN say (nontrivially).
@DavidG.Stork Okay, clearly I'm going about this the wrong way. Your comment about Szabolcs is just completely off the mark. If you would just take a breath and consider for a moment, you'd realize that he is referring to a specific scope that is relevant to the problem we're discussing. Another counter-example would be MMA's representation of the integers also not being a floating point representation, but we weren't talking about representing integers. Szabolcs didn't bother adding a complete set of qualifiers when the scope under discussion is obvious.
@lericr: You miss the point entirely. The comment about integers has nothing to do with a decimal representation. Nothing. It has to do with the fact that there are infinitely many and no finite algorithm can sample that space uniformly. See your error?
@DavidG.Stork "Go ahead, give me an irrational and I'll show you what Mathematica CAN say (nontrivially)". Challenge accepted. I've just asked the universe to give me an irrational number. Since I cannot type out its decimal representation, I'll just call it bloop. So, what can you tell me about bloop? As I tried to say, MMA can handle computations with Pi not because Pi is a finite/symbolic representation of an irrational number, but because the particular number Pi has a semantic, and that semantic happens to be enough to allow certain computations.
@DavidG.Stork "It has to do with the fact that there are infinitely many and no finite algorithm can sample that space uniformly". Correct. My comment was in response to your question--it's tangential to the main point, and I don't know why you asked it. But I'm glad we agree.
00:40
@lericr: First you must show me that your specific bloop is an irrational number. Looking forward to that. By the way, I can give you infinite irrational numbers... easily... (oh... say $\sqrt{17} + 3.9 \pi - \phi$) and Mathematica can tell LOTS about it.
OMG. The only reason MMA can tell you lots about those irrationals is because it understands the semantics of the definitions for those very specific irrationals.
A randomly selected irrational from a reasonably representative distribution of irrationals, regardless of whether that distribution covers an infinite or only finite set, will not be a special irrational, won't have any semantics and therefore won't even be representable. And therefore MMA cannot "give it to you" in any meaningful sense.
Look, I've given us an "out" many times. If you are asserting that we can generate as many irrationals as we want, I agree. I've agreed several times. So, if that's what you mean by "sample", then there's nothing to argue about. But "sample" is so commonly associated with probability distributions, that I'm interpreting it that way.
Your algorithm doesn't sample in that sense. Your algorithm is just sampling from a discrete uniform distribution and then transforming the samples into a specific (one might say over specified) subset irrational numbers. I just find it incredibly hard to believe that that is what the OP wanted.
@user64494 Sorry for my poor English, but what does "I am too old for your remarks" mean here?
@xzczd I interpreted it as "I have sufficient experience that I find your remarks childishly ignorant".
00:55
@xzczd I'm too old for these pics. :)
Though I think the other "too old" means they're growing tired of the argument, which they think is not worth the effort.
"First you must show me that your specific bloop is an irrational number." YES!!! Finally!!! That is exactly the point. Even if we had an ideal irrational number sampler, one that's independent of all shortcomings of computers, once we were given a purported irrational, we couldn't say anything about it.
We couldn't verify that it was irrational, and we couldn't even represent it in a way that can be analyzed. We could only "know" this irrational number by some symbol. All of the "known" irrational numbers--the pi, root 2, e, phi, etc--are infinitely rare among all irrationals. In those known cases, the semantic came first. Without a semantic, you can't even get started.
@DavidG.Stork Please continue discussing here :) .
@MichaelE2 RE "growing tired of the argument"... the practical application of this discussion to the question has long expired. However, I do actually find the philosophical point that I'm trying to make to be fascinating. Forgetting the limitations of computing entirely, you still couldn't sample the irrationals in even a theoretical sense. You can't even represent an arbitrary irrational in any way that makes it tractable for analysis.
01:22
Thanks for all discussants! I think this problem is a binomial distribution problem with p= "0", probability of each trial was independent of total trials N.
01:52
@xzczd You're simply wrong when you write "Even if we had an ideal irrational number sampler, one that's independent of all shortcomings of computers, once we were given a purported irrational, we couldn't say anything about it." I COULD state if it is positive. Or between $1.7$ and $1.8$, and an infinite number of inequalities it satisfies, and whether $2^{\rm bloop}$ is irrational (it is), and whether $bloop^\pi$ is irrational, and.. and... and...
 
1 hour later…
03:15
@lericr RandomReal[] samples neither the reals in [0,1], nor the rationals in [0,1]. And the Random*[] functions have only a finite number of states, so none sample an infinite set. OTOH, the irrationals in [0,1] is a measurable set, so I think one can define a random variable over it, theoretically. And do math with it.
 
1 hour later…
04:44
@DavidG.Stork David, first let me say that I realize I'm ratholing on a philosophical question. I don't think it's particularly profound, and once seen it's kind of obvious, but I do find it to be just a fascinating consequence of... math. With that out of the way...
@DavidG.Stork "I COULD state if it is positive." No, you couldn't. In order to say it's positive, you'd need some way to compare an arbitrary irrational to zero. How would one do that? One would need to depend on either (1) some actual representation of the irrational number, e.g. a sequence of digits, or (2) a sufficient semantic that allows you to make deductions about the number in question.
Since we're sampling at random (which is what I'm talking about even though I know that's impossible with a computer and I also know is unlikely to be the OP's actual question) we don't have (2). There's simply no way we would be able to deduce any computational semantic for a randomly selected irrational.
But we also don't have (1), because any representation would be finite, and therefore not irrational. You can't say, "here is a randomly selected irrational that starts 137.89877....", because that doesn't actually specify a unique irrational. If the (theoretically impossible) irrational sampler could give us a way to uniquely identify an irrational, it would have to be on a semantic, but again, that is vanishingly rare.
If our irrational sampler told us, "the irrational I've randomly selected can be defined as the ratio of a circle's circumference to its diameter", then we'd know that the selection wasn't random. Likewise for "the ratio of a square's diagonal to its side"--can't possibly be a random selection.
@MichaelE2 Michael, I don't have enough confidence in my math knowledge nor in my knowledge of Mathematica's implementation details to be definitive, so take my comments with that in mind--I'm just using my best analysis and feel free to correct me with concrete explanations. With that said...
It would seem to me that RandomReal does indeed sample rationals. I don't see how it can do it perfectly "fairly", i.e. while we think of it as uniform it probably isn't uniform and it can't possibly cover all of the rationals, but what it samples must be rationals, mustn't it? But I certainly agree that it doesn't samples reals. I've been making the point this whole time that that's impossible.
As for "the irrationals in [0,1] is a measurable set, so I think one can define a random variable over it, theoretically. And do math with it", I can imagine that there's some truth to this. Your knowledge that you've sampled an irrational might allow you to do some math at the level of the distribution itself. I don't know what that would look like, but I suppose at that level of generality and abstraction, something might be possible.
However, what I'm arguing is that you can't actually know anything about any one specific sample from that distribution.
Like, sure, I assume we could compute things like expected value and whatever other aggregate type of statistics. I mean, in some sense this whole thing explains why we do integration (at least such as it was in my high school) and such over intervals. At any given value the integral would be zero, and the probability of choosing any pre-specified value from a continuous distribution would be zero. And yet the total probability is 1 and the total integral has a definite value. I get that.
I guess I'm assuming that RandomReal is approximately fair. I.e. anything you can say about a perfect rational number sampler you can also say about RandomReal with a tolerable level of accuracy, except of course for complete coverage of the full infinite set of rationals.
E.g. for our perfect rational sample we'd expect over many trials for about one quarter of our samples to fall in the range [0,1/4] (I assume that statement can be made rigorous). For RandomReal, there will probably be some error with regard to that expectation, but the error is small enough for us to ignore it in practice.
So, turning to irrationals, we'd want to be able to say the same things about any "practical" irrational sampler and a perfect one. Which takes us back to the OP's question and David's answer, David's algorithm certainly does not lead to a distribution that mimic's a perfect irrational sampler with any reasonable accuracy. David's implied sampler is incredibly biased by the "seed" irrational and the number of discrete values in the distribution.
So, while I'm tempted to just dismiss the OP's request as obviously impossible, I was trying to leave room for someone to demonstrate a "practical" or "adequate" way to mimic the theoretically perfect sampler.
And then I realized that even a mimic is impossible (I believe, still can't claim 100% certainty). The reason it's impossible is that one thing we'd expect is that it isn't biased toward irrationals that we already "understand". But we can't even represent irrationals that we don't understand, so, it's all a no go.
@xzczd If you're the one that moved the comments to this discussion room, I'd like to know how you did that. I've tried before to do that, but the only way I've been successful is if I respond to the automated prompt that says extended discussions should be moved to chat and that has a link to do so. I've been able to create chat rooms, but I can't figure out how to link them to the original question. And when I invite other users, it's not clear to me that they actually get an invitation.
05:38
@lericr If you can sample integers randomly from a finite range, you can sample irrationals as well... e.g., of the form $n \sqrt{2} - Floor[n \sqrt{2}]$ for n an integer. Even with a countable infinity of n, because this gives you just a countable number of irrationals it can't give all irrationals, a point I've stressed again and again above. And you're simply wrong again. I don't need ALL the digits to make true statements; the first digit alone let's me know if it is positive.
I would have moved my comments to a chat room earlier, but I was waiting for the prompt since that's the only method that works for me.
You wrote: "David's implied sampler is incredibly biased by the "seed" irrational and the number of discrete values in the distribution." Define 'bias' in this context.
@DavidG.Stork Look, I apologize for not being clear. It's just really difficult in this format. I absolutely agree that you can create a uniform discrete distribution over any type of thing you want. You have a finite set of irrational numbers, well then sure, you can make a discrete uniform distribution over them. But that's just not "faithful" to any actual "perfect" distribution of irrationals. The statistical expectations aren't satisfied to a reasonable degree of accuracy.
@DavidG.Stork Of course we won't have the infinite characteristic. We can't have that even with the rationals as you (or someone in this thread) has already pointed out. But what we can have with rationals is a distribution that has characteristics sufficiently faithful to a "perfect" one to be useful. That's what I thought RandomReal was, but Michael has suggested that's not the case. IDK.
@DavidG.Stork @DavidG.Stork "Define 'bias' in this context" Okay, take the solution you provided based on Floor[n Pi]. Once we've generated a table of such values we can turn into a uniform discrete distribution. Yay! Great! Totally agree that that's possible. But it isn't very even over the [0,1] range.
We see predictable gaps, for example. Now, maybe if we use a trillion values to define our distribution it might be a sufficiently accurate mimic. I honestly don't even know, but I'm suspicious even of that.
But I'd guess that we could make statistical predictions about, for example, statistically significant tendencies of the 10 digit. That's certainly something we shouldn't be able to do.
@DavidG.Stork "I don't need ALL the digits to make true statements; the first digit alone lets me know if it is positive." Of course if you had the first one you could automatically start making mathematical deductions. I'm saying that you can't even be given that much. In what form could our magical irrational sampler give you your irrational number so that you knew the first digit? There is no finite format that is uniquely identifying. But here, let me play my own devil's advocate...
Let' say that our irrational sampler gives us an infinitely long tape on which are printed the digits. Okay, then yes that proves you right and me wrong. But only for the most trivial mathematical statements you might want to make. Sure, we can now know that our number is between, say, 7 and 8. Can we know it's transcendental? No. No matter how many digits we inspect we can't know it's transcendental. Do we know if it's a multiple of Sqrt[2]? Nope.
Obviously we can know that's it's NOT a multiple of Sqrt[2] as soon as we find a "wrong" digit, but we expect any randomly selected real number to not be a multiple of Sqrt[2], so that's really not very helpful. The only way we can do anything meaningful is if we're given a semantic. I suppose "meaningful" needs to be defined, and I'm not entirely sure how to do that, so maybe you can define it. What meaningful mathematical things can we do with a semantic free, infinite list of digits?
06:18
@lericr "the only way I've been successful is if I respond to the automated prompt that says extended discussions should be moved to chat and that has a link to do so." Yeah, this seems to be the only way for a normal user. I've used the moderation tool to force the conversion.
 
2 hours later…
08:05
@DavidG.Stork Actually, @DavidG.Stork, even my devil's advocate argument is flawed. When you say that by knowing the first digit you can make the mathematical assertion that the number is positive, you're assuming that the representation you're given makes the first digit easily accessible. But that's kind of begging the question. If the question you wanted to answer was whether the googleplex'th digit was 7, then you'd need a representation that made the googleplex'th digit easily accessible.
In other words, when you assert that there are mathematical things you can say about the number, you are implicitly imposing a particular form for that number's representation that would enable you to say those mathematical things. The things you can say are dependent on what representation we've negotiated with our magical irrational number sampler.
 
6 hours later…
13:49
@lericr Re "It would seem to me that RandomReal does indeed sample rationals": If I agree to that, then it seems I must agree with @DavidG.Stork that one can sample irrationals. E.g. RandomReal[{1,2}] evaluates a rational floating-point number. Sqrt[2] SetPrecision[RandomReal[{1.,2.}/Sqrt[2]], Infinity] evaluates to an irrational number.
Both are approximately uniformly distributed at some scale much greater than $MachineEpsilon. However, the probability that RandomReal[{1.,2}] evaluates to 4/3 is exactly zero and the probability of 1/2 is positive (~ 2^-53). It is similar with Sqrt[3] and Sqrt[2] for the irrational sampling.
A technical problem with sampling the set of rational numbers is that as a subset of the reals, it has measure 0. Thus all integrals are zero, and one cannot meet the requirement of a probability distribution function that its integral over the whole sample space be 1.
14:22
Here is an interesting visualization of RandomReal[] as a discrete distribution:
Block[{n1 = 20, n2 = 10000},
 SetPrecision[
       RandomReal[1 + n1 {-1, 1} $MachineEpsilon, (2 n1 + 1)*n2],
       Infinity] // Tally //
     N // SortBy[First] //
   Map[{2 (#[[1]] - 1)/$MachineEpsilon, #[[2]]/n2} &] //
  ListPlot[#, Frame -> True, GridLines -> {{0}, Range@3/4},
    FrameLabel -> {"1 + k*2^-53"}] &
 ]
It still approximates a continuous uniform distribution but appears not to do so, because floating-point numbers are not uniformly distributed in the reals.
I might use this in num. anal. next semester: Why is the prob. of 1. equal to 3/4 the prob. of number greater than 1 (but less than 2)?
Correction: A few comments above, I meant the probably that RandomReal[{1.,2.}] returns 3/2 is positive.
14:43
@MichaelE2 Okay, I guess I just don't understand what you're saying. once again, we're stuck with the word "sample". I'm talking about randomly selecting from a distribution. But I guess I let it go without saying that I expect to actually have a representation of the sampled thing when the sampling is over.
When I do RandomReal, the thing I get back is, once enough layers of abstraction are removed, a floating point number. This was Szabolcs point, right? We only have a finite number of digits in such a representation.
Finite digits, ergo rational.
As for the math-theoretic stuff of whether rationals have measure zero and whether that prevents us from creating a proper distribution, honestly that's over my head. Maybe treat me like I'm 5 and start from just my simplistic assumption that for an arbitrary number we can only represent it if it's rational (in the general case, Pi et al are rare exceptions).
@MichaelE2 I also don't see the relevance of the claim that "SetPrecision[RandomReal[{1.,2.}/Sqrt[2]], Infinity]" evaluates to an irrational number. It evaluates to a a representation of a rational number that approximates a special irrational number.
Secondarily, SetPrecision doesn't change the "value" of the number. It can add zeros, in effect, but none of those zeros contribute information about the value of the number. Applying SetPrecision after the sampling doesn't change the space of numbers we're sampling from.
I don't know if we're just talking about different things or if there is a legitimate confusion here on my part.
What I'm talking about (and it's fine if no one cares) is a sort of "tyranny of representation". One thing that math has accomplished with various concepts of "number" is to invent convenient representations of those types of numbers. That is now so ingrained that we generally act as if the representation IS the number. The representations are so effective at letting us do computations, that it feels like we're seamlessly working with the actual numbers.
For integers and rationals, the intuitive equivalence between the number and its representation (the typical modern representation) is actually a pretty strong and rigorous equivalence. For irrationals, there are subtleties.
David is saying we can compute with Pi just fine, and a trivial example is knowing Pi - Pi is zero. But that fact doesn't rely on Pi but instead on the definition of subtraction used by MMA. And for other facts that David says that we can know, those rely on the semantics of Pi, Phi, and Sqrt[2].
When I say semantics, well, here's an example. Let's say that I personally refer to the number typically represented by Pi as XYZ. I now ask you all of David's questions about XYZ. You can answer the XYZ - XYZ one because of the definition of subtraction. But you can't answer the other ones, because nothing in the representation "XYZ" gives you any information about it.
The representation "Pi" also doesn't tell you anything, but Pi is treated specially by MMA. I.e. MMA holds within it computational "knowledge", specific facts and procedures related to Pi. That special purpose knowledge about Pi is what I mean by semantics.
Since we cannot interact with a perfectly accurate representation of an arbitrary irrational, we would need to have semantics about that irrational to do computations with it.
When David says that knowing the first digit is enough to determine sign, okay fine, but that assumes our mystical irrational sampling machine will use a representation that starts with the first digit. But humans invented that style of representation--it's not necessarily that the machine would use that. The infinite tape might not be full of digits but of some other infinite list of summands, in which case we might indeed not be able to determine sign.
David has chosen computations that are easy to do with our standard representation, but we can't jump to the conclusion that we'd be able to do any of the normal computations that we can do with Pi. The reason we know these things about Pi is not because we've computed with Pi's representation, but because we've computed with Pi's semantics.
Having semantics means we can do computations that are not limited by choice of representation. But an arbitrary irrational will not come with semantics. So, we're limited to the computations that are afforded by whatever representation we're given.
 
3 hours later…
17:55
@lericr You CAN answer innumerable other questions. Examples: 1) You can state that the number cannot be expressed as the ratio of two integers. 2) That Abs[XYZ] is non-negative. 3) Certain classes of algebraic equations that XYZ can and cannot be a solution of. 4) That XYZ does not have an imaginary component. Etc., Etc., Etc., Etc.
@lericr You omitted a Sqrt[2] in "SetPrecision[RandomReal[{1.,2.}/Sqrt[2]], Infinity]". SetPrecision[x, Infinity] for a machine number returns the exact floating-point fraction p/2^k for some integer k. Sqrt[2] SetPrecision[x, Infinity] will be an irrational number like 3 Sqrt[2]/8, unless x is zero. I've been assuming we agree that Sqrt[2] is irrational and 3/8 is rational.
 
2 hours later…
20:00
@DavidG.Stork David, I appreciate you being wiling to engage in this discussion, but I have just simply been unable to explain what I mean. Your last comments are just so outside of what I'm even talking about that it's become obvious that I've completely failed to communicate. I think I have exhausted everything I can think of. I apologize for dragging this out so long.
@MichaelE2 Michael, I'll try again. You said "we agree that Sqrt[2] is irrational". That actually needs some interpretation. "Sqrt[2]" is a MMA expression. So, let's just be very clear. I'm not at all trying to be facetious. "Sqrt[2]" is not an irrational number. It is a MMA expression that designates an irrational number.
And the fact that MMA can do computations with that representation which align with our mathematical expectations for how to compute with that irrational number is because MMA has knowledge (it understands the semantics) of those mathematical concepts--it's been programmed to "do the correct thing".
So, saying "Sqrt[2] is an irrational number" is shorthand for what I just unpacked. Now, of course we agree that the number that we call "the square root of two" is irrational. I.e we agree that there is a mathematically defined concept behind the name "square root of two" and the consequences of that concept are that the number being named is irrational.
I can create a parallel analysis of "3/8 is rational". But in the case of the rational number we call "3/8", we only need a finite representation to capture the entire semantic of the number. It is actually possible to derive everything you want to know about 3/8 from any of its possible finite representations. The concept of 3/8 is effectively equivalent to its representation.
In fact, once we've invented the representation scheme for rationals, we can actually generate rationals, every rational, any arbitrary rational, and even (up to computational limitations) a random rational. More correctly, we can generate representations of rationals...etc.... But the representation is sufficient for anything else we want to do (or at least that's the argument I'm trying to explore).
Once we move to irrationals, the representations are always inadequate. We don't know things about Pi because we were given a representation that we could analyze. We came up with a concept, and derived an approximate representation. We know any representation is approximate because we've proven that Pi is irrational.
Of course, we can trivially sweep everything under the rug and say the symbol "Pi" is a representation. But that's just a nominal representation, not a computational or descriptive representation. The symbol "Pi" is arbitrary, not schematic.
So, we cannot generate all irrationals just by "playing with representations" like we can with rationals. We certainly can generate some of them, but the way we generate them via representations is laden with semantics. We can generate the number we call "the golden ratio" with an elegant continued fraction representation. But that specific continued fraction embodies a wealth of semantics.
There are irrational numbers out there whose representation we'll never generate no matter how much we play with representation schemes.
20:55
And it's that last piece that I thought was relevant to the OP's question. We can invent schemes to generate irrationals, but those schemes are all derived from some semantic, and so the resulting irrationals will, in some sense, not be representative. The vast majority of irrationals are unobtainable by any sampler. I think people got caught up in the representation problem and thought that I was just saying that since we don't have all the digits we don't know anything about the number.
What I'm actually saying is related, but different. I'm saying that we are trapped by our representations--our representations dictate or at least constrain what we can compute. This constraint is immaterial for rationals, but for irrationals it means that we cannot invent a sampler that is "faithful" to the nature of the irrationals.
The problem isn't so much that once we've been handed an irrational we cannot fully represent it. The problem is that because we can only do computations with representations and not with "the things themselves", then we cannot even generate an irrational for which we have no generating semantic to work with.
Take every irrational constant known to mathematics (e.g. pi, e, phi), and take every irrational based upon a algebraic procedure (e.g. square root), and take every irrational generated by some procedure (e.g. concatenate the sequence of digits of positive integers to create a new sequence of digits that represents an irrational), and in fact take every possible irrational that we can "reach" via our mathematical methods, and now exclude them all as a semantic basis for generating irrationals.
There are still irrationals out there and they outnumber those we've excluded. So, we can never sample them for any non-trivial definition of "sample".
Every sampler we invent will only "reach" a minuscule set of irrationals.

  last day (16 days later) »