“Equality” is a tricky concept, and various branches of mathematics have slightly different ideas (or axioms) of equality. Simple arithmetic is based upon strict equality: two things are equal if and only if a sequence of logical steps are followed precisely and the final answer matches exactly. Other branches have looser (or just different) versions of equality: set theory may use a relation to induce an equivalence relation, topology may see things as equal based on structure preserving transformations, computer science has notions of program equivalence based on identical outputs given identical inputs, etc.
Category theory is an attempt to identify and unify various similar concepts across mathematical branches, including “equality”. Category theorists are limited to talking about objects (which are opaque), and arrows between those objects. Using those (incredibly) abstract tools, how does one define “equality”? The answer is, one can’t, so what are the closest things possible that capture “equality”, and can be specialized back into more traditional notions as needed.
Part of the confusion is that category theory is described from the “arrows and objects” perspective, when the really interesting stuff happens two layers higher (natural transformations and above). And another part of the confusion is that many mathematicians see category theory as needless nonsense :)
Due to my own circumstances I’m drawn to notions of equality that have pragmatic value. One of my favorite is Leibniz’s rule
x=y => f(x)=f(y)
I use that rule so frequently and effectively when reasoning about programs that pragmatically I’m not interested in a model where it doesn’t hold. It looks very simple, but it’s practically foundational for reasoning about predicate transformers.Incidentally, I’d be really interested in a rigorous rendition of Dijkstra and Scholten’s work on program semantics in the language of category theory.
> x=y => f(x)=f(y)
Eh, it's useful in some cases, especially from a theoretical perspective, but... x = 0.0
y = -0.0
f = \x(copysign(1,x))
x = "foo"
y = "f"+"o"+"o"
f = debug.dump-pointer
...pragmatically I'm not interested in a programming language where it does hold. It prohibits too many important utility functions.Briefly, predicate transformers are functions about the behavior of a language, not functions in the language. In that model predicates are pure functions over the program state space and predicate transformers are functions from predicates to predicates. Clearly your objections are inapplicable.
So for instance (drawing on the other reply in this thread about Leibnitz), to say that
x = y => f(x) = f(y)
is not really useful when the meaning of the equality is contextual. If two choices are equal for one person (or prior distribution, utility function, uncertainty aversion etc.), they may not be "equal" if anything changes. And if they are, but other choices are not, the "equality" doesn't help.
By contrast, in if in the moment of where a context is fixed (we look at one potential set of decisions, one choice relation etc.) there exists an equivalence relation, then we can analyze the choice situation with math, and it's the equivalence of choices (with respect to this one relation) that does this. And then, naturally, if we conceive of a situation that we can analyze (or we have data on it), we can conceive the relationships that might have given rise to it.
And, as it turns out, there's typically infinitely many of those. And so, even lowly economists or statisticians must - in some simple way - grapple with what I would imagine categories are (?)
Would love to read more on this. Are there materials on category theory for non-mathematicians (and non-computer scientists thinking in terms of language theory)?
A challenge or contradiction doesn't have to be disparaging. We are all laymen sometimes, and sometimes we just want to scratch an itch. It usually comes from a place of curiosity, not arrogance. We want to understand how something that seems weird to us can actually make sense, even if our understanding of only limited and superficial.
Why not let people express that in a direct way, without a bunch of deferential throat-clearing ("not an expert, just my thoughts here, this doesn't make sense to me...")? Who is hurt?
After a few minutes of deferential throat clearing, I'd like to say "in all seriousness, come on, equality isn't a mistake, and whatever brilliant insight your theory affords still isn't going to do away with it."
Therefore to explain a theory to a layman or anybody consider that your theory is a program, and therefore there can be any number of equal/equivalent but different programs, i.e. representations of that theory that are "equivalent" but have a different representation.
Therefore, and this is the point I'm trying to make, (and maybe I'm wrong) any good explanation of a theory could also be presented in some other way, and possibly in a simpler way. Programmers know this intuitively: You can write the same program in a complicated way or in a much simpler way, sometimes. Therefore the fact that some math is difficult to understand may in fact not be the fault of the student, but of that "math" itself.
And therefore it is useful that people come up with questions about what they find difficult to understand about a given theory. The "stupid" questions reveal something about the theory, they reveal what is difficult about it, what kind of mistakes people make when trying to understand it.
The point is that what's called "equality" in current foundations of mathematics is not equality in the middle-school math sense, but something far more restrictive. There are older, property-based notions of "equivalence relation" that broaden this a bit, but not nearly enough for many uses. OP describes a logical formalism that might enable us to make rigorous, watertight inferences about something really, really close to what a middle-schooler would call "equality". It gets rid of a pervasive abuse of mathematical language and notation, a worrying "gap" in previous attempts to make mathematical reasoning rigorous.
From this, we can define a new relation called "=" such as:
for all x in A and for all y in B, x in B and y in A
We don't care what A, B, x or y are. We don't care what "x in A" means. It's just logical statements that are useful, and we build the rest of maths upon it.For me "=" does not mean "equal", "equivalent", or anything. It means "there is a relation between 2 objects".
For example:
- in a programming language "a = 3" means that "a" is related to "3"
- in a BNF grammar "rule := term term term" means that "rule" is related to "term term term"
- in a math equation "y = x + 1" means there is a relation between "y" and "x + 1"
- on some old calculator "A <- 1" means there is a relation between "A" and "1"
In each of those domains, the relation is precisely defined. But it does not need to be the same relation (they are different math theories).Another example, "y = x + 1" could be interpreted as "there is a value for x for which I can replace x + 1 by y". You don't even have to care about what "x + 1" means.
I thought the article was cool. From this comment, you are coming across as someone who is trivializing a potentially important piece of work. I didn’t really understand it, but I take mathematicians at IAS seriously.
> Except equality never meant...
... opening to your comment which immediately makes you look like you're being antagonistic.
("except", and "never" probably being the key words. Especially opening with "except"...)
I doubt it. The parent is confused and hence the question obviously. But I get the impression that the parent would benefit from reading an elementary textbook on discrete math as the post is gibberish (as are a few other posts in this thread). I know it sounds rude, but I don't know how else to put it. It's not only the fact that the parent doesn't have a conceptual idea about equivalence relations and in particular equality, isomorphism, let alone homotopy, but is also very confused about what it means for a series to converge which is also very elementary. Before discussing the merits of Dostoevsky in Russian, one must learn and know the Russian alphabet at the very least or something.
I didn't get that impression at all. Rather, you came across as needlessly insulting. Why add that sentence, even if you thought so?! "Be kind."
> I'm not sure how far you could take math if you treat equality as meaning "exactly the same"; it seems even middle-school math requires understanding that that's not the case.
I honestly didn't mean that in a rude way, more like a "hey dude, be careful how you're coming across here, as there may be things you don't understand." I read the above phrase as describing a mathematician's work as something a middle schooler should already know. But I take back what I said. I'm all good, everyone's good, I think there was just a misunderstanding here.
In the same vein, I don't see how you could read my message as needlessly insulting, as I thought it was pretty softly worded. But I guess that's the nature of written communication. I think you should have given me the benefit of the doubt, just as I should have done for the original poster.
- Objects are equal to themselves canonically, but they can be equivalent to themselves in many ways, often called "symmetries."
- Bool is equivalent to a single bit in two ways, depending on whether 0 or 1 means True.
They aren't equal if x is 0. The full statement would be x / x = 1, x ≠ 0. Or in English any number divided by itself except for 0 is 1.
A set is a bag of items. We usually call these items elements of a set. For example, {1, 2, 4} is a set containing elements 1, 2, 4.
Ordered pairs are tuples written like so: (a, b) where (a, b) != (b, a).
Relation is an association from one set to another. For example, a -> x, b -> &, c -> apple is a relation from {a, b, c} to {x, &, apple}. Let R stand for this relation, then we write R = {(a, x), (b, &), (c, apple)} where R associates a with x, b with & and c with apple.
Consider the sets X = {1, 2, 4, 5} and Y = {6, 9, 1000, 5} with the following association R from X to Y: 1 -> 9, 2 -> 6, 4 -> 1000, 5 -> 5. This R looks like an ordering relation meaning this R is ≤. Let's see, 1 ≤ 9, 2 ≤ 6, 4 ≤ 1000, 5 ≤ 5. Then ≤ = {(1, 9), (2, 6), (4, 1000), (5, 5)}.
Some relations are called functions if they meet certain criteria.
If a relation R abides by the following rules it is called an equivalence relation. For any a, b, c in a set S:
1. (a, a) in R
2. If (a, b) in R, then (b, a) in R
3. If (a, b) and (b, c) in R, then (a, c) in R.
For example, congruence modulo integer n is an equivalence relation as it abides by the three rules above which can be easily shown. Two integers a, b are congruent modulo n if n divides a - b.
Equality is but one of many different equivalence relations.
What I wrote above doesn't even come close to scratching the surface of this topic. However, any introductory textbook on abstract algebra, discrete math or elementary number theory will have this material well fleshed out. Also, every intro to proofs book dedicates significant number of pages to the topic of relations. But this stuff is very elementary and many steps removed from category theory and so you are missing some foundational background to understand the topic broached in the article. You want to have some experience with abstract algebra and general topology before approaching category theory.
As for the equality you gave above,
let X = 1 + x + x^2 + ... and Y = 1/(1 - x). Then X is a geometric series and X = Y only if |x| < 1. If |x| >= 1, then X diverges. When X = Y, you cannot talk about one side of the equality diverging and the other not as they both are the same object.
This topic of geometric series (and many others) can be found in any textbook on elementary real analysis. Textbooks are great because they start from the beginning, don't leave out (or add) some random topics, give airtight definitions and the statements are given watertight proofs (like that one above about X = Y needs proof).
Edit: In case it wasn't clear, I'm hoping someone can explain how this notion of equivalence differs from what we've traditionally called equality since middle school, given that the latter doesn't appear to mean exactly the same either.