Primitive Recursiveness of the Sum Function
In primitive recursion theory (over ), one proves that a target function is primitive recursive by expressing it using the initial functions (like zero, successor, and projections) and closing operations such as composition and primitive recursion.2
For addition, the standard Peano-style equations are:
Equivalently, writing for successor:
A function satisfying such defining equations can be encoded as a primitive-recursive term using the primitive recursion operator . In particular, the addition function is primitive recursive.2
Key learning terms: primitive recursive; primitive recursion operator; projection function; successor function; composition.
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩ ↩2
-
Primitive recursive function — Addition section (Wikipedia) - Gives equations for addition and notes it can be defined using the primitive recursion operator . ↩ ↩2
Primitive Recursive Arithmetic (Addition by Primitive Recursion)
Goal
Show that the 2-ary sum function
is primitive recursive. Concretely, we will exhibit a primitive-recursive definition (a term built from the primitive recursion scheme applied to already-primitive-recursive pieces). The relevant closure/definition facts are standard: primitive recursive functions start with , successor , and projections, and are closed under composition and primitive recursion.2
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩
Constructing $f(x,y)=x+y$ using primitive recursion
- 1Step 1
Use the scheme: given and that are already primitive recursive, define and . This yields primitive recursive by the closure property of primitive recursion.
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
-
- 2Step 2
Set , so take . In terms of projections, , which is primitive recursive.
Footnotes
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩
-
- 3Step 3
We want . So define , i.e., apply successor to the recursive result . Successor is primitive recursive, hence is primitive recursive.2
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩
-
- 4Step 4
Let be defined by primitive recursion with the chosen and : and . Then by the usual induction on for Peano addition.
- 5Step 5
Since the base and step functions used in the primitive recursion are primitive recursive, the closure of primitive recursion implies is primitive recursive.2 This is exactly .
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩
-
Formal match with the standard addition definition
Many presentations state the addition function directly as a primitive recursive function obtained via using equations
This yields a primitive-recursive term for addition (and thus for ).
Also, standard references explicitly list: the addition function is primitive recursive and give a primitive recursion proof based on the definition-by-equations method.
Key definitions/claims (with citations):
- Primitive recursive functions arise from initial functions via composition and primitive recursion.2
- Addition can be obtained using the primitive recursion operator from the standard equations for and .
- Addition is explicitly proven primitive recursive in standard treatments.
Footnotes
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩ ↩2 ↩3
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
-
Primitive recursive function — Addition section (Wikipedia) - Gives equations for addition and notes it can be defined using the primitive recursion operator . ↩
type="tip" title="Pro Tip" content="When proving a specific arithmetic function is primitive recursive, try to match it to a defining scheme of the form and . If and are primitive recursive and only uses previously-computed , you can apply the closure of primitive recursion."
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
type="warning" title="Common pitfall" content="Do not confuse ordinary recursive definitions with primitive recursion. Primitive recursion requires the recursive occurrence to be exactly on the immediately preceding value (e.g., for defining ), and the allowed building blocks must be primitive recursive."
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
How the proof builds up
Choose primitives
Stage 0 (initial functions)Use zero/successor and projection functions as primitive recursive starting points.2"
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩
Select the primitive-recursion template
Stage 1Identify the right recursion variable (here ) and specify and ."
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
Instantiate base + step
Stage 2Base: via projection; Step: via successor.2"
Footnotes
-
Primitive recursion and primitive recursive starting functions (Open Logic Project Builds, Recursive Functions) - Defines initial functions (zero, succ, projections) and closure under primitive recursion. ↩
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩
Apply closure
Stage 3Conclude the resulting is primitive recursive, hence is primitive recursive."
Footnotes
-
Proposition rec.4 addition is primitive recursive (Open Logic Project Builds, Recursive Functions) - Explicitly states and proves addition is primitive recursive. ↩
Primitive-recursive proof structure for addition
Which building blocks are used for each part of the definition.
Why this exactly computes $x+y$
Knowledge Check
In the primitive recursion scheme for defining , which equation form is required for the step case?
Explore Related Topics
Resolution in First-Order Logic (FOL): Resolution Refutation from a Simple Knowledge Base
Functional Dependencies and Candidate Keys in $R(A,B,C)$
In with functional dependencies and , neither single attribute determines all three attributes, so and are not keys; the minimal candidate keys are and .
- and , both missing → not superkeys.
- Adding yields , making and candidate keys.
- Mutual determination () does not imply key status without covering the whole schema.
- A common exam trap is assuming or are keys because they determine each other.
- Heuristic: any attribute not derivable from others (here ) must appear in every candidate key.
Solving the Recurrence $T(n)=T(n-1)+n$ by Substitution Method
The course shows how to solve the decrease‑by‑one recurrence (T(n)=T(n-1)+n) (with (T(1)=1)) using the substitution method.
- Repeatedly substitute (T(n-i)=T(n-i-1)+(n-i)) until reaching the base case, yielding (T(n)=T(1)+2+3+\dots+n).
- The resulting sum is the triangular number (\frac{n(n+1)}{2}).
- The dominant term (\frac{1}{2}n^{2}) gives a tight asymptotic bound (\Theta(n^{2})).
- For recurrences of the form (T(n)=T(n-1)+f(n)), expanding to a summation quickly reveals the closed form.