 All right, the last concept that we're gonna consider to generalize the notions of set and Boolean, of set algebra and Boolean logic is the idea of a complement. What does a complement mean? Well, complements are kind of like inverses when it comes to, when it comes to lattices but they're not exactly the same thing. So let me give some motivation what's going on here. So if we have some like power set of a set X when we look at unions and intersections, every set has a complement. That is, if you take some subset A of X, then its complement is the set difference, right? Everything that's in X that's not in A. We have this notion of set difference. We can all, sometimes these are denoted as A prime or AC. There's a lot of different notations you could use in that situation. When it comes to Boolean logic, we also have a complementary situation that is you have negation. So if you have some type of primitive statement P, so this is a statement that's either true or false, then we take not P in that situation. So not is this idea of a complement. And so we can have complements with sets, we can have complements in logic. So we have this not P in that situation. We can do that in general for lattices if you have a complement. And so now we're ready to define the idea of a Boolean algebra. So suppose we have a bounded distributive lattice. Distributive lattice means that meet and join distribute across each other. Bounded means that all the two operations both have identities for which we call those identities zero and one, the identity of join is zero, the identity of meet is one. We're then gonna introduce a new symbol here, which would just a little tick mark there, a little prime notation. This is the complementation map. And so then a Boolean algebra will be a set with three operations now. So we have two binary operations and now this unary operation called complementation. So it's a distributive bounded lattice. So with regard to meets and joins your associative commutative all elements, right? I'm potent for both operations. We have absorption, we have distributive laws, which again some of those principles are redundant when you have all of these axioms but we'll talk about that some other time perhaps the bounded means you have identities. A Boolean algebra is a bounded distributive lattice for which we now have the complement axiom that if you take x join its complement, you get back one and this happens on both sides, okay? And the complement also has the property that x meet x prime, its complement is equal to zero that happens on both sides. Now when you look at this naively this kind of feels like the inverse axiom that we have for groups that an element operated upon by its special companion gives you back the identity. So it looks like it's the inverse axiom but one has to look past the obvious and look at the subtle business here. One is equal to the meet identity, okay? It's not the join identity. In fact, the meet identity has an interesting property. We've proven this already that if I take x join one, which is the meet identity, this is always equal to one, right? And conversely, if I take zero, which is the join identity the join identity has the property that if you take x meet zero, this is always equal to zero. So what's interesting here is if you take the identities of a lattice, of a bounded lattice, their identities with respect to their operations but they're absorbing their dominant elements with regard to the other direction. You have this dominant term, right? That x join one, it doesn't matter what x is you always get back one and x meet zero is always equal to zero. This is not something we ever see in groups. There's no such thing as a dominant element in a group but in rings this happens all the time. Zero is a dominant element with regard to, it's a dominant element with regard to multiplication. And that's because it's the additive inverse and this is actually a consequence of the distributive property. That because of the distributive property the additive inverse has to be a dominant element with respect to multiplication. Now in rings, distribution only goes one direction. Multiplication distributes over addition and in ring we don't have addition distributes over multiplication. But in a distributive lattice we actually expect it to go in both directions. If you only have one direction you actually can force the other direction. We just saw that in the previous video. And so that tells us that the other identity has to be distributed, since it distributes has to be dominant with respect to the other operation. And you don't even need the distributive laws. We can actually prove this using absorption that we've saw before. Cause when we talk about bounded lattices the bounded lattice we don't necessarily have the distributive law we do have absorption. And that still will give you this condition that the identity of one operation is a dominant element of the other operation. Okay. So getting back to compliments here. So when it comes to a compliment your compliment doesn't give you back the identity like an inverse does the compliment gives you the dominant element. So the dominant element of join is one the identity is zero the dominant element of meet is zero the identity element is actually one in that situation. So the compliment is sort of like the opposite of an inverse the compliment gives you the dominant element of the operation not the identity for which you can think of the identity as like the recessive element it never shows up when you operate but the dominant element always shows up in that situation. So compliments you combine an element of the compliment to get the dominant element. So I want you to make sure you don't confuse that X join X compliment gives you one not zero and X meet X compliment gives you zero not one. And so let's look at some examples to try to grab this idea of a Boolean algebra. A Boolean algebra is a bounded distributive lattice with compliments, okay? So Boolean logic is sort of like the poster child of a Boolean algebra, right? That's why they're both called Boolean the name after Boole of course for which in Boolean algebra, excuse me, in Boolean logic you have your two elements true and false you have your operations of or and and and then compliments have to do with not and this will satisfy the axioms of a Boolean algebra in set algebra. You also have a Boolean algebra structure where X is any set, find our infinite doesn't matter. You take unions and intersections and you can take compliments. So X compliment your set. We have a little placeholder right there. So the set difference from the total set this compliment is your operation for complimentation there that's gives you a Boolean algebra structure. We've also talked a lot about divisor lattices. Divisor lattices are always gonna be bounded distributive lattices but they're not necessarily Boolean algebras and the issue comes down to complimentation because if you're a distributive lattice if the number is square free square free means that you don't have any repeated prime divisors. If you're square free then the compliment of a divisor is just in divided by that divisor, okay? So if you did something like, you know the lattice for 30, okay? What happens there? Well, look at the divisors with two prime look at the divisors, two prime divisors you get things like six and 10 and 15. Like so, you're gonna get two and three and five and then one at the bottom, look at this and then this would be our lattice here a little bit sloppy, I apologize there but this does in fact give us a Boolean algebra. We've already talked about distribution and bounded identities beforehand but you look at like six six has a compliment it's gonna be five and the idea here is six and five multiplied together gives you 30 and the two are co-prime with each other. If you look at two the compliment of two is equal to 15 in the situation because 15 is 30 divided by two there's no repeated primes. So if you have no repeated primes in your divisor graph then you're going to get a Boolean algebra. What goes wrong of course if you have a repeated prime let's take like 24 for example if you look at the divisor lattice for 24 it has as divisors eight and 12 we have four and six we have two and three and then one a little crowded at the bottom sorry about that. We're gonna get a picture that looks something like the following. So let's consider the element two in this situation. To be a compliment what we need is that when we join two with its compliment you get 24 but when then you meet two with its compliment you get back one. Now in order to, since one is the minimal element to be a compliment you have to be co-prime that is the GCD has to be equal one. Well who's co-prime to two? Well you can take one itself or three okay but when you take the joins in this case the LCM of one and two is just two that's not 24 and when you take the LCM of two and three you get back six and it doesn't quite work. So two doesn't have a compliment in this situation. Four has a compliment you would take in that situation I take that back you don't have a compliment either. Four is the only thing it's co-prime two would be three that gives you back a one but when you combine them together you get 12 so it doesn't quite work. Eight has a compliment that's what I meant to say eight and three are going to be compliments to each other because their GCD is one but their LCM is 24 but you have things like four and 12 aren't going to be they don't have compliments because they don't have the maximum number of twos. 24 factors as two cubed times three since four and two are lacking the maximum number of twos you don't get compliments in that situation. So a divisor graph has a compliment if and only if it has it has compliment if and only if the divide the whole number in here is square free.