 So, welcome to this session, we will look at definitions of some operations on numbers. So, last time we have seen how to define the values of natural numbers themselves. Now, we will look at how to define operations on these numbers. Let us look at the simplest operation that you are all familiar with which is addition, but we will see how to define it formally. So, we want to define the addition operation add two numbers m and n. So, we will first define what it meant by adding 0 to n for all numbers n and for any number n we define add of 0 comma n to be n for any natural number n. So, this defines the operation when n is equal to 0. In general to define any operation we need to define it for the case when the value is 0 and then assuming it is defined for the case where the value is m we need to define it for the value next of m. If that is done then it gets defined for all possible values of the number m. So, for add 0 comma n when m is equal to 0 we define the value to be n itself for all numbers. Now, what is add of next n comma n we define that assuming that add of m comma n is defined for all numbers n and this is easy to see add of next n comma n is the next add apply to add of m comma n for all numbers n. So, adding informally we know that next n is m plus 1. So, adding m plus 1 to n is like adding m to n and then adding 1 to that. So, that is what this is saying it says that to add m plus 1 to n we add m to n and add 1 to n. But the formal specification of that is add of next m comma n is next of add of m comma n for any number n. Now, this defines the addition operation for all numbers m and n because we have defined it for m equal to 0 and all values of n it is add 0 n is n and assuming it is defined for add m comma n it is defined for add next comma n. So, add of next 0 comma n will be next of add 0 comma n which will be next of n add of next of next of 0 of n will be next of next of n and so on. So, you get exactly what you want in the addition operation. But this is the formal way of defining it which allows us to prove properties of addition and it is a clear unambiguous way of defining the meaning of addition operation. So, let us look at another such operation this is typically required whenever you define any data type. So, any data type you have ways of constructing its values by different operation, but you need to specify when two values are considered to be equal. So, typically there is a double equal to operator for any type in C plus plus which you will need to define whenever you define your own type. So, this specifies when two values are equal. So, let us look at what we mean by when are two numbers equal. So, again similarly we first define equal 0 n for all numbers n in order to do that we will first define equal 0 0 for n equal to 0 and then assuming it is defined equal 0 n is defined we will prove define it for equal 0 comma next n. So, equal 0 comma 0 is defined to be true 0 is equal to 0 itself that is true and we define equal of 0 comma next n to be false for no matter what the value of n is equal 0 comma next of n is always false. So, the next of any number cannot be equal to 0. So, this defines equal 0 n for all numbers n. Now, we will define equal next of n comma n for all numbers n assuming equal of m comma n has been defined for all numbers n and what is that to define equal next comma n come for all n we define equal next comma n comma 0 first for n equal to 0. This is again always false next of m cannot be equal to 0 for any n and now we define equal next n next n this by definition is the same as equal m comma m and since we have already defined equal m comma n for all values of n this definition becomes clear and it is valid for equal next m comma next n. So, the next of two numbers is equal if and only if those two numbers are equal. So, in general if I have an operation to be defined with several variables you have to consider whether each variable is 0 or whether it is the next of some number and in each case you need to define what is the meaning of that operation that will define it completely for all possible values of the variable. So, let us look at another operation multiplication now it will use already defined operations to define new operations. So, this makes things easier you can define more and more complicated operations using things that you have already defined and this is similar to functions calling other functions. So, once you have written functions for doing certain job you can use those functions for more complicated operation and in general when you write programs this is the way you should do it you should write several small functions and then keep using those for more and more complicated function. So, the definition of each function or each operations become quite small. So, let us look at multiply operation on numbers multiply of 0 comma n is always 0 for any number n you multiply anything by 0 you get 0. Multiply of next m comma n we define it as add of n comma multiply n comma n. So, if you know how to multiply m and n you know how to multiply next of m and n simply you have to add m to the result of multiplying m by m and that is a clear and unambiguous definition of the multiplication operation. So, as an exercise now you can try to define the division and remainder operations on numbers. So, these are a little bit more complicated but you can try to think over it. So, here these operations are not defined for all cases. So, when n is equal to 0 we do not have any definition for divide m comma n division by 0 is not allowed. So, its operation is undefined for that case the informal definition of integer division is if I write m as equal to q times n plus r where q is the quotient and r is the remainder where r is between 0 to n then we call divide m n as equal to q and modulus of m n is equal to r. So, informally we know what integer division and remainder means we write m as q times n plus r, but how will you write the formal definition for these. So, try to think over this we will see more examples of such definitions later right. So, here you will need to be a bit more careful. So, when I increment m by 1 what happens to the modulus what happens to the remainder and what happens to the divide operation. So, assuming modulus is defined for m and n how do you define the modulus for next m and n right. So, hinted it will increase by 1 or it will go back to 0 similarly quotient will increase by 1 may be or it will remain the same. So, you need to know when it will remain the same and when it will increase by 1. So, try to think over this and we will look at more examples of this later. Thank you.