 Today's lecture we will continue our discussions on Boolean algebra and later move on to Boolean functions which are functions on Boolean algebras. So let us recall the definition of a Boolean algebra a Boolean algebra is a complemented distributive lattice having at least two elements and also having a greatest element and a least element we will define functions on Boolean algebras which are induced from the idea of greatest lower bound and least upper bound of lattices. So two binary operations are denoted by plus and dot so we have two binary operations plus and dot where plus is the greatest sorry is the least upper bound of two elements so a plus b is equal to the least upper bound of the two elements a b and a dot b is equal to the greatest lower bound of the two elements a b these greatest lower bound and least upper bounds are defined as we define in lattices because after all Boolean algebra is a lattice next we have the complementation operation which gives us another operation on a Boolean algebra but in contrast with the previous two operations this operation needs only one element and so it is called unary operation. So we have a unary operation complementation a unary operation called complementation denoted by prime is also defined on a Boolean algebra now this complementation when it acts on an element a suppose a is an element of a Boolean algebra then an element of a Boolean algebra then the complement of a a complement plus a gives me 1 and a complement dot a gives me 0 now the fact that complements exist is due to the definition of Boolean algebra where we say that it is a complemented lattice a complemented lattice means that any element has a complement and complement means that when you take the conjunction or plus of that element with its complement you will get the greatest element and when you take the product sorry it is not conjunction when you take the disjunction or plus with the complement of an element then you get the greatest element and when you take the conjunction or what some sometimes people say and or the product of or dot with the complement you will get 0 so thus these things are defined on a Boolean algebra thus an algebraic system Boolean algebraic system is is a is a is a system which consists of some elements so a Boolean algebraic system script B can be represented as script B well which content consists of a set B which is a set of elements then the operation plus and dot which are two binary operations then we have the unary operation complement and then we specify the least element and the greatest element so it is a six tuple consisting of a set B then plus dot the complement which we denote by a prime 0 and 1 now we have already seen in the next in the previous lecture some examples of a Boolean of Boolean algebras like we have seen the simplest possible Boolean algebra consisting of 0 and 1 and then we have taken some tuples some three tuples of elements and of 0 and 1 and have seen the Boolean algebra that we can construct by by using them so we have basically seen that by taking Cartesian product of the set 01 we can construct Boolean algebra with larger number of elements however we should also check the basic axioms underlying the Boolean algebra and we should also check some basic results which can be derived from the basics basic axioms of Boolean algebra so now we will be doing some kind of axiomata so we have the algebraic system which we call a Boolean algebra we have defined operations and we say that these we explicitly write down a set of axioms that we say that this Boolean algebra must follow so the axioms of Boolean algebra the first one is that there exists at least two elements in B the second axiom is that for all a, b belonging to belonging to the set B well here we will be often calling the script B as Boolean algebra but the other capital B also we will be calling Boolean algebra now so for a, b belonging to B a plus b belongs to B and a dot B belongs to B so this is a version of closure property so we can write it down as closure third property is that for all a, b belonging to B a plus b equal to b plus a and a dot b equal to b dot a this is called the commutative law now at this point one may stop and say that wait a moment we proved all these for lattices indeed we proved all these for lattices but in this case we are trying to write down Boolean algebra with a explicitly defined axioms involving the set the operations and the greatest element least element so later on we will not be looking back to lattices but we will be looking at Boolean algebras and trying to derive more results by using these axioms although if we like we can of course see that all these things are satisfied in the environment of lattices now we have got the commutative law this is now an axiom here and then the fourth one is the existence of so-called additive identity so there exists an element 0 belonging to B such that a plus 0 equal to a for all a belonging to B and there exists one belonging to B such that a dot one equal to a for all a belonging to B so the first one is existence of zero and the second one is existence of unit so we write existence of zero and existence of unit so we will call this element 0 in a Boolean algebra and this as unit in a Boolean algebra now we have seen some axioms and we will see some more axioms the fifth axiom is the distributive law axiom number 5 so we have two kinds of distributive laws for example if you have a plus b dot c then we can write this as a plus b dot a plus c and if we have a dot b plus c we can write this as a dot b plus a dot c and this must hold for all a b c belonging to B this is called the distributive law now the last one is the complement it relates to the complement so for all a belonging to B there exists complement of a again belonging to B such that a plus a complement equal to 1 and a dot a complement equal to 0 now if we look back to all these properties we will see that they appear in pairs for example if you look at these two these two laws we will see that they they are in pairs in some way then these two are in pair we see that we can in fact transfer from one one expression within this pair to the another expression by interchanging plus and dot and 0 and 1 let me give an example suppose we start from the first equality in 5 so we write it down again a plus b dot c equal to a plus b dot a plus c now let us somewhat mechanically change the pluses to dots and dots to pluses so what will happen so I start from a instead of the plus I write a dot then of course here this means that I have a bracket over here so I will put a bracket and then see this is B instead of dot I will put a plus I put a plus here and then I write C this should equal now I have a bracket so I write a dot b put a bracket around it and this dot here is replaced by a plus and then we write a dot c and since we usually traditionally take the precedence of dot over plus therefore we will write a dot b plus a dot c thus we see that we arrive at the second law now let us consider the laws or equalities that we have derived in the sixth axiom so we have got a plus a complement equal to 1 what I said sometime back is that we have to change plus to dot and dot to plus and 0 to 1 and 1 to 0 if I do that then I have got a instead of plus I will put a dot and then I have got a complement and instead of 1 I will get 0 and in fact this is this second one now this principle is called the principle of duality so the principle of duality in Boolean algebras which indeed makes our life easy in several occasions now basically when we prove some equation or some relationship in in in a Boolean algebra like we have one expression and we say that okay this expression is equal to this expression then this will carry with itself a dual law or dual equality so what we can do is that we can change the dots to plus and plus to dots and exchange 0 and 1 and we will get another expression which is also valid so we will write that every theorem that can be proved for Boolean algebra every theorem so I made a mistake here every theorem that can be proved for Boolean algebras has a dual which is also true and is obtained by interchanging plus and dot as well as 0 and 1 so very soon we will see the principle of duality in action now now we move on to some results that we prove on Boolean algebras so I will start writing a sequence of theorems well it is somewhat somewhat tedious to do that or to listen to that but we have to do that if we want to study Boolean algebras because these are the basic results that we need to work on Boolean algebras and work on Boolean functions which are defined on Boolean algebras so first theorem over here theorem one states that for all a a plus a gives me a all right now if you are looking at numbers if somebody gave you usual plus with numbers then suppose you take 2 and of course 2 plus 2 gives you 4 but it does not happen like that in a Boolean algebra here we have a plus or something some binary operation which we are denoting by plus which is such that when I add that is a with a itself I do not get anywhere else but only a now the question is that how do we prove it now let us go to the proof now I start from the left hand side which is a plus a and I recall one axiom which says that in a Boolean algebra anything dot 1 is that thing therefore I will write a plus a dot 1 and I then recall what is one one is nothing but a plus a complement that is also an axiom of Boolean algebra so I get a plus a dot a plus a complement and now I will do something that is I will use the distributive law we will ask that how I am using the distributive law so please see here that a is repeating in these two terms I take a out and write plus over here and I will put a dot a complement inside a bracket let us recall here distributive law distributive law recall that if you have a plus b dot c then you get a plus b dot a plus c this is something that does not happen in numbers if you are considering plus as the usual plus in numbers and dot as usual product it does not happen but it happens in case of Boolean algebras so C a plus b dot c gives you a plus b dot a plus c now in this case we are putting b equal to a and c equal to a complement and that is why we are getting what we have we are getting so now we know that a dot a complement gives me 0 therefore I have got a plus 0 and this lets me prove that a plus a is equal to a so this is the end of theorem 1 we move on to theorem 2 here we state that for all a a dot a is equal to a question is how to prove that the answer is principle of duality so I write in the place of proof principle of duality we already know that a plus a equal to a for all a belonging to b and the duality principle says that if I interchange plus and dot 0 and 1 then the relationship will hold so I write a dot a equal to a for all a belonging to b and that is the proof so we will now go to theorem 3 okay now the theorem 3 says that the elements 0 and 1 that we have defined in a Boolean algebra are unique that is there cannot be more than 1 0 and there cannot be more than 1 1 that means there cannot be more than 1 least element and there cannot be more than 1 greatest element now let us see how to prove that now our way of proving is that we will start by the assumption that there are two elements which work as 0 so suppose 0 1 and 0 2 are two elements having the property well 0 now I know what is a 0 because we have already seen in the axiom all right so suppose I take a 1 and a 2 in b then a 1 plus 0 1 is of course a 1 because of the property of 0 because we know that 0 1 is a 0 so it must follow the property of a 0 but this is for all a 1 belonging to b similarly I have 0 2 and a 2 which will give me a 2 now this should also work for all elements a 2 belonging to b now the question is that what happens if I take a 2 to be 0 2 so see suppose a 2 is equal to 0 2 and a 1 equal to 0 1 so see we will start from this one so it will come over here so I am putting let us let me change it a little so a 2 I will I will take 0 1 all right so let me let me correct it so instead of a 2 I will take 0 1 and instead of a 1 I will take 0 2 all right now we are starting here so we have got 0 2 plus a 2 is 0 1 and this is equal to 0 1 and if we consider this equation we have 0 2 plus 0 1 equal to a 1 but in this case a 1 is 0 2 but please note that this and this are one and same therefore 0 1 is equal to 0 2 thus we have proved that we cannot have two zeros in a Boolean algebra and more or less in the same way or using the principle of duality one can prove that the unit element 1 in a Boolean algebra is also unique so I leave it as an exercise over here and move on to the next theorem which is theorem 4 in the order in which we are discussing theorem 4 so theorem 4 states that for all a belonging to be a plus 1 is equal to 1 and a dot 0 is equal to 0 that is all now the question is that how do we prove it in order to prove it we have to start from a plus 1 and understand that a plus 1 can be written as a plus 1 dot 1 only 1 well because we know that 1 dot anything is that thing so that the that is property of a unit now replace 1 by a plus a complement and then use the distributive law so take this a out so I have got a plus and then we have 1 plus a complement no I do not have that I have 1 dot a complement so let me change it so here this is inside bracket 1 dot a complement please see because if you have 1 plus 1 dot a complement we can use distributive law this plus is distributing over this dot so I have got 1 a plus 1 dot a plus a complement right that is what we started with so we will have a plus a complement because of course 1 dot anything is that thing and a plus a complement by your axiom is 1 so we see that ultimately for all a belonging to be a plus 1 is equal to 1 we have proved that and now to prove the other part as I said just sometime back principle of duality makes our life easy so to the other part we have just use principle of duality so write a instead of dot plus write dot instead of 1 write 0 and instead of 1 write 0 so this is the other part of the theorem so we have done theorem 4 at this point well I know that this becomes tiring somewhere in the middle people start thinking that why we are doing these things but we have to remember that we are laying down the rules in an in an algebra so after that we would not have to think about lattices partial order set GLB LUB and all that so we will just think that we have a set of elements we have a set of binary operations one unary operation some special elements and we know what we can do with that so next one is the theorem 5 this is theorem 5 and this state that the element 0 and 1 are distinct and 1 complement is 0 and 0 complement is 1 the elements 0 and 1 are distinct and 1 complement is 0 0 complement is 1 we need a proof for that and the proof goes like this that suppose these elements are equal suppose 1 equal to 0 then what will happen take take any a belonging to b all right and then we can start from a which is equal to a dot 1 and we know that by our assumption 1 is 0 so it is a dot 0 therefore it is 0 and that is the point if 1 is equal to 0 then you cannot have any other element then any any element other than 0 in B so we start with an element a in B and we end up showing that that a is also equal to 0 which is equal to 1 so that means the whole Boolean algebra will collapse to a single element and by definition we say that a Boolean algebra must have two distinct elements so therefore 0 and 1 are distinct and now if we take one complement one complement plus 1 should give me 1 and one complement dot 1 should give me 0 now 0 plus 1 gives me 1 I know that because because of the theorem 4 and 0 dot 1 gives me 0 thus we see that 0 works exactly as a complement and we have seen in one of our previous theorems that complements are unique now well we will prove it later but what we can prove here is that we will need something else over here so I can I can prove like this that 0 complement equal to 0 complement plus 0 which is equal to 1 so that makes 0 complement equal to 1 and 1 complement equal to 1 complement into 1 which is equal to 0 thus we see that 0 complement is 1 and 1 complement is 0 now I could have done something else that is here I could have shown that since this happens and if we can prove that complements are unique then also this theorem holds but the problem is that we have not yet proved that the complements are unique so we will now prove exactly that which is the sixth theorem which says that theorem 6 for all a belonging to b the complement of a is unique proof now now we will suppose that there are two distinct complements suppose suppose a subscript 1 and a subscript 2 are two distinct complements a therefore we have a 1 equal to 1 dot a 1 equal to a plus a 2 a 1 which is equal to a dot a 1 plus a 2 dot a 1 which is equal to 0 plus a 2 dot a 1 and then I will replace 0 by I will replace 0 by a dot a 2 and here a 2 dot a 1 and therefore I will have again by using distributive law a 2 dot a a plus a 1 and we know that a plus a 1 is 1 so a 2 dot 1 and this is a 2 thus we see that we get a 1 equal to a 2 thus complements are unique and therefore as I said we could have written a different proof for the previous theorem by showing that 1 plus 0 is 1 and 1 into 0 is 0 so 0 works as a complement and therefore complement is unique therefore 1 complement is 0 and 0 complement is 1 so that is all so we will now come to another theorem which is called theorem 7 in the series in which we are discussing this is called absorption law is states that let a, b belonging to B then a plus a dot b equal to a and a dot a plus b is also equal to a we need a proof for that so if we start with a a plus a dot b now we will replace a by a dot 1 plus a dot b which is equal to a dot 1 plus b now we know that 1 plus b is 1 this result we have already proved so a dot 1 so it is equal to a thus we say that a plus a dot b is equal to a now we use the principle of duality to write a dot a plus b is also equal to a that proves now the next theorem that is theorem 8 states that for all a belonging to B a complement of complement is equal to a now this is called the involution law alright how to prove that now we shall prove that in this way that suppose I take a complement and then a complement of complement this should give me 1 and a complement dot complement of a complement should give me 0 but we already know that since a is a complement is the complement of a we have a complement plus a equal to 1 and a complement dot a equal to 0 but we have already proved that complements are unique therefore I will have a equal to a complement of complement theorem 9 now theorem 9 is the associative law says that for all a b c belonging to b a plus b plus c is equal to a plus b plus c and a dot b dot c is equal to a dot b dot c now I will leave this proof for self study this is a result that we all expect to happen but as a word of caution this does not happen in all the algebraic systems there are of course algebraic systems which are non associative but Boolean algebra is not an algebraic system like that it needs a proof though from the basic axioms but as I have said I leave it as self study and move on to probably the most important result of today's lecture that is the last one that is the last theorem in this series of theorems and this is called de Morgan's law de Morgan's law states that a plus b complement gives me a complement dot b complement and a dot b complement gives me a complement plus b complement now please see that again the principle of duality holds here I can arrive from this to this relation by interchanging plus and dot and well 1 and 0 does not occur so we do not have to do anything now how to prove this one for this we will just prove that a plus b is the complement of a complement dot b complement therefore we have this proof that we take a plus b and consider a complement dot b complement and this is equal to by our distributive law a plus b plus a complement dot a plus b plus b complement now I can use the