News for hackers. Stuff that matters.
Re:What's the difference between 0/0 and 1/0? by gizmo686 on Friday May 24, 2019 @11:05PM (#20006869)
>But to really understand the difference you probably need to use the calculus approach

I am probably showing my bias as an algebraist here, but there is a purely algabraic way of seeing the difference between 0/0 and 1/0, which is (in my view) more intuitive.

The standard way of constructing the field of fractions is to start with the integers (or your choice of base ring), and define an equivalence relation on the set:

    Q = { (x,y) | x,y are integers, y!=0 } 
Given by:

    (a,b) ~ (c,d) iff ad = bc
Intuitively, the pair (a,b) is the fraction a/b, and the equivalence relationship is defining that: a/b = c/d is equivalent to ad =bc (assume b,d are non-zero). From that you can define multiplication and division in the expected way and verify that the resulting structure is a field that behaves as you would expect the rationals to behave.

One thing to notice in the above view is that the prohibition on dividing by 0 is entirely artificial. By removing 6 characters from the above definition, we arrive at the following structure:

    W = { (x,y) | x,y are integers } 
    (a,b) ~ (c,d) iff ad = b
Let [W] be the set of equivalence classes on W, and [Q] be the set of equivalence classes on Q.

If we define addition and mulitplication on [W] and [Q] in the "obvious" way, then [Q] behaves identically to the field of rational numbers (indeed, this is a common construction.

Further, [W] contains [Q] as a subset, so we can view [W] as an extension to the rational numbers.

We can verify that [W] contains exactly two elements not present in [Q], which I will denote:

  ⊥ = [(0,0)] = 0/0
  ∞ = [(1,0)] = 1/0 = a/0 for a!=0 and a!=⊥
The question now becomes, is "division" meaningful on [W]. If we keep the same definition of multiplication as with [Q], it is clear that we cannot define an inverse operation [0].

However, we can define a unary operation called the reciprical, given by: /[(x,y)] = [(y,x)]

And define a division operation as multiplication by the reciprical. So:

[(a,b)] div [(x,y)] = [(a,b)] * (/[(x,y)]) = [(a,b)] * [(y,x)] = [(ay,bx)]

And note that, on the subset [Q], this operation is identical to our standard notion of division.

With this, we have extended [Q] into a structure, [W], for which division by 0 is defined.

Further, by doing so, we added exactly 2 elements: 0/0 and 1/0. So we can see that 0/0 and 1/0 are distinct (in this structure) in a way that 1/0 and 2/0 are not. (as 1/0 ~ 2/0 in the same way that 1/1 ~ 2/2)

In fact, the behaviour of ⊥ ∞ should not be suprising to this forum.

⊥ behaves essentially like NaN in that it "absorbs" the other number in all operations. So:

    x + ⊥ = ⊥ and 
    x * ⊥ = ⊥.
∞ behaves mostly like you would expects:

    0 * ∞ = 0, 
    x * ∞ = ∞ | x != 0 and x != ⊥
    x + ∞ = 0 | x != ⊥
The main "weirdness" here is that ∞=-∞

In fact, this [W] I have been describing is an established structure refered to as a Wheel [1], and can be constructed over the real or complex numbers just as easily (it can also be viewed as an extension of the more well known Riemann sphere by adding ⊥)

[0] I will note that the lack of division by 0 means that we cannot define an inverse operation for multiplication in [Q] either.

[1] https://en.wikipedia.org/wiki/Wheel_theory

Re:What's the difference between 0/0 and 1/0? by cygaril on Saturday May 25, 2019 @12:54AM (#20007155)
Assuming the definition of ~ is meant to be the same on Q and W (I think there's a typo), then it's no longer transitive and therefore no longer an equivalence relation: (0, 0) ~ (1, 2) and (0, 0) ~ (2, 3) but not (1, 2) ~ (2, 3).
Re:What's the difference between 0/0 and 1/0? by gizmo686 on Saturday May 25, 2019 @01:20AM (#20007269)
I'm passed the window where I can edit my post, so I will correct it here.

You are correct that my original post is mistaken. I wish I could attribute that to a typo, but it was really me just working from memory without checking my work. A correct equivalence relation for a wheel over integers is as follows:

    (a,b) ~ (x,y) iff there exists s1,s2 (both non-zero integers) such that:
        (s1 * a, s1 * b) = (s2 * x, s2 * y)
When b,y are non zero, this is the same as the equivalence relationship on fractions.