I’ve been thinking about this, and I’m pretty sure I’ve stumbled into areas of math beyond my training. The “standard” answer of course, is that “=” denotes an equation
x + 2 = 3 <-- Equation
x + 2 <-- Expression
However, it seems to me that “equation” is a special class of expressions, sort of like how the set of primes is a special class of integers. The driving example in this for me is Iverson brackets. As most people qualified to answer this question probably know, the Iverson bracket notation is an expression/function used a lot in probability (e.g. in the categorical distribution) and computer science. Probably in other fields too but that’s what I’m familiar with. Its meaning is
I[ condition ] ={1 if condition is true; 0 otherwise}. Roughly I’d call it a function such that
I: {T,F} -> {1,0}; or a function with the domain in the boolean variables True,False that maps them to the numbers in Z/R/C/<insert superset here> 1 or 0. Frequently this is used with equality, e.g. I[ f(x) = g(y) ].
In this case, while f(x) = g(y) is an equation, it’s also being used as an expression. So
x in S1
f: S1 -> D
y in S2
g: S2 -> D
= : (D x D) -> {T,F}
Where S1,S2 are arbitrary domains and D is a shared arbitrary codomain of f and g.
So the expression above would be (pardon the slightly wonky notation)
I’: ((S1 -> D) x (S2 -> D)) -> {T,F} -> {1,0}
This seems to suggest that an equation is an expression, as noted by its use as a subexpression.
One possible counterargument is that this is just an overloading of the “=” notation. While normally “=” denotes an “equation”, in this case we’re really using the function “Eq” that happens to have a shorthand that looks like “=”. Just like pi can be used for a constant or as the standard letter for a policy function.
Perhaps a counterargument to that is its implicit use as a function in proofs by contradiction. When we say “assume x=y”, we’re saying, “assume Eq(x,y) evaluates to True”, the contradiction arises where that doesn’t hold. But then we’re just moving the goalposts, that’s just saying “assume Eq(x,y) = T” and you’re back where you started with the equation/expression dynamic.
I don’t know, clearly I’m overthinking this, I’m just wondering if “equation” is just a linguistic anomaly or extremely well defined. Clearly both “Eq” and “=” are pieces of notation that do something sensitive to equivalence relations between their subexpressions, but it seems whether they’re the same or different should be something basic enough to be well defined.