For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | more jostylr's commentsregister

That article is a truly marvelous article and very worth reading for anyone interested in either continued fractions or rational approximations.

For those who are curious, a simple algorithm for generating these good approximations and continued fractions is to take the mediant of a Farey pair that enclose the given number, such as [3/1, 4/1], here 7/2, and then choose the sub-interval that contains the desired number. Repeat as desired. This first step has [3/1, 7/2] as the next interval to look at as 3/1 < 3.213432 < 7/2. When doing this to generate the continued fraction representation, start with the nominal interval [0/1, 1/0]. A few steps: 0/1 : 1/1 : 1/0 R 1/1 : 2/1 : 1/0 R 2/1 : 3/1 : 1/0 R 3/1 : 4/1 : 1/0 L 3/1 : 7/2 : 4/1 L 3/1 : 10/3 : 7/2 L 3/1 : 13/4 : 10/3 L 3/1 : 16/5 : 13/4 R 16/5 : 29/9 : 13/4 L 16/5 : 45/14 :29/9 L 16/5 : 61/19 : 45/14 R 61/19 : 106/33 : 45/14 R ... The number 106/33 is 3.2121... and is generated by easy computation of the mediants.

Each time the direction of selection is changed, this results in having an ultra-best approximation. If we count the number of steps in between the switches, we get the continued fraction representation: [3; 4, 1, 2, ...].

This is also related to the Stern-Brocot tree, for those interested.

Playing around with these ideas led me to the idea of defining a real number as a number that, given a rational interval, says Yes or No depending on whether it ought to be in that interval. To define the space of such objects, I used properties that the Yes/No answers have to satisfy. The key property is that if you split a Yes interval into two pieces, one of the pieces should be Yes and the other No (unless the splitting point is the real number).

If curious for details, my paper repository on this matter is at https://github.com/jostylr/Reals-as-Oracles where I not only prove that it all works out as it should, but also give an example of doing continued fraction arithmetic in section 7.9 of the main paper for those who just love continued fractions.


I think having a language that helps understand those limitations is a useful achievement. Much of mathematics does have that. A notable exception is the definition of real numbers. They are usually presented as a string of infinite decimals, or a converging sequence, or a set of numbers less than something. All of those notions obscure the basic limitation of knowing the real number and give a veneer of similarity to rational number. Rational numbers are numbers that we can have in our hand while irrational numbers are ones which we can never have. It is important to have a setup that respects that difference.

This is what motivated me to come up with a new definition of real numbers, namely, they are objects (I call them oracles) that answer Yes or No when asked if the number ought to be between two given rational numbers. Abstracting out what properties such an object should have, one can come up with a space of these oracles, define an arithmetic, and prove that they satisfy the axioms of real numbers.

For details: https://github.com/jostylr/Reals-as-Oracles/

In many ways, this is giving a definitional support to the use of interval analysis which is, of course, a very practical concern. It also brings our some cool stuff about mediants and continued fractions (nothing new about that, but nicely motivated).

It also fits in with the adjacent post about busy beaver numbers and its conclusion about knowing a number is in an interval.


It's not clear to me what this approach offers over Dedekind cuts, you are specifying a real number by saying in which rational intervals it lies, a Dedekind cut specifies a real number by saying which rationals are below it and which are above, and translating back and forth between the two is immediate


In part, it is about framing it. The oracle approach is not the set of all rational intervals containing a real number, but rather it a rule that acts on a given rational number. You cannot literally hand over a set of all rational intervals that contain the square root of 2. But you can specify the rule that tells you whether the rational interval contains it, namely, if a<b is the rational interval to test, then the rule sees if a^2<2<b^2.

Dedekind cuts can similarly by recast as a function that gives -1,0, or 1 if a number is below, the same, or above the real number. This would be a great improvement over the usual presentation.

But beyond that difference, consider the solution to f(x) = 0 in terms of the intermediate value theorem for an increasing function. The Dedekind cut solution is A = {x | f(x) < 0}. That is the answer. From the perspective of Dedekind cuts, there is nothing further to compute and it has provided nothing to compute with.

The oracle answer would be the rule that says yes to a<b if f(a)*f(b) <=0. This gives a direct mechanism for testing intervals and the idea of narrowing intervals by picking a point inside a Yes interval is very natural from this perspective. I do not see that suggestion popping out of the Dedekind cut approach.

The rational interval approach specifically is targeting narrowing solutions to the answer with error bounds built into it. If I tell you that 3 is in the set A, you have no intrinsic sense of how good of an approximation that is. But if I tell you that the target is in the interval 3 to 3.1, then you have a sense of the precision. Oracles promote having accuracy as foundational.


> Rational numbers are numbers that we can have in our hand while irrational numbers are ones which we can never have. It is important to have a setup that respects that difference.

Do you mean physically? Basic shapes like circles, squares and triangles allow us to hold irrational numbers in our hands as distances. Children playing with blocks can sense that root 2 does not conform nicely with other (rational) distances.


I did not mean physically. I meant, having it explicitly written out in a way that rational numbers can be. If I write 3/4 + 1/2, I can compute out 5/4 and that is infinitely accurate.

If I want to compute pi + e, an infinitely accurate version is pi + e. That's about it. So what we are actually looking for in this computation is an estimation algorithm, one which can be made as accurate as we wish, but finitely so. The natural way to express this is with rational intervals as rationals are precise and intervals give a containment of the numbers.

For arithmetic, we can have a mechanism for figuring out how precise the input approximations need to be in order to get a given precision for the final computation. The perspective presented here naturally leads to that as a matter of defining and establishing the arithmetic of oracles.

As for playing around with physical representations of irrational numbers, keep in mind that there is no way to prove that, say, something that looks like a unit square to us is really a perfect square down to infinite precision. And without that, we can easily have that the unit square is only very close to such a figure, but is actually a rational rectangle with a rational diagonal that very closely approximates the square root of 2.


This is irrelevant to your point, just change the numbers used as example, but we do not know whether pi+e is irrational! (Even though nobody believes it to be rational)


> It is important to have a setup that respects that difference.

No, it is not. Or rather, which differences matter depends on your application. A circle of radius 1 is a very natural thing to me. I don't think 3/4 is more natural.


> they are objects (I call them oracles) that answer Yes or No when asked if the number ought to be between two given rational numbers.

So a real number is a function from pairs of rationals to a two-element set (plus some sanity conditions)? Why is that better than the other constructions?


Yes. The basic reason is lazy evaluation and answering the primary question most people care about when using an actual real number in a computation.

The lazy evaluation is that defining the real number is about having a way of answering the question when presented with the rational interval, but one does not actually need to have the answers until asked.

From this perspective, a program that computes Yes or No when given a rational interval via the rule "a<b Yes iff a^2< 2 < b^2" can be said to be the square root of 2. For the usual presentations of the other definitions, they cannot be embodied in a computer. One cannot literally have all the infinite elements of a Cauchy sequence, or the infinite sequence of digits in a decimal representation, or the uncountably many elements of a Dedekind cut, represented in a computer memory. One can have a function in memory.

The other definitions can also be presented, in various ways, as functions as well, but I think, fundamentally, what we want in practice from a real number is an interval of small enough size to be of use in whatever we are doing with the real number. That is what the oracles facilitate.


One can have a function in memory when the real number is nice in some sense, your example is algebraic.

But what if I want to represent an uncomputable number?

Or regardless of that, under any reasonable encoding of programs that can be held in memory by a computer, there are only countably many programs.


We also cannot represent all natural numbers or rational numbers in a computer. But the ones we care about, we generally can. I guess one question is whether there are uncomputable numbers that we need to compute for some purpose other than just computing it as a challenge? And if there are such things, how is it usually done? The theoretical definition of an oracle is not problematized by being uncomputable by Turing machines, but it is in uncomfortable tension with the driving purpose of the definition. I think that is a bonus. I think we should pause to consider the relevance of numbers that are uncomputable.

There are a number of real numbers that one can define which can depend on whether we can prove something or not. It may turn out that we can never prove it and the number is never resolved.

My attitude, which may not be satisfactory, is that we do what we can and we should have a language/framework for facilitating that. I think the oracle approach highlights what we know and marks what we can't compute clearly. I call it the resolution of the oracle. I don't want known precision to be lacking just because of a poor definition of what a real number is.

As for the example being algebraic, it is a particularly nice example and it is the same example in every example of a Dedekind cut. Another example of such a rule, one which is not algebraic, would be whether pi is in an interval or not. Given a<b, one rule could be that it is No if b < 3 or a > 4 or sin(a)sin(b) > 0. Alternatively, it would say Yes if a >= 3 and b<= 4 and sin(a)sin(b) <= 0. To compute this, one needs to compute sine of a and b sufficiently precisely to determine their sign.

The flavor I am trying to convey is having a definition convey a useful goal. The interval approach says that we are trying to generate precision about our inaccuracy. I think this is something which would greatly benefit those learning about real numbers. Most of the time, the error is presented as secondary and an annoyance, the concerns of the error propagation in further computations is pushed to the side, and it is all relegated to experts or computers. The expansionary nature of arithmetic in error propagation is pushed to a usually unsatisfactory discussion about significant digits.

My goal here is to change the mental framework so that these concerns come to the forefront. Ideally, they also come with useful tools to handle the uncertainties such as ways to compute how narrow the input intervals need to be when doing a computation. And maybe, just maybe, students could become more comfortable with fractions.


In particular, scan past the data in that example and you will see things like @keydown.down="if(selectOpen){ selectableItemActiveNext(); } else { selectOpen=true; } event.preventDefault();"

which tells you what is happening right there. So if you eliminate the data outside the component, as one should, I think it becomes a very nice readable interface.


As someone who adores alpinejs and is just getting into LiveView, can you explain was this removal a preference to minimize or for an alternate syntax or is there an important reason, such as if there exist conflicts between LiveView and AlpineJS clobbering each other?


To my knowledge, it does not. There are various items to address with only item 4 being currently with no clear direction:

1) Bohmian mechanics seems to require some kind of simultaneity. Various proposals have been put forth for making natural foliations, possibly using the wave function to do so, that allow one to evaluate the positions of all the particles at a given time so as to know which configuration point to use in obtaining the velocity of the particle. This is possible, but it does not feel philosophically satisfactory yet. GRWf does not require a foliation to be relativistic which is a nice feature.

2) Quantum field theory naturally models particle creation and annihilation. Most QFTs are presented in a mathematically incoherent way. While conclusions can be made via renormalization, etc., driving an actual dynamics is tricky from that stuff. By not doing perturbations but rather defining the operators by taking into account the shifting of the probability from one sector of n particles to another of n+1 particles, QFTs can actually be made to make mathematical sense. This has been accomplished in some of the simpler models. It is not a problem whatsoever to define a Bohmian evolution where particles appear and disappear in a probabilistic fashion. The difficulty is purely in having a properly defined wave function evolution and that is on its way to being solved.

3) One needs to define wave functions, their evolution, and the particle evolutions in a curved space-time. This is not a problem whatsoever. It is very easy to translate and interpret what we need into differential geometric language. QM has issues with the usual observables/operators translating (such as a momentum operator), but since these are derived concepts in Bohmian mechanics, no fundamental difficulty arises.

4) In general relativity, the mass distribution is part of the evolution of the space-time metric. The mass is based on where the particles are. To date, the wave function tells the particles what to do, but the particles do not have any impact on the wave function. The wave function is impacted by the space-time metric. Also, there are some suggestions that mass might be entirely a part of the wave function and not associated with the particle, i.e., the particles are really just undecorated points moving about.

Basically, gravity and the wave function need to work it out and the particles will then be guided by both as the space-time metric is what takes the gradient of the wave function or, for Dirac style motion, something analogous to a square root of the metric is floating around. Bohmian mechanics does have the advantage that it just has to be concerned with the evolution of the particle lines and not having to figure out how to define various observables.

In other words, a known space-time metric interfaces just fine with Bohmian mechanics, but figuring out how to evolve the space-time metric is still an open question.

At the current time, I am not aware of any novel ideas coming from a Bohmian or GRWf point of view towards resolving the problem of gravity.

If interested in a good discussion of all these things and much, much more, I highly recommend the recent book Foundations of Quantum Mechanics by Roderich Tumulka which covers what the title says, but also discuss Bohmian mechanics and other interpretations.


Thanks so much for your enlightening comment!

> The difficulty is purely in having a properly defined wave function evolution and that is on its way to being solved.

Interesting, could you provide some references?


Here are a some papers:

Avoiding Ultraviolet Divergence by Means of Interior-Boundary Conditions https://arxiv.org/abs/1506.00497 This is perhaps the first of the papers and so may be a good place to start.

Bohmian Trajectories for Hamiltonians with Interior-Boundary Condition https://arxiv.org/abs/1809.10235 This is the Bohmian part of the story.

Multi-Time Wave Functions https://arxiv.org/abs/1702.05282 This explains the trickiness of having interactions with multi-time wave functions (space-time suggests having multi-time wave functions and no single time).

Creation Rate of Dirac Particles at a Point Source https://arxiv.org/abs/2211.16606 This seems to suggest that there is a kind of spiral approach from/to the point of creation/annihilation.

---

The authors have done a variety of papers on this. A key phrase they use is Interior-Boundary Conditions.

They also released a book based on a course covering some of these ideas: Multi-time Wave Functions, An Introduction https://link.springer.com/book/10.1007/978-3-030-60691-6


Thanks so much!


The who cares is presumably that it can improve people's lives if they knew about it.

I have to say that his description of his wife fits my iPhone use as well. As for the App Library, it is not discoverable if you have many pages of the Home Screen which can be true for those of who have an iPhone for a decade or so. The real trick is apparently to learn how to hide those home pages, then it becomes discoverable.

I do think there is a terminology issue with the Home Screen being used for multiple pages. That is just confusing.

As for the long-press, I accidentally do that all the time.


Yeah I have eight pages of apps and widgets and forgot how to go to the app library until their comment got me to google it. Weirdly it’s worse to use the more you presumably need to because you have so many apps.


This course was just recently updated the past couple of months to go with the new major upgrade to phoenix: https://pragmaticstudio.com/courses/phoenix-liveview

Haven't actually gone through it yet, but hoping to over the next month.


I totally recommend their course. It does a fantastic job explaining the specifics of LiveView in a clear way.


This is not free market, but a captured regulated market. Companies bet that the government will cover over their mistakes. In an actual free market where the company and the people making the decisions would be held accountable for the damages done to 3rd parties, this would not happen. The need to insure would motivate people to find cost effective ways to make it safe. Consequential failure is a big motivator.

I work for a place that is regulated by the city and insurance. I find the city to be unhelpful, unresponsive, and largely useless in helping us. They just want the fees paid. The insurance companies, however, will send out inspectors that work with us to right anything that might be unsafe, explain their concerns, and generally are looking to have a good profitable relationship with us.

There was one company that did not do good inspections. We stopped working with them and now work with a different company. I have no such option for working with the government as we are quite locally based.

Also, the city owned sewage treatment facilities are major polluters. Government control often leads to pollution (see various authoritarian governments, our military, various municipalities,...)

As for the sense of mutual obligation, it has withered, but my bet is that it is the theoretical outsourcing of it to government which has undermined it. Without that failing crutch, we would have to work together and look out for each other, bringing to the table immense social pressure for those outside social norms. That has its own downside, but it is much more flexible and resistant to corruption than the monopolistic government power structure.

One danger is, of course, rich outsiders who can take over large tracts of land with money. But in our current system, they buy up politicians who use eminent domain to take the choice away from the owners and the people at large. In a private ownership system, they would have to convince everyone to sell which is way harder to do.


This is an incredibly utopian view of the free market that has never existed in any implementation of the laissez faire free market philosophy. Competition yields winners, and those winners buy out the losers, leading to monopolization and wealth consolidation.

You've identified the problem, the railroads are a captured market, but it's because most regulatory bodies are operated by former agents of those industries or those taking large amounts of money from those industries. These industries DO get bailed out, because they have captured the regulatory mechanism. Their wealth consolidation allows them that power, especially in the post Citizens United world we live in.

The things you view as failings of the government are corporate successes in the never ending squeeze of year after year growth.

The power structures inside these corporations are squarely authoritarian in their design. You have no real agency within your workplace. The most freedom I've ever experienced in my work history has been working for government agencies, specifically public education, doing IT work. This idea that, in the absence of government intervention, we (citizens) would have the agency to do the right thing in these moments completely ignores the massive amount of leverage the corporation has over its workers. Since these corporations are top down, hierarchical, and authoritarian in their organization, the only will the workers have is that of those at the top. In this case, the executives and shareholders who historically have shown to not be interested in taking a loss for the sake of safety.

You mention that, under the utopian vision of the free market, we would go to another vendor. So who would we decide to transport with? The rail systems are regionalized and to get from one part of the country to the other you have to make trilateral or quadrilateral deals with these companies. In other words you are forced to use all of them on some leg of the journey. This regionalization means that there is an oligopoly on the rail system. How are you going to create a "competing" rail system in any of these regions when these companies own all the rails?


> In this case, the executives and shareholders who historically have shown to not be interested in taking a loss for the sake of safety.

If an executive is making a choice between profit and safety, then the regulatory regime has failed.

The only way capitalism can work is if risk and reward go together. If a company can profit from taking a risk, but does not suffer the true cost of a failure, then they will be incentivized to take irresponsible risks. The best example of this is 2008, where financiers gambled themselves into oblivion, but got bailed out when it went bad.


The maximum fine a rail company can face is $225k, even when loss of life occurs. Unfortunately, the regulatory regime you describe has been captured for roughly the past 80 years.

The reality is that the legal system makes it so difficult and expensive for claimants to recoup the harms they suffer. Causality is hard to prove and the claimants are up against corporations which have teams of lawyers and a court system which has made tort cases have a high burden of proof. This can make it difficult for claimants to win, even if they have a strong case. Plus, tort law is a complex area of law, and it can be difficult for claimants to understand their rights and to navigate the legal system.


It is even worse. It has been captured from for the past 120 years or so. The railroad companies tried to manage their own collusion, but repeatedly failed. So they helped farmers to get Congress to regulate the railroads with the ICC. Very shortly, the railroads had their people doing the regulation which very effectively managed the rates to eliminate discounts and other means of competition. With the end of such competition and stabilization provided by the government, it is easy for a big entity to take over and thrive.

They even got it to take control of the trucking industry for decades, mandating such things as being able to only have the truck full in one direction.

A government run legal system is just as ineffective as any of the other government run systems. The hope is nimble, private arbitration. Trust needs to be built up and reputations paid attention to.


> The best example of this is 2008, where financiers gambled themselves into oblivion, but got bailed out when it went bad.

This is an interesting example, but I think you need to go further in saying that the post 2008 financial system was even more irresponsible than it was before


The utopian vision is that the entity with a monopoly on violence would ever produce impartial, socially good outcomes. Who are these regulators that would do a good job and who are these politicians that would be okay with them doing that? The politician's incentive is to get repeatedly elected which means money from donors and promising voters blah-blah-blah though those voters rarely hold them to account for their promised visions failing to materialize.

The vision of a society dedicated to free association of people should be a guiding star. The history of companies, even with a largely captured government, is that they tend to continually change, often growing smaller. Many of the big names in business nowadays did not even exist 50 years ago. Many of the big names of previous eras have long gone away. Competition yields temporary winners, but in a dynamically changing world open to all to be a competitor, they do not stay winners forever. Rockefeller kept trying to buy out all the refineries, but people can't making more. Eventually, he gave up. Cornering a market is very hard if government is not putting up barriers to entry.

As for authoritarian companies, more freedom for the working class to form their own businesses is the response. Our current government makes that very hard with a few exceptions, such as the seemingly entirely unregulated lawn businesses which is filled with small independents. Get rid of the government overhead, allow people to just do stuff for others as the others wish and get paid as mutually agreed, and then there would be competitive pressure on companies to change their approaches.

And, if not, make their replacements. Make democratically run companies. They exist and if that is what workers want, then they might thrive.

As for rail systems, there are certainly other means of transportation. That can serve as a temporary work around for a bad rail operator. Meanwhile, if there is sufficient need, one could construct new rail routes to go around the old ones if need be. It would start small, doing the most profitable portions and then work out from there as needed. Just the threat of that would probably lead to sensible negotiations.

Of course, to address the government supported oligopoly, one could also use eminent domain to take the rail tracks and then give them to the local communities in some kind of newly formed, broadly and locally owned companies. One would need to come up with ways of dispersing government property fairly anyway and one could also, at that time, redistribute any critical privately held infrastructure which had been supported unfairly by the government.


What comes first, the regulation or the regulatory capture?


> This is not free market, but a captured regulated market

Agreed that market capture is a problem, but regulation is absolutely necessary for a free market to function well; these two things are not antonyms.

Regulation is needed to set up the rules of the game: everyone conforms to these rules, and if anyone breaks the rules, here are the consequences. Above this, companies can and should determine their own higher standards (e.g. you looking for honest insurance inspectors).

When something goes wrong, one of a few things is possible. Maybe the regulation was too lax, and risky even when followed. Maybe a company wasn't following the existing rules. Maybe the rules allow for small amounts of risk, and this is one of those accepted incidents.

In this case, it seems clear that the impact was not small, and can't/shouldn't have been an acceptable outcome. As such, one of two things should happen:

* Rules should change to mitigate the chances of other similar events. * The rules were sufficient but ignored, in which case some severe penalties need to be applied.

You're right that government can't do everything perfectly, and private businesses are definitely the main drivers of a good free market. The government absolutely must provide clear rules to those businesses on what the society will accept, and severely punish non-compliance with those rules.


Something I've noticed over time about libertarian ideology is that it lacks a comprehensive theory of power - it asserts that governments have power, and that power is coercive, and coercion is wrong, but has a massive blind spot to the fact that Cigna also has power and uses that power to coerce, and would do so whether or not there was a government. It's shockingly utopian in that way.


Does Cigna have gun-welding police force?


It turns out there's different types of coercion that don't involve guns and yet still have the effect of forcing someone to act in ways they otherwise would prefer not to. This is what I'm talking about when I say the philosophy lacks a comprehensive theory of power.


Most, if not all, of the coercion of a single company in this economy is coming from the government.

For the trains, remember that there was going to be a worker's strike. If that was a real threat, the rail companies, left on their own, would probably have compromised. But they knew the government would stop it which is what the government did. They used the guns of government. Without that backing, the workers had power.

As for Cigna, that is all balled up in the health system which is quite the mess in this country. Certainly, we have horrible private actors doing absurd things. But it is not because it is a free market. The health industry is heavily regulated and heavily funded by the government. I think 60% of health care is covered by the government funds. We have protectionist policies for drug companies. We have restrictive licensing on medical personnel whose main purpose is to restrict supply to keep competition down. There are even places where the addition of a single ambulance has to be approved by everyone else who owns ambulances in the area.

I think it would be fantastic if people could get a couple of weeks training to go around and be little helpers for in home care of a low-level nature. Instead, it takes years of going through expensive coursework, usually of limited value, designed to keep the poor from helping one another. That is government imposing that, admittedly at the behest of the well-heeled.

As for other kinds of power, there are all sorts of powers people have over each other. I act differently and constrained in various groups of people I am around. Larger or more meaningful groups have more power. But the main lever of power that I have is the ability to walk away. Consumers do not have go with that company. Workers do not have to work with that company. Investors do not need to invest in that company. But we do have to obey the laws and pay taxes to the government.

The power of free association is very powerful.


They don't have to have them when they can donate to politicians, lobby and buy advertisements as they see fit.

The problem with corporations in American politics and law stems from corporate personhood.

We may need to revisit the concept of limited liability. When planes fall out of the sky due to cost savings in product development or automated cars crash into trucks due to beta software marketed to the public as "fully self-driving," or unwise securitized lending threatens the financial sector, responsible executives should be held personally liable, not given golden parachutes or a slap on the wrist.


> In an actual free market where the company and the people making the decisions would be held accountable

Same as in communism. So probably not.


Here is another take on it, coming to a different conclusion by someone (Dave Cullen) who despises most of modern trek but seems to enjoy the third season of Picard: https://youtu.be/uNANI4-41VU


I was frankly amazed that Dave Cullen of all people was sent a review copy of Picard S3. Either Paramount/Amazon don't know who he is, or there's a legitimate attempt to extend an olive branch to "the fans" going on. Hopefully the latter, but if so there is almost certainly going to be a backlash from the teens and twentysomethings these franchises have been targeting (largely unsuccessfully) over the last few years.


One could also not have subtraction but simply negation, so instead of a-b being subtraction, one could have a+-b. It probably already works in most languages. Doubt it would be embraced.


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You