Main derivation
S01 · definition
Before
x+1,\ (x+1)\div 2,\ \sum_{x=1}^{3}(x+1)After
\text{value}=U[x:=c]\ \text{computed in a stated}\ SConditions: none
Rule: mko_var_expr · Uses: G1, G2
Leaf basis: mko_var_expr + eval_assign
The MKO says the value of an algebraic expression is determined jointly by the assignment, the scope, the number system and the operation rules. So before evaluating, four things must be stated: which value x takes (the assignment), which occurrences of x are free (the scope), which system the computation is in, and which operation rules apply (addition, multiplication and exact division of G1). Without any one of them, 'the value of the expression' has no definite meaning.
S02 · equivalent
Before
E[x:=2]\ \text{in}\ \mathbb{Z}After
2+1=3
Conditions: none
Rule: eval_assign · Uses: S01, G2
Leaf basis: eval_assign + numeric_evaluation
In E=x+1 the variable x occurs free once; by eval_assign it is replaced by 2, giving 2+1, which computes to 3 in ℤ.
S03 · equivalent
Before
E[x:=5]\ \text{in}\ \mathbb{Z}After
5+1=6
Conditions: none
Rule: eval_assign · Uses: S01, G2
Leaf basis: eval_assign + numeric_evaluation
The same expression under a different assignment: replacing x by 5 gives 5+1, which equals 6 in ℤ.
S04 · implies
Before
E[x:=2]=3,\ E[x:=5]=6
After
\neg\exists v\in\mathbb{Z}\ \forall c\in\mathbb{Z}:\ E[x:=c]=vConditions: none
Rule: contradiction · Uses: S02, S03
Leaf basis: contradiction + eq_refl_symm_trans + numeric_evaluation
Suppose some fixed integer v had E[x:=c]=v for every assignment. Taking c=2 gives v=3 and taking c=5 gives v=6, so symmetry and transitivity of equality give 3=6, contradicting 3≠6. So E has no fixed value independent of x; 'the value of x+1' only makes sense once x is assigned.
S05 · equivalent
Before
F[x:=4]\ \text{in}\ \mathbb{Q}After
(4+1)\div 2=5\cdot\tfrac{1}{2}=\tfrac{5}{2}Conditions: 2\neq 0
Rule: eval_assign · Uses: S01, G1, G2
Leaf basis: eval_assign + mul_inverse_nonzero + two_nonzero + numeric_evaluation
Replacing x by 4 gives (4+1)÷2=5÷2. In ℚ, 2≠0, so by G1, 5÷2=5·(1/2)=5/2; it is the unique solution of 2w=5 in ℚ (substituting back, 2·(5/2)=5).
S06 · case_split
Before
F[x:=4]\ \text{in}\ \mathbb{Z}:\ w\in\mathbb{Z}\ \text{with}\ 2w=5\ ?After
w\le 2\ \lor\ w\ge 3
Conditions: w\in\mathbb{Z}
Rule: int_no_gap · Uses: G1, G2
Leaf basis: int_no_gap + case_analysis
In ℤ, (4+1)÷2=5÷2 needs an integer w with 2w=5. By int_no_gap (m=2), every integer w satisfies w≤2 or w≥3; the two branches cover all integers and are handled in S06.1 and S06.2.
S07 · implies
Before
\forall w\in\mathbb{Z}:\ 2w\neq 5After
F[x:=4]\ \text{has no value in}\ \mathbb{Z},\ \text{while}\ F[x:=4]=\tfrac{5}{2}\ \text{in}\ \mathbb{Q}Conditions: none
Rule: case_analysis · Uses: S06, S06.1, S06.2, S05, G1
Leaf basis: case_analysis + eval_assign + quantifier_negation
Both branches give 2w≠5, so no w in ℤ has 2w=5; by G1, 5÷2 is undefined in ℤ, and by eval_assign, F has no value at x=4 in ℤ. Compare S05: the same expression with the same assignment goes from 'value 5/2' to 'no value' when the system changes. The number system is part of the data of evaluation.
S08 · equivalent
Before
H=\sum_{x=1}^{3}(x+1)After
H=(1+1)+(2+1)+(3+1)
Conditions: none
Rule: finite_sum_rules · Uses: G2, bound_var
Leaf basis: finite_sum_rules + bound_var
By the meaning of the summation sign (G2, that is, the recursive definition in finite_sum_rules unfolded three times), H is the sum obtained by setting the bound variable x to 1, 2 and 3 in turn. This x takes only the values 1, 2, 3, whatever is assigned to x outside.
S09 · equivalent
Before
(1+1)+(2+1)+(3+1)
After
2+3+4=9
Conditions: none
Rule: numeric_evaluation · Uses: S08
Leaf basis: numeric_evaluation
Compute term by term, 1+1=2, 2+1=3 and 3+1=4, then add to get 9.
S10 · implies
Before
H[x:=5]
After
H[x:=5]=H=9\neq 18=(5+1)+(5+1)+(5+1)
Conditions: none
Rule: bound_var · Uses: S09, bound_var, eval_assign
Leaf basis: bound_var + eval_assign + numeric_evaluation
By eval_assign, the assignment x:=5 replaces only free occurrences of x; every x in H is bound (bound_var) and none is free, so H[x:=5] is H itself and its value is still 9. Wrongly replacing the bound x by 5 as well would give (5+1)+(5+1)+(5+1)=18, which differs from 9; this is exactly the error of ignoring scope.
S11 · equivalent
Before
(x+1)+x
After
2x+1
Conditions: x\in\mathbb{Z}
Rule: L_double · Uses: G3
Leaf basis: add_assoc + add_comm + distributive + mul_one + numeric_evaluation
Take any x∈ℤ, with no extra assumption. By Lemma L_double, (x+1)+x=2x+1. The lemma is proved in S11.1 and S11.2 from the operation rules of ℤ only, not from the two expressions looking alike.
S12 · implies
Before
\text{for arbitrary}\ x\in\mathbb{Z}:\ (x+1)+x=2x+1After
(x+1)+x\equiv_{\mathbb{Z}}2x+1Conditions: none
Rule: forall_intro · Uses: S11, expr_equiv
Leaf basis: forall_intro + expr_equiv
S11 holds for an arbitrary x∈ℤ with no condition on x; by universal generalisation the two expressions have equal values for every x∈ℤ, and both always have values in ℤ (only addition and multiplication occur), so by expr_equiv they are equivalent on ℤ. Syntactically different expressions can be equivalent, but the reason is the operation rules.
S13 · implies
Before
x\cdot x\ \text{vs}\ 2xAfter
1\cdot 1=1\neq 2=2\cdot 1,\ \text{so}\ x\cdot x\not\equiv_{\mathbb{Z}}2xConditions: none
Rule: quantifier_negation · Uses: G3, expr_equiv
Leaf basis: quantifier_negation + expr_equiv + numeric_evaluation
Equivalence requires equality at every x. Take x=1: x·x=1 and 2x=2, and 1≠2, so some x makes the two differ, and by negation of quantifiers they are not equivalent on ℤ. Note that they agree at x=0 (both 0) and at x=2 (both 4): agreeing at some values is not enough for equivalence.
S14 · implies
Before
x+1\quad\text{vs}\quad x+1=3After
\{x\in\mathbb{Z}\mid x+1=3\}=\{2\}Conditions: none
Rule: mko_equation · Uses: G3, S02, mko_equation
Leaf basis: mko_equation + eq_congruence + add_inverse + set_extensionality
x+1 has no equality sign, so it is an expression: it has a value under each assignment (S02, S03), but by itself it is neither true nor false and has no solution set. x+1=3 has an equality sign, so it is an equation: by mko_equation its solution set consists of the x∈ℤ at which both sides are defined and equal. Both sides are always defined in ℤ; adding −1 to both sides gives x+1=3 ⇔ x=2 (backwards, add 1), so the solution set is {2}. E[x:=2]=3 from S02 is exactly the substitution check of this solution.
S15 · implies
Before
\text{conclusions of S04, S07, S10, S12, S13, S14}After
\text{value of }U=\text{function of assignment, scope, system and rules}Conditions: none
Rule: and_intro_elim · Uses: S04, S07, S10, S12, S13, S14
Leaf basis: and_intro_elim
Together: changing the assignment changes the value (S04); changing the system changes whether there is a value (S07); scope decides which occurrences of x an assignment replaces (S10); equivalence is proved for all values from the operation rules (S12), and agreement at some values is not enough (S13); an expression and an equation play different roles (S14).