0

The essence of this question is about how we define expressions like

$x^2+2x+1$ and say, 'when $x=2$, $x^2+2x+1=9$, treating $x$ like another name for $'2'$.

When we define the value of an expression, we have lots of symbols/names for a given object, let me use numbers here for simplicity, the number $2$ has the name $1+1$ and the name $2^1$ and the name $3-1$,or the name $-(-2)$, when we solve equations and assign values we often write expressions like $x=3$ for assignment and hence can conclude that: $x^2=9$.

The question is whether we can see these as being

'replace $x$ with a name for a number and you get this value:

or instead of having a value based on a hypothetical, we use $x$ as another name for the number, so unambiguously the expression has this value in the exact same way $2+2$ has a value, as '2' specifically refers to the number, in the same way $x$ would do so.

Does the 'value' of the expression mean the hypothetical value we get when we symbolically replace each variable with an explicit referent for the number (like '$2$' or '$2+2$') or the value under assignment where $x$ can remain and the expression keep its value as '$x$' becomes another name for it's value so $x+x$ is the same as '$2+2$ as $x$ is a specific name for $2$ without any 'hypothetical' idea.

user37577
  • 745
  • 2
    Not sure what you are asking. $x=3$ might be a perfectly good way of referring to $3$ locally...that is, within a very specific context, but outside that context it wouldn't work. As to "why" you might stick with a variable name...well, again, context matters. Sometimes it could be as simple as not wanting to write out a lengthy number. Perhaps an example of a particular instance that you are interested in would clarify your question. – lulu Sep 07 '22 at 10:27
  • $x=3$ can be a way to assign to variables x a value (for example in the context of programming); not so for $x^2=9$. – Mauro ALLEGRANZA Sep 07 '22 at 10:29
  • Good question, but you'll only get sensible answers in a very precise context. If you define what logic you are using, what are variables, etc., the answer will come from the definitions. Usually we do maths with a vague/sloppy notion of what a variable is, but here we must be precise. You could look at various formal logical systems, proof assistants (e.g. Coq), at programming languages especially the concept of referential transparency, etc. E.g. a large part of lambda calculus (https://en.wikipedia.org/wiki/Lambda_calculus) is just about dealing with variables. – Jean-Armand Moroni Sep 10 '22 at 13:00
  • @MauroALLEGRANZA we cannot 'assign' $x^2=9$, we can say when $x^2=9$ or if $x^2=9$ and or we can say $x=3$ implies $x^2=9$, which is similar to my question, we sort of can 'assign' a value of $'9'$ to $x$ but 'assign' in the general sense is a value to a variable so we 'assign' the value to the single term $x$, so $x=3$ and hence $x^2=9$, is this what you mean? – user37577 Sep 10 '22 at 14:23
  • @lulu, so to write $x^2=9$ as $x=3$ would mean the (locally) we wish '$x$' to denote '$3$'' – user37577 Sep 10 '22 at 14:24
  • Hard to guess what you mean, as there is no context. On its face, $x^2=9$ would mean that $x\in {\pm 3}$ but other interpretations are possible. If you were working $\pmod {35}$ the solutions would be $x\in {3,17,18,32}$ Regardless of all that, I'd have said that $x^2=9$ was the declaration of a variable name, and whatever follows would be the logically forced conclusions of that declaration. – lulu Sep 10 '22 at 15:45
  • @lulu $x^2=9$ is the declaration of x or are you treating $x^2$ as it's own symbol? Sorry, I'm a bit confused when you say $ x^2=9$ is a declaration. – user37577 Sep 10 '22 at 21:03
  • The declaration would be "$x$ represents an element of the domain under discussion with the property that $x^2=9$". It would be understood that the domain was such that $x^2$ made sense, though the declaration would not be taken to indicate that there actually was such an $x$. One could, for instance, speak of a rational $x$ such that $x^2=2$ in the course of demonstrating that no such $x$ existed. – lulu Sep 11 '22 at 00:19

2 Answers2

1

I will seperate my answer into two diffrent perspectives:

1.Computer Science
2.Mathimatics

Computer Science

$\text{Whenever we say that $x=2$ we mean that the variable $x$ is equal to a logic value.}$
And this logic value is equal to 2.Genarly speaking when we use"$x$" its when we are representing a parameter or mathematical/logical value.So $x+x=2+2$ $\text{if only if }$ $x=2.$

Mathimatics

$\text{When we say that $x^2=9$ with $x\epsilon [0,100]$ for instance it means that $x$ represents an element of the domain}\\ \text{with the property that $x^2=9$ as it was mentioned in the comments.}$
$\text{So we don't assign values in maths but we searching all the possible}$
$\text{values of the variable that satisfies our conditions.This conditions could be like:}$ $f(x)=x^4+4x+100$ $\text{with a domain }$ $x\epsilon R$ $\text{ or }$ $x\epsilon[1,100]$$ $$\text{In both cases of the domain the varible x works as a summary of the elements of the domain of the fuction.}$ $\text{So when we are saying $x=2$,x it's just one of the many values that $x$ can take.So i guess we can say that it's an temporary name for $x$ }$

1

These kinds of questions are all settled in the formal semantics of the language in question, or model theory. In particular, the interpretation function which is part of a model describes how each constituent in the syntactic structure of the expression in question is assigned a meaning or interpretation. As you will soon see, it requires an amazing amount of precision to unambiguously specify what things mean so questions like yours can be clarified.

Let's do a little example. Let's interpret the expression $\tt x+2$ which I'll write in typewriter font to make it clear that it is in the object language, or the formal language under interpretation rather than the metalanguage in which we describe the semantics of the object language.

Our model will be the standard interpretation of the natural numbers $\mathbb{N}$. Let the interpretation function be $I$. The interpretation function will contain at least the following mappings to complete the interpretation of our expression. So the numeral $\tt 2$ is mapped to the number $2$, the variable $\tt x$ is mapped to the number $4$, and the function symbol $\tt +$ is bound to the function +.

$\tt 2$ $\rightarrow$ $2$

$\tt x$ $\rightarrow$ $4$

$\tt +$ $\rightarrow$ +

So

$ I(\tt x+2) = $

$I(\tt x)$ + $I(\tt 2) =$

$4$ + $2$ $ =$

$6$

So as you can see, in the standard semantics of first-order logic and the standard interpretation of natural numbers, each variable is assigned an number in the domain by the interpretation function. Other interpretations and other functions could assign other meanings to the constant variables in the object language. Specifically, a Herbrand interpretation maps each expression to itself.

But I haven't seen your specific example of number referents like '2+2' used in first-order logic, but I can't think of anything specifically blocking it. I have, however, seen it in the context of programming languages. So, specifically, in languages like Lisp I've seen plenty of things like

(setq x '(+ 2 2))

which means to assign the unevaluated, quoted expression (+ 2 2) to the variable x.

The formal semantics looks something like section 7.2.3 of the R5RS definition of Scheme.

ShyPerson
  • 1,720
  • Is the interpretation mapping described in terms of arrows like that, or did you do that for my understanding, because 2->2 confused me a little, how would we know the meaning of '2' to map it? – user37577 Sep 16 '22 at 09:24
  • I think in the case of $2+2$ it has a meaning under a particular interpretation you are working in, but we can consider $x=2+2$ means that $x->4$ as $2+2$ is just a number I think 'names' exist under a particular interpretation as you say. – user37577 Sep 16 '22 at 10:31
  • @user37577: The arrows are for clarity to show that part of the interpretation function. The interpretation function, being a function, has to provide a unique value for '2'. – ShyPerson Sep 16 '22 at 23:57