Understanding Propositional Logic 41 We now define the mapping h as follows: If a ∈ B then h(a) := h0 (a) For every n-ary operation f ∈ F: h(f (a1 , , an )) := Ff (a1 , , an , h(a1 ), , h(an )) We will soon discuss the meaning and correctness of such definitions, but let us first look at some important particular cases 1.4.5.1 Primitive recursion on natural numbers Functions on natural numbers can be defined by so-called primitive recursion using the inductive definition provided earlier in this section The basic scheme of primitive recursion is: h(0) = a h(n + 1) = h(Sn) = FS (n, h(n)) For example, the scheme h(0) = h(Sn) = (n + 1)h(n) defines the factorial function h(n) = n! The more general scheme of primitive recursion with parameters is: h(m, 0) = F0 (m) h(m, Sn) = FS (m, n, h(m, n)) For example, the scheme h(m, 0) = m, h(m, n + 1) = h(m, n) + defines the function addition h(m, n) = m + n 1.4.5.2 Truth valuations of propositional formulae Recall that the set of propositional formulae FOR is built on a set of propositional variables PVAR and a truth assignment is a mapping s : PVAR → {T, F} Now, given any truth assignment s : PVAR → {T, F} we can define a mapping α : FOR → {T, F} that extends it to a truth valuation, a function computing the truth values of all formulae in FOR by recursion on the inductive definition of FOR as follows: