254 points · by blewboarwastake · 5y ago · 39 comments
Why do we use X framework? Well, because Mr. Deep Pockets over there is using it!
I wish we could have a more mathematical world, but it doesn't scale beyond a handful of architects and really talented engineers.
The amount of hassle and push back I get for getting 100% code coverage tells me that it's rare for people to leverage more concrete and deeper ideas to even validate their thinking. The market rewards "just ship it" way more because ultimately customers just learn to manage the shit that ships.
With regards to halting, there are some programs that can be written simply in any common programming language to halt iff a solution to a specified number exists, simply by enumerating all possible values and halting if one satisfies the neccessary conditions. Thus to determine the halting of such a program would solve a problem. Typically these can be done in less than ten lines of Python, for instance. Some examples include: does there exist an odd perfect number; do there exist four positive integers a,b,c,n with n>2 such that a^n+b^n=c^n? The former is an open question; and the latter is Fermat's Last Theorem, which took an immense amount of machinery to prove, six decades after Turing's paper, and which is related to many open problems. (I've also heard that the halting problem could be used to solve the Riemann Hypothesis, but I don't know whether or not that's true.) If you can find a way to figure out whether or not such simple programs halt or not, I'd love to hear about it! What I've gleaned from your papers doesn't actually seem to apply to such programs though, which is a shame since these programs aren't very complicated.
Now, with regards to Cantor, I recall reading a paper on your website (which I can't seem to find today, so apologies if I misrepresent it). I agree that set theory is not a good way to evaluate the number of numbers, since it throws out all properties about such numbers (e.g. ordering); this is why we have natural density, real density, and other properties. But there was another part where you indicated (something to the effect of) that the reals were countable since there are countably many Turing Machines; however I believe the correct conclusion to draw is that there are uncomputable numbers. Again, I can't seem to find it today, so I apologize if this is unsubstantiated.
Alas, it has been proven. RAM computers are equivalent to Turing machines. If X and Y are Turing-complete languages then all X-programs can be converted to Turing machines, your proposed Y-program can also be converted into a Turing machine. Put another way, unless your language X is too weak to be useful, there should exist a deterministic program to convert any program written in Y into a program written in X with identical behavior (with regard to halting).
This should be evident by the fact that the computers we use day-in and day-out execute one binary machine language. Any X-program and Y-program reduce to the same assembly language.
The twisted self-reference must therefore be language-agnostic. You can absolutely solve halting for various simplified "languages", but not Turing-complete languages.
Regarding Cantor, indeed, there are many ways to compare the "sizes" of two sets. Cardinality is one such way. It can have applications, for instance Cantor's original paper used it to prove that there are infinitely many transcendental numbers. It is also used in real analysis, in Lebesgue integration, and in measure theory. But it is not the only way to do so. There is a very real sense in which {1,2,3} is a smaller set than {4,5}; that does depend on knowledge of the contents of the set though, not merely the number of elements contained. In a more abstract context where measure or natural density aren't applicable, cardinality can be left as the only well-defined definition of "size", but in most contexts I agree, it's just one of many possible definitions and they should each be used with care.
Arguing about the sizes of different infinite sets is tricky, though. The set of even integers has the same cardinality as the set of all integers, even though it has density 0.5. The cardinality of the set of rationals is somehow "infinitely less" than the set of irrationals, even though both sets are dense on one another. But there are some things we can learn from not having
Me, however, I like cardinality for the aesthetic properties. I like the Axiom of Choice and all the nonsense that follows from it. Cardinal infinities behave quite differently from the well-defined infinities of ordinals, hyperreal numbers, and surreal numbers.
In your article "The Size of a Set", you discuss Formalism. Are you aware of the axiom "V=L"? It's quite neat, because by effectively outlawing any non-constructible sets, the Generalized Continuum Hypothesis follows! If you accept cardinality as a purely aesthetic definition in conjunction with Formalist ideology, you get a very beautiful result. Practical, maybe not, but beautiful.
That is all to say that I agree with a lot of what's in your paper on "the Size of a Set". However, the "Program Analogy" section of the paper contains what I think is a flawed argument:
> [A] Cantor-type conclusion concerning the sizes of sets of programs is absurd. The proper conclusion is simply that there is no program (in some programming language) to generate all and only the infinite-sequence programs (in that same programming language). It is not a conclusion about the sizes of sets. Likewise in the original Cantor argument, the proper conclusion is not about the sizes of sets; it is simply that there is no sequence of all infinite sequences.
I think the correct conclusion here is that to determine which programs are "infinite-sequence" is undecidable. You've reached a contradiction, therefore the last assumption must be flawed; in this case the assumption was that you could write a program D "whose execution neither halts nor goes into a non-printing infinite loop." This assumption is about programs and programming languages, and says nothing about sets, so the analogy is flawed. In Cantor's argument, the assumption is that the set [0,1) can be ordered. You're correct in saying that this is merely a statement about the existence of a bijection between the naturals and the reals, but that is the definition of cardinality. Your issue here is that you don't like saying that cardinality means "size", and that's fair. But I think this analogy is a stretch at best, and irrelevant to your overall argument.
https://www.youtube.com/watch?v=89fKiaMxHrA&list=PLfsVAYSMws...
While not my area of expertise, I don't this course is particularly relevant to any practical modern formal methods unless you want to reinvent the world.
It was definitey a clear delineation between _computer science_ and _engineering science_ during my undergraduate courses.
His algebraic approach towards building software is really refreshing as it starts with the absolute basics and then slowly builds to a whole framework. Recommended!
Formal Methods of Software Design: an online course by Eric Hehner - https://news.ycombinator.com/item?id=6464463 - Sept 2013 (8 comments)
Might be a chance to get ahead of the curve here, bookmarked. This looks interesting and challenging, but maybe not realistic. Prime candidate to grind out 1000s of these exercises.
However, using type theory to assist in writing models is something I am currently looking into. It is an interesting area that has the potential to propel the development of seriously large models.
[0] https://en.wikipedia.org/wiki/Hoare_logic
[0] https://svkarthikwinner.files.wordpress.com/2015/07/practica...