Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Mathematical logic: _ _ _ _ _ _ Idea 2 . 2 3 [ Inductive function definition ] Let S be defined inductively from basis
Mathematical logic:
Idea Inductive function definition
Let S be defined inductively from basis B and some construction rule. to difine a function f on elements of S do the following:
Basis : : Specify the value fx for each x in B
Ind : : For each way an x in S can be obtained from some y yn in S specify how to obtain fx from the values fy fyn
Clsr : : The closure of S ensures that f is defined for all x in S
Example
Define the set of strings N over Sigma s:
Basis :: in N
Induction :: If n in N then sn in N
This language is the basis of the formal definition of natural numbers. The constructors are and the operation of appending the symbol s to the left. The s signifies the successor function corresponding to n Notice that we do not obtain the set but s ss sss which is a kind of unary representation of natural numbers. Notice that, for instance, the strings s ss not in N ie N Sigma
using the definistion of N we can define the plus operation for all n m in N:
BASIS ::
IND. ::
It is not obvious that this is the usual addition. For instance, does it hold
that We shall verify this in an exercise.
We can use this definition to calculate the sum of two arbitrary natural numbers represented as elements of For instance, would be processed as follows:
Note that Idea of inductive function definition is guaranteed to work only when the set is given by a definition. Imagine that we tried to
define a version of the length function in Example by induction on
the definition in Example as follows: len for xin while
lenlen This would give different and hence mutually con
tradictive values for len depending on which way we choose to derive
abc. Idea can be applied also when the definition of the set is not
but then one has to ensure that the function value for every element is inde
pendent from the way it is derived. In the present case, the two equations
len and lenlenlen provide a working definition, but
it takes some reasoning to check that this is indeed the case.
Exercise
a Example of Michal's book defines the function as a function in two arguments.
Modify Idea Inductive function definition to cater for inductive functions in any number of
arguments.
b Using the inductive definition of natural numbers, show that the operation defined in Example
is commutative, ie holds for all minN.
This requires a nested induction, as:
for all minN,
for all minN, given that for all minN,
can only be proven using induction.
c Show that on the natural numbers is associative, ie
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started