Live data from Hacker News

For mathematicians, = does not mean equality

jeremykun.com

141–150 of 206 posts

Re: For mathematicians, = does not mean equality

#141
post #31

(I assume this was inspired by https://news.ycombinator.com/item?id=16803874 ) The use of ‘=’ for assignment in programming languages comes, not directly from mathematics, but indirectly from the use of mathematics in science and engineering. As an example, consider the formula for kinetic energy, commonly written 𝑚𝑣² 𝐾 = ─── 2 Why isn't it written 2 K = m v ², which expresses the same mathematical equality in a s…

Off-topic: how did you format that equation (K = mv^2/2) so nicely? e.g. mv is in italics. It looks really nice.

Does Hacker News have built in LaTeX, or is that just very clever use of Unicode?

Re: For mathematicians, = does not mean equality

#142
post #31

(I assume this was inspired by https://news.ycombinator.com/item?id=16803874 ) The use of ‘=’ for assignment in programming languages comes, not directly from mathematics, but indirectly from the use of mathematics in science and engineering. As an example, consider the formula for kinetic energy, commonly written 𝑚𝑣² 𝐾 = ─── 2 Why isn't it written 2 K = m v ², which expresses the same mathematical equality in a s…

Because I started programming before taking maths at school, I didn't properly appreciate equality for a while. Sure, algebra was fine, a(x+y)=ax+ay can go either way; but not ratios and other relationships. What helped me was was geometry, where you can see it's just a relationship. All the components move together; one part isn't priviledged as the result . e.g. you enlarge a circle. It doesn't make sense to ask wh…

I remember starting with QBasic when I was around 7 or 8 years old, and I quickly got an idea – just put in the equations from math homework to find out the answer! Fighting through the error messages without English and trying to wrap my mind around the basic concepts of procedural programming was a world of pain.

Re: For mathematicians, = does not mean equality

#144
Jeremy – I’m a mega fan of your work.

But think going deeper into this is quite fun

Your post goes to the point at the heart of philsophical number theory.

What does equality mean ?

Yup – you got functinal equivalence, isomorphism, and temporary assignment of values.

But I think you could prove – that all these types of equality – are “instances” of “different implementations” of “equivalence.

They are no more equivalent than 1 = 1 is equivalent.

I.e. 1 = 1 means I think we can define a bijective “counting function” that proves there’s the “same number” of “elemetns” in the “sets”

I think (not sure) – if you define – counting fucntion / same number / elements / sets differently – you get the differing definitions of equivalence you enumerate.

The interesting thing for me is that 1 = 1 is defined clear in 4 of peano’s axioms

https://en.wikipedia.org/wiki/Peano_axioms#Formulation

And you could mentally – try to develop different (and potentially) – more powerful notions of “equivalence” – with differing axioms

A final point… the prevalence of several “similar” concepts of equivalence in computer science – may point to an underlying “platonic idea” of equivalence – that either exists dormant in the world awaiting for us to discover it; or is a useful “technologocial” construct – that has accelerated “progress”

Re: For mathematicians, = does not mean equality

#145
post #139
post #122

I agree that “=“ as interpreted by people doing math requires context, but in most situations they are able to translate it into a “correct” or formal notion of equality. For example, translating on the fly these ad hoc notions of equality into precise notions of equality in first order logic and/or set theory. For example, f(x) = 2x + 3 Might be translate into something like, For all x in the domain of f, f(x) = 2x…

This comment contains an important key distinction between different usages of "=" that are often casually intermixed in such discussions: There is a major difference in how we quantify the logical variables that occur in formulas. For example, if we consider the atomic formula x = 5+y, then we may mean the identity ∀x∀y (x = 5+y), where all variables are universally quantified. Or we may mean ∃x∃y (x = 5+y), where t…

You're trying too hard. The problem with "=" is usability. If you read the previous article about "why does = mean assignment" you'll find the true reason:

Since assignment is about twice as frequent as equality testing in typical programs, it’s appropriate that the operator be half as long.

Of course, that's wrong. Trying to make it easier to type, a bigger usability problem is created, assigning counterintuitive symbols to functionality that most people would not associate to them.

So the problem is not what = means in maths, it's what it means for people learning a language. Anyway, smadge is right: most of the uses in maths are of the kind "a little imprecission saves tons of explanation". In other words: that's not a question of what = is, but a question of how we use it to get things done.

Oh and then there is the "I'm used to it so it must not be so bad" crowd and the rationalization ensues.

Re: For mathematicians, = does not mean equality

#146
post #31

(I assume this was inspired by https://news.ycombinator.com/item?id=16803874 ) The use of ‘=’ for assignment in programming languages comes, not directly from mathematics, but indirectly from the use of mathematics in science and engineering. As an example, consider the formula for kinetic energy, commonly written 𝑚𝑣² 𝐾 = ─── 2 Why isn't it written 2 K = m v ², which expresses the same mathematical equality in a s…

Off-topic: how did you format that equation (K = mv^2/2) so nicely? e.g. mv is in italics. It looks really nice. Does Hacker News have built in LaTeX, or is that just very clever use of Unicode?

Seems to be just unicode in a code block. mv is 𝑚𝑣

Re: For mathematicians, = does not mean equality

#147
post #145
post #139

Earlier quoted context omitted.

This comment contains an important key distinction between different usages of "=" that are often casually intermixed in such discussions: There is a major difference in how we quantify the logical variables that occur in formulas. For example, if we consider the atomic formula x = 5+y, then we may mean the identity ∀x∀y (x = 5+y), where all variables are universally quantified. Or we may mean ∃x∃y (x = 5+y), where t…

You're trying too hard. The problem with "=" is usability. If you read the previous article about "why does = mean assignment" you'll find the true reason: Since assignment is about twice as frequent as equality testing in typical programs, it’s appropriate that the operator be half as long. Of course, that's wrong. Trying to make it easier to type, a bigger usability problem is created, assigning counterintuitive sy…

I disagree with what the previous article states: There are languages such as Prolog where = doesn't mean assignment. In logic, = means equality, often modulo some theory. In Prolog, = means (syntactic) unification, which is distinguished from identity only by the different quantification of variables.

I would like to emphasize the distinction that smadge made, since distinguishing between universal and existential quantification is important to properly discuss different meanings and usage modes of equations.

Re: For mathematicians, = does not mean equality

#148

Earlier quoted context omitted.

> It's because formulas have a convention, where the LHS is a single term naming the value you want, and the RHS contains the terms for values you have. This is simply not true.

I agree this is not entirely true, I have often heard physicists express similar formulas in the way the parent described (I.e. 2K = mv^2)

I've seen that, too, but there is usually a reason for writing it in that form. The most common would be that you have a different equation with 2K in it, and so you want to make variable substitution simpler. Alternatively, if you are reading older papers, typesetting inline equations that don't fit in a single line was painful. For that reason, a formula might be rearranged to avoid needing any fractions.

Re: For mathematicians, = does not mean equality

#149
post #122

I agree that “=“ as interpreted by people doing math requires context, but in most situations they are able to translate it into a “correct” or formal notion of equality. For example, translating on the fly these ad hoc notions of equality into precise notions of equality in first order logic and/or set theory. For example, f(x) = 2x + 3 Might be translate into something like, For all x in the domain of f, f(x) = 2x…

In every formal system, such as FOL/ZFC, all operators must have a precise meaning. And while it is true that most informal uses of the `=` sign in mathematics could be translated to some formal expression making use of a precisely-defined `=` sign, I think the point was that some (or most) mathematical notation is not formal, and therefore saying that `=` always means a precise notion of equality is wrong, even if in a particular formal language it always has this precise meaning. Therefore, this is not a sin to use the same `=` sign in some other formal language (say, a programming language) to mean something other than its meaning in a particular mathematical formal language.

Re: For mathematicians, = does not mean equality

#150
post #145
post #139

Earlier quoted context omitted.

This comment contains an important key distinction between different usages of "=" that are often casually intermixed in such discussions: There is a major difference in how we quantify the logical variables that occur in formulas. For example, if we consider the atomic formula x = 5+y, then we may mean the identity ∀x∀y (x = 5+y), where all variables are universally quantified. Or we may mean ∃x∃y (x = 5+y), where t…

You're trying too hard. The problem with "=" is usability. If you read the previous article about "why does = mean assignment" you'll find the true reason: Since assignment is about twice as frequent as equality testing in typical programs, it’s appropriate that the operator be half as long. Of course, that's wrong. Trying to make it easier to type, a bigger usability problem is created, assigning counterintuitive sy…

> Trying to make it easier to type, a bigger usability problem is created, assigning counterintuitive symbols to functionality that most people would not associate to them.

How do you know? It seems no such problem has been reported, so the burden is on you to show it exists. I don't think people assume that the same token has the same meaning in different languages.

Post reply on HN