~/writing/math-foundations-for-reasoning-models $ ls
Symbolic Logic and Reasoning
Variable
A variable is a symbol that can stand for different values depending on assignment or context.
~/writing/math-foundations-for-reasoning-models $ cat topic.md
Variable
Definition
A variable is a symbol that can stand for different values.
Example:
x
If:
x = 5
then x stands for 5.
If:
x = 10
then x stands for 10.
A variable is a reusable symbol whose value depends on context.
Why Variables Exist
Variables let us describe patterns without choosing one specific value.
Example:
x + 1
This expression describes a pattern:
take some value and add 1
If x = 2:
x + 1 = 3
If x = 7:
x + 1 = 8
Variables make general reasoning possible.
Variable vs Value
A variable is not the value itself.
Example:
x = 5
The variable is:
x
The value is:
5
The variable is a symbol that refers to the value in this context.
Variable = symbol. Value = assigned object or quantity.
Assignment
An assignment connects a variable to a value.
Example:
x = 5
This means:
wherever x appears in this context, use 5
Expression:
x + 2
After assignment:
5 + 2 = 7
Assignment gives a variable a value in a context.
Variables In Logic
In logic, variables can stand for objects.
Example:
Human(x)
This can be read as:
x is human
The statement depends on what x refers to.
If x = Socrates, then:
Human(Socrates)
Logical variables allow statements about unspecified objects.
Final Summary
- A variable is a symbol that can stand for different values.
- Variables allow general expressions.
- A variable is not the same as its value.
- Assignment gives a variable a value in a context.
- In logic, variables can stand for objects inside statements.
- Variables prepare the ground for substitution and quantification.
~/writing/math-foundations-for-reasoning-models $ open
Continue the series.
Substitution