2

I asked a similar question on philosophy stack exchange, but was told to ask it here. In an elementary school math class, we sometimes are asked "What is 2+3?". It would be marked wrong if we simply wrote "2+3". What the teacher is after is a certain mathematical expression. To formalize this idea, we need a definition of mathematical expression that can distinguish even between two expressions that denote the same object. Is there such a definition somewhere, perhaps in some computer science textbook?

user107952
  • 20,508
  • 1
    I see what you are getting at. You are looking at ${2+3}$ as being simply just some symbolic representation of the number $5$. Instead, typically we would think of ${+}$ as an operation that takes two natural numbers and gives us back another natural number. When asked questions like "what's ${2+3}$?" - typically they want you to define what natural number you get back once performing the $+$ operation. Hopefully this view helps make more sense why we wouldn't typically consider answering just ${2+3}$ to this question as a valid solution – Riemann'sPointyNose Dec 19 '20 at 22:44
  • 2
    Maybe a better way of phrasing the question "what's ${2+3}$?" more formally would be "given the operation ${+ : \mathbb{N}\times \mathbb{N}\to \mathbb{N}}$, what element in ${\mathbb{N}}$ does ${2+3}$ give us?" – Riemann'sPointyNose Dec 19 '20 at 22:47
  • Meanwhile most mathematicians would rather write $\frac{1}{3}$ rather than $0.\overline{3}$ or even worse $0.333...$. So maybe its all about a convention to reduce a term to the easiest presentation possible. Like $\frac{2}{6}$ is bad, because we can reduce it further to $\frac{1}{3}$, but the latter is better than $0.333...$, because it represents the same number in a more condensed form, not invoking our intuition for having infinitely repeating digits and providing us further with the information that $\frac{1}{3}\in \Bbb Q$ rather than $\Bbb R$... – Jonas Linssen Dec 19 '20 at 23:20
  • @Riemann'sPointyNose In regards to your second comment, it gives 2+3, of course. See, we need a definition of mathematical expression for these kinds of questions. – user107952 Feb 18 '21 at 17:01
  • Hopefully my answer sheds a bit more light – Riemann'sPointyNose Feb 18 '21 at 17:31
  • 1
    @user107952 no, because the expression "$2+3$" is not an element of $\mathbb N$ syntactically. – mrp Feb 18 '21 at 18:55

2 Answers2

1

I think at a fundamental level, your confusion comes from definitions of mappings. Take your example of addition. Then we could more formally create a mapping: $$ \phi : \mathbb{N}\times \mathbb{N}\to \mathbb{N} $$ given by $$ \phi(a,b) = a+b $$ now - as with your example - you could ask "what is ${\phi(2,3)}$?", and someone could keep answering over and over again "well it's just ${\phi(2,3)}$", and they would of course be right. But this still hasn't given an explicit definition of ${\phi(2,3)}$. This answer is as about helpful as saying nothing.

You could say "well, doesn't this mean we are missing something? Shouldn't we make some sort of new definitions to avoid these nonsense answers?" and I would argue no. To explain why, think of the following: when we define addition, do we literally define the answer to every possible addition? No, of course not. It's impossible, we only have finite amounts of time. So really you could say we have actually never explicitly defined the map ${\phi(a,b)}$ - we have only ever written down rules that, given any two specific inputs, allow you to explicitly find an output. And this is the best we can do. (I guess you could actually ask "how do we even know that addition is well-defined then? How do we know the rules we set for addition are consistent and make sense?" - this is a rather difficult question to answer). Even with this, however, given the rules we set out for addition we can still figure out further properties of addition, and as I said - we have the toolkit to actually figure out for example that ${\phi(2,3)=5}$.

Hopefully that helps a little.


EDIT: to give you a taste of the sorts of rules we define ${\phi}$ by, it's essentially the following: $$ \phi(n,0) = n $$ $$ \phi(a,\phi(b,1))=\phi(\phi(a,b),1) $$ We could define ${2 := \phi(1,1)}$, ${3 := \phi(2,1)}$, ${4 := \phi(3,1)}$, ${5 := \phi(4,1)}$. Going to your example, say we want to calculate ${\phi(3,2)}$. Then this is $$ =\phi(3,\phi(1,1)) = \phi(\phi(3,1),1) = \phi(4,1) = 5 $$

0

Since you asked about computer science as one option, note the line of code

x = 2+3

causes the l-value x to be $5$, whereas the r-value from which that was obtained was $2+3$.

J.G.
  • 115,835