Definition Denotation Operations Special Sets Set Operations that Create New Sets Tuples DeMorgan’s Laws Your Turn Set Theory Definitions E. Wenderholm Department of Computer Science SUNY Oswego c 2016 Elaine Wenderholm All rights Reserved E. Wenderholm Set Theory
100
Embed
Set Theory - Definitions - Oswegowender/Classes/221/Slides/set-theory.pdfDe nition Denotation Operations Special Sets Set Operations that Create New Sets Tuples DeMorgan’s Laws Your
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
We use an Ellipsis (a comma and three dots) to denote“missing” elements in a set when the number of elements istoo numerous to list. The reader fills in the blanks.
Here is the set of the natural (counting) numbersN = {1, 2, 3, . . .}and the integersZ = {. . . ,−2,−1, 0, 1, 2, . . .}Notice we do not use this notation for R, the Real numbers.
Ellipsis are shorthand for finite setsC = {2, 4, 6, . . . , 100}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set DenotationImplicit definitions of sets
We use an Ellipsis (a comma and three dots) to denote“missing” elements in a set when the number of elements istoo numerous to list. The reader fills in the blanks.
Here is the set of the natural (counting) numbersN = {1, 2, 3, . . .}
and the integersZ = {. . . ,−2,−1, 0, 1, 2, . . .}Notice we do not use this notation for R, the Real numbers.
Ellipsis are shorthand for finite setsC = {2, 4, 6, . . . , 100}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set DenotationImplicit definitions of sets
We use an Ellipsis (a comma and three dots) to denote“missing” elements in a set when the number of elements istoo numerous to list. The reader fills in the blanks.
Here is the set of the natural (counting) numbersN = {1, 2, 3, . . .}and the integersZ = {. . . ,−2,−1, 0, 1, 2, . . .}
Notice we do not use this notation for R, the Real numbers.
Ellipsis are shorthand for finite setsC = {2, 4, 6, . . . , 100}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set DenotationImplicit definitions of sets
We use an Ellipsis (a comma and three dots) to denote“missing” elements in a set when the number of elements istoo numerous to list. The reader fills in the blanks.
Here is the set of the natural (counting) numbersN = {1, 2, 3, . . .}and the integersZ = {. . . ,−2,−1, 0, 1, 2, . . .}Notice we do not use this notation for R, the Real numbers.
Ellipsis are shorthand for finite setsC = {2, 4, 6, . . . , 100}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Using rules to define the elements of a set
A rule is some property that is true for all the elements inthe set.S = {n | a rule about n}n is a “variable name”, sort of like a formal parameter. It isused to refer to all the elements in the set.
The notation “P(x)” is often used, meaning “some propertyof x”S = {n | P(n)}Example: E = {n|n = 2×m, m ∈ N}We read “E = {n | ” as“E is the set of all elements n, where”n and m are variable names (like in a “for” statement) andare used to refer to elements in the set.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Using rules to define the elements of a set
A rule is some property that is true for all the elements inthe set.S = {n | a rule about n}n is a “variable name”, sort of like a formal parameter. It isused to refer to all the elements in the set.The notation “P(x)” is often used, meaning “some propertyof x”S = {n | P(n)}
Example: E = {n|n = 2×m, m ∈ N}We read “E = {n | ” as“E is the set of all elements n, where”n and m are variable names (like in a “for” statement) andare used to refer to elements in the set.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Using rules to define the elements of a set
A rule is some property that is true for all the elements inthe set.S = {n | a rule about n}n is a “variable name”, sort of like a formal parameter. It isused to refer to all the elements in the set.The notation “P(x)” is often used, meaning “some propertyof x”S = {n | P(n)}Example: E = {n|n = 2×m, m ∈ N}
We read “E = {n | ” as“E is the set of all elements n, where”n and m are variable names (like in a “for” statement) andare used to refer to elements in the set.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Using rules to define the elements of a set
A rule is some property that is true for all the elements inthe set.S = {n | a rule about n}n is a “variable name”, sort of like a formal parameter. It isused to refer to all the elements in the set.The notation “P(x)” is often used, meaning “some propertyof x”S = {n | P(n)}Example: E = {n|n = 2×m, m ∈ N}We read “E = {n | ” as“E is the set of all elements n, where”
n and m are variable names (like in a “for” statement) andare used to refer to elements in the set.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Using rules to define the elements of a set
A rule is some property that is true for all the elements inthe set.S = {n | a rule about n}n is a “variable name”, sort of like a formal parameter. It isused to refer to all the elements in the set.The notation “P(x)” is often used, meaning “some propertyof x”S = {n | P(n)}Example: E = {n|n = 2×m, m ∈ N}We read “E = {n | ” as“E is the set of all elements n, where”n and m are variable names (like in a “for” statement) andare used to refer to elements in the set.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Operations, Operators, OperandsWhat ARE these??
Example: 3 + 5operation : additionoperator (symbol) : +operands : 3 and 5; left operand 3, right operand 5.operator type : binary (2 operands) and infix (written
in-between the operands)
Example: −45 “-” operator is the prefix (unary) minusoperator.
Any arithmetic expression can be written in postfix notation.The benefit: parentheses are NOT needed! Postfix was usedin the first HP calculators (They didn’t have parentheses.)
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Operations, Operators, OperandsWhat ARE these??
Example: 3 + 5operation : additionoperator (symbol) : +operands : 3 and 5; left operand 3, right operand 5.operator type : binary (2 operands) and infix (written
in-between the operands)
Example: −45 “-” operator is the prefix (unary) minusoperator.
Any arithmetic expression can be written in postfix notation.The benefit: parentheses are NOT needed! Postfix was usedin the first HP calculators (They didn’t have parentheses.)
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Operations, Operators, OperandsWhat ARE these??
Example: 3 + 5operation : additionoperator (symbol) : +operands : 3 and 5; left operand 3, right operand 5.operator type : binary (2 operands) and infix (written
in-between the operands)
Example: −45 “-” operator is the prefix (unary) minusoperator.
Any arithmetic expression can be written in postfix notation.The benefit: parentheses are NOT needed! Postfix was usedin the first HP calculators (They didn’t have parentheses.)
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Basic Operations on SetsSet Equality and Set Membership
Set Equality.Two sets S and T are equal, S = T if and only if they containthe same elements. Otherwise they are unequal, S 6= T .
Set Membership.p is a member of (an element of) a set S (or, that set Scontains p) is denoted p ∈ S .p is not an element of S is denoted p 6∈ S .Notice that ∈ is a infix operator. The left operand is of typeelement. The right operand is of type set.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Basic Operations on SetsSet Equality and Set Membership
Set Equality.Two sets S and T are equal, S = T if and only if they containthe same elements. Otherwise they are unequal, S 6= T .
Set Membership.p is a member of (an element of) a set S (or, that set Scontains p) is denoted p ∈ S .p is not an element of S is denoted p 6∈ S .
Notice that ∈ is a infix operator. The left operand is of typeelement. The right operand is of type set.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Basic Operations on SetsSet Equality and Set Membership
Set Equality.Two sets S and T are equal, S = T if and only if they containthe same elements. Otherwise they are unequal, S 6= T .
Set Membership.p is a member of (an element of) a set S (or, that set Scontains p) is denoted p ∈ S .p is not an element of S is denoted p 6∈ S .Notice that ∈ is a infix operator. The left operand is of typeelement. The right operand is of type set.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Some Properties of Sets
The order of elements in a set is unimportant.{a, b, c , d} = {d , a, b, c}
We can define (or test) sets for equality or inequality.{a, b} 6= {b}
We can define (or test) for membership with the ∈ operator4 ∈ {2, 4, 6, 8} 1 6∈ {a, b}
The elements of a set need not be the same “type”, but theyoften are.
T = {1, sally , red , r}We can count the number of elements in a finite set. It isdenoted with vertical bars | |
| S | = 4A set may be an element of (a member of) another set!
{1, {sam, july}, {{ocean}}}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Some Properties of Sets
The order of elements in a set is unimportant.{a, b, c , d} = {d , a, b, c}
We can define (or test) sets for equality or inequality.{a, b} 6= {b}
We can define (or test) for membership with the ∈ operator4 ∈ {2, 4, 6, 8} 1 6∈ {a, b}
The elements of a set need not be the same “type”, but theyoften are.
T = {1, sally , red , r}We can count the number of elements in a finite set. It isdenoted with vertical bars | |
| S | = 4A set may be an element of (a member of) another set!
{1, {sam, july}, {{ocean}}}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Some Properties of Sets
The order of elements in a set is unimportant.{a, b, c , d} = {d , a, b, c}
We can define (or test) sets for equality or inequality.{a, b} 6= {b}
We can define (or test) for membership with the ∈ operator4 ∈ {2, 4, 6, 8} 1 6∈ {a, b}
The elements of a set need not be the same “type”, but theyoften are.
T = {1, sally , red , r}We can count the number of elements in a finite set. It isdenoted with vertical bars | |
| S | = 4A set may be an element of (a member of) another set!
{1, {sam, july}, {{ocean}}}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Some Properties of Sets
The order of elements in a set is unimportant.{a, b, c , d} = {d , a, b, c}
We can define (or test) sets for equality or inequality.{a, b} 6= {b}
We can define (or test) for membership with the ∈ operator4 ∈ {2, 4, 6, 8} 1 6∈ {a, b}
The elements of a set need not be the same “type”, but theyoften are.
T = {1, sally , red , r}
We can count the number of elements in a finite set. It isdenoted with vertical bars | |
| S | = 4A set may be an element of (a member of) another set!
{1, {sam, july}, {{ocean}}}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Some Properties of Sets
The order of elements in a set is unimportant.{a, b, c , d} = {d , a, b, c}
We can define (or test) sets for equality or inequality.{a, b} 6= {b}
We can define (or test) for membership with the ∈ operator4 ∈ {2, 4, 6, 8} 1 6∈ {a, b}
The elements of a set need not be the same “type”, but theyoften are.
T = {1, sally , red , r}We can count the number of elements in a finite set. It isdenoted with vertical bars | |
| S | = 4
A set may be an element of (a member of) another set!{1, {sam, july}, {{ocean}}}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Some Properties of Sets
The order of elements in a set is unimportant.{a, b, c , d} = {d , a, b, c}
We can define (or test) sets for equality or inequality.{a, b} 6= {b}
We can define (or test) for membership with the ∈ operator4 ∈ {2, 4, 6, 8} 1 6∈ {a, b}
The elements of a set need not be the same “type”, but theyoften are.
T = {1, sally , red , r}We can count the number of elements in a finite set. It isdenoted with vertical bars | |
| S | = 4A set may be an element of (a member of) another set!
{1, {sam, july}, {{ocean}}}E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Subset Operator
Assume we have two sets A and B.
We say that A is a subset of B, written as A ⊆ B, if everymember of A is also a member of B.
We can also write this as A ⊆ B ≡ {a | a ∈ A→ a ∈ B}A is a proper subset of B, written A ⊂ B, if A ⊆ B andA 6= B.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Subset Operator
Assume we have two sets A and B.We say that A is a subset of B, written as A ⊆ B, if everymember of A is also a member of B.
We can also write this as A ⊆ B ≡ {a | a ∈ A→ a ∈ B}A is a proper subset of B, written A ⊂ B, if A ⊆ B andA 6= B.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Subset Operator
Assume we have two sets A and B.We say that A is a subset of B, written as A ⊆ B, if everymember of A is also a member of B.
We can also write this as A ⊆ B ≡ {a | a ∈ A→ a ∈ B}
A is a proper subset of B, written A ⊂ B, if A ⊆ B andA 6= B.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
What are operations?Set Equality and Set MembershipTesting Set PropertiesSubsets
Subset Operator
Assume we have two sets A and B.We say that A is a subset of B, written as A ⊆ B, if everymember of A is also a member of B.
We can also write this as A ⊆ B ≡ {a | a ∈ A→ a ∈ B}A is a proper subset of B, written A ⊂ B, if A ⊆ B andA 6= B.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
The Empty Setcontains no elements
The empty set is a unique set.
The empty set contains no elements.
The empty set is denoted ∅, or sometimes as {}.| ∅ | = 0
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
The Empty Setcontains no elements
The empty set is a unique set.
The empty set contains no elements.
The empty set is denoted ∅, or sometimes as {}.| ∅ | = 0
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
The Empty Setcontains no elements
The empty set is a unique set.
The empty set contains no elements.
The empty set is denoted ∅, or sometimes as {}.
| ∅ | = 0
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
The Empty Setcontains no elements
The empty set is a unique set.
The empty set contains no elements.
The empty set is denoted ∅, or sometimes as {}.| ∅ | = 0
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
The Universal Set
The Universal Set U is a set that contains all elements.
This set is often called the Domain of Discourse.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsCreating new sets from existing sets
A ∪ B, A union B (all the elements)
A ∪ B = {x | x ∈ A or x ∈ B}
A ∩ B, A intersect B (only the elements in common)
A ∩ B = {y | y ∈ A and y ∈ B}
A, complement of A (with respect to some Universe A ⊆ U)
A = {z ‖ z 6∈ A and z ∈ U}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsCreating new sets from existing sets
A ∪ B, A union B (all the elements)
A ∪ B = {x | x ∈ A or x ∈ B}
A ∩ B, A intersect B (only the elements in common)
A ∩ B = {y | y ∈ A and y ∈ B}
A, complement of A (with respect to some Universe A ⊆ U)
A = {z ‖ z 6∈ A and z ∈ U}
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsCreating new sets from existing sets
A ∪ B, A union B (all the elements)
A ∪ B = {x | x ∈ A or x ∈ B}
A ∩ B, A intersect B (only the elements in common)
A ∩ B = {y | y ∈ A and y ∈ B}
A, complement of A (with respect to some Universe A ⊆ U)
A = {z ‖ z 6∈ A and z ∈ U}E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsThe Power Set of a Set
The Power Set of a finite set A consists of all the subsets ofA.
It is denoted as either P(A) or 2A
P(A) = {S | S ⊆ A}Example : B = {a, b, c}P(B) = {∅, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, B}The empty set and the set itself are always elements of thepower set, and so |P(A)| = 2|A| (A is finite).
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsThe Power Set of a Set
The Power Set of a finite set A consists of all the subsets ofA.
It is denoted as either P(A) or 2A
P(A) = {S | S ⊆ A}Example : B = {a, b, c}P(B) = {∅, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, B}The empty set and the set itself are always elements of thepower set, and so |P(A)| = 2|A| (A is finite).
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsThe Power Set of a Set
The Power Set of a finite set A consists of all the subsets ofA.
It is denoted as either P(A) or 2A
P(A) = {S | S ⊆ A}
Example : B = {a, b, c}P(B) = {∅, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, B}The empty set and the set itself are always elements of thepower set, and so |P(A)| = 2|A| (A is finite).
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsThe Power Set of a Set
The Power Set of a finite set A consists of all the subsets ofA.
The empty set and the set itself are always elements of thepower set, and so |P(A)| = 2|A| (A is finite).
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsThe Power Set of a Set
The Power Set of a finite set A consists of all the subsets ofA.
It is denoted as either P(A) or 2A
P(A) = {S | S ⊆ A}Example : B = {a, b, c}P(B) = {∅, {a}, {b}, {c}, {a, b}, {b, c}, {a, c}, B}The empty set and the set itself are always elements of thepower set, and so |P(A)| = 2|A| (A is finite).
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsCartesian Product of 2 Sets
Cartesian product of two sets, A and B, written as A× B, isthe set of all ordered pairs (a, b), where the first element a isfrom set A, and the second element b is from the set B.
The Cartesian product is also called the cross product.
Question: How would you write this definition using formal setnotation? Answer: A× B = {(a, b) | a ∈ A, b ∈ B}Example: A = {4, 5}, B = {x , y , z}A× B = {(4, x), (4, y), (4, z), (5, x), (5, y), (5, z)}Why do you think it’s called “Cartesian”?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsCartesian Product of 2 Sets
Cartesian product of two sets, A and B, written as A× B, isthe set of all ordered pairs (a, b), where the first element a isfrom set A, and the second element b is from the set B.
The Cartesian product is also called the cross product.
Question: How would you write this definition using formal setnotation? Answer: A× B = {(a, b) | a ∈ A, b ∈ B}Example: A = {4, 5}, B = {x , y , z}A× B = {(4, x), (4, y), (4, z), (5, x), (5, y), (5, z)}Why do you think it’s called “Cartesian”?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsCartesian Product of 2 Sets
Cartesian product of two sets, A and B, written as A× B, isthe set of all ordered pairs (a, b), where the first element a isfrom set A, and the second element b is from the set B.
The Cartesian product is also called the cross product.
Question: How would you write this definition using formal setnotation?
Answer: A× B = {(a, b) | a ∈ A, b ∈ B}Example: A = {4, 5}, B = {x , y , z}A× B = {(4, x), (4, y), (4, z), (5, x), (5, y), (5, z)}Why do you think it’s called “Cartesian”?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set OperationsCartesian Product of 2 Sets
Cartesian product of two sets, A and B, written as A× B, isthe set of all ordered pairs (a, b), where the first element a isfrom set A, and the second element b is from the set B.
The Cartesian product is also called the cross product.
Question: How would you write this definition using formal setnotation? Answer: A× B = {(a, b) | a ∈ A, b ∈ B}Example: A = {4, 5}, B = {x , y , z}A× B = {(4, x), (4, y), (4, z), (5, x), (5, y), (5, z)}Why do you think it’s called “Cartesian”?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set PartitionExample
S is a deck (a set) of playing cards.
How many different ways can they be sorted into “piles” (or“bins”)?
Whare are the properties of these bins, regardless of how wesort the cards?
We have a certain number (≥ 1) of bins. The elements ineach bin all share the same common property.
Each bin is a subset of the original deck.
No card can be in more than one bin.
No cards get left out of the sort.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set PartitionExample
S is a deck (a set) of playing cards.
How many different ways can they be sorted into “piles” (or“bins”)?
Whare are the properties of these bins, regardless of how wesort the cards?
We have a certain number (≥ 1) of bins. The elements ineach bin all share the same common property.
Each bin is a subset of the original deck.
No card can be in more than one bin.
No cards get left out of the sort.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set PartitionExample
S is a deck (a set) of playing cards.
How many different ways can they be sorted into “piles” (or“bins”)?
Whare are the properties of these bins, regardless of how wesort the cards?
We have a certain number (≥ 1) of bins. The elements ineach bin all share the same common property.
Each bin is a subset of the original deck.
No card can be in more than one bin.
No cards get left out of the sort.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set PartitionExample
S is a deck (a set) of playing cards.
How many different ways can they be sorted into “piles” (or“bins”)?
Whare are the properties of these bins, regardless of how wesort the cards?
We have a certain number (≥ 1) of bins. The elements ineach bin all share the same common property.
Each bin is a subset of the original deck.
No card can be in more than one bin.
No cards get left out of the sort.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set PartitionExample
S is a deck (a set) of playing cards.
How many different ways can they be sorted into “piles” (or“bins”)?
Whare are the properties of these bins, regardless of how wesort the cards?
We have a certain number (≥ 1) of bins. The elements ineach bin all share the same common property.
Each bin is a subset of the original deck.
No card can be in more than one bin.
No cards get left out of the sort.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set PartitionExample
S is a deck (a set) of playing cards.
How many different ways can they be sorted into “piles” (or“bins”)?
Whare are the properties of these bins, regardless of how wesort the cards?
We have a certain number (≥ 1) of bins. The elements ineach bin all share the same common property.
Each bin is a subset of the original deck.
No card can be in more than one bin.
No cards get left out of the sort.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Set Union, Intersection, ComplementPower SetCartesian ProductPartition of a Set
Set PartitionDefinition
A is a nonempty set. Π(A) is called a partition A1, A2 . . . An of A,provided each of the following is true:
i.) Ai 6= ∅, 1 ≤ i ≤ n (all subsets are nonempty)
ii.) Ai ∩ Aj = ∅, 1 ≤ i 6= j ≤ n (all subsets are disjoint)
iii.)⋃n
i=1 Ai = A (no elements from A are left out)
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesSequences: just like in programming
A sequence of entities is a list of these entities in some order.
The sequence of numbers 7, 85, 22 is typically written byenclosing the sequence in parentheses: (7, 85, 22)Order matters in a sequence (7, 85, 22) 6= (22, 7, 85)but not in a set!Where have you used parentheses before?
arguments to functionsformal and actual parameters in programming languages
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesSequences: just like in programming
A sequence of entities is a list of these entities in some order.
The sequence of numbers 7, 85, 22 is typically written byenclosing the sequence in parentheses: (7, 85, 22)
Order matters in a sequence (7, 85, 22) 6= (22, 7, 85)but not in a set!Where have you used parentheses before?
arguments to functionsformal and actual parameters in programming languages
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesSequences: just like in programming
A sequence of entities is a list of these entities in some order.
The sequence of numbers 7, 85, 22 is typically written byenclosing the sequence in parentheses: (7, 85, 22)Order matters in a sequence (7, 85, 22) 6= (22, 7, 85)but not in a set!
Where have you used parentheses before?
arguments to functionsformal and actual parameters in programming languages
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesSequences: just like in programming
A sequence of entities is a list of these entities in some order.
The sequence of numbers 7, 85, 22 is typically written byenclosing the sequence in parentheses: (7, 85, 22)Order matters in a sequence (7, 85, 22) 6= (22, 7, 85)but not in a set!Where have you used parentheses before?
arguments to functionsformal and actual parameters in programming languages
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesTuples: a way to refer to sequences
A sequence may be finite or infinite (just like sets).
A finite sequence is called a tuple.
A finite sequence with k elements is called a k-tuple.
An ordered pair is actually a 2-tuple.
Example: (a, b, c, d) is a 4-tuple.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesTuples: a way to refer to sequences
A sequence may be finite or infinite (just like sets).
A finite sequence is called a tuple.
A finite sequence with k elements is called a k-tuple.
An ordered pair is actually a 2-tuple.
Example: (a, b, c, d) is a 4-tuple.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesTuples: a way to refer to sequences
A sequence may be finite or infinite (just like sets).
A finite sequence is called a tuple.
A finite sequence with k elements is called a k-tuple.
An ordered pair is actually a 2-tuple.
Example: (a, b, c, d) is a 4-tuple.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesTuples: a way to refer to sequences
A sequence may be finite or infinite (just like sets).
A finite sequence is called a tuple.
A finite sequence with k elements is called a k-tuple.
An ordered pair is actually a 2-tuple.
Example: (a, b, c, d) is a 4-tuple.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesTuples: a way to refer to sequences
A sequence may be finite or infinite (just like sets).
A finite sequence is called a tuple.
A finite sequence with k elements is called a k-tuple.
An ordered pair is actually a 2-tuple.
Example: (a, b, c, d) is a 4-tuple.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesOperations on more than two sets.
Superscripts on set names can simplify the same operation onmany (more than 2) sets.
Use superscript to indicate the “number of times”
Cartesian product:
k times︷ ︸︸ ︷A× A× . . .× A= Ak
Same operation on different sets. Give sets the same nameand add subscripts.
Sets S1, S2, . . . ,Sn
S = S1 ∪ S2 ∪ . . . ∪ Sn is abbreviated as S =⋃n
i=1 Si
Lower limit doesn’t have to be 1, upper limit doesn’t have tobe “n” it can be finite number, say 12, or infinite, ∞.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesOperations on more than two sets.
Superscripts on set names can simplify the same operation onmany (more than 2) sets.
Use superscript to indicate the “number of times”
Cartesian product:
k times︷ ︸︸ ︷A× A× . . .× A= Ak
Same operation on different sets. Give sets the same nameand add subscripts.
Sets S1, S2, . . . ,Sn
S = S1 ∪ S2 ∪ . . . ∪ Sn is abbreviated as S =⋃n
i=1 Si
Lower limit doesn’t have to be 1, upper limit doesn’t have tobe “n” it can be finite number, say 12, or infinite, ∞.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesOperations on more than two sets.
Superscripts on set names can simplify the same operation onmany (more than 2) sets.
Use superscript to indicate the “number of times”
Cartesian product:
k times︷ ︸︸ ︷A× A× . . .× A= Ak
Same operation on different sets. Give sets the same nameand add subscripts.
Sets S1, S2, . . . ,Sn
S = S1 ∪ S2 ∪ . . . ∪ Sn is abbreviated as S =⋃n
i=1 Si
Lower limit doesn’t have to be 1, upper limit doesn’t have tobe “n” it can be finite number, say 12, or infinite, ∞.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Sequences and TuplesOperations on more than two sets.
Superscripts on set names can simplify the same operation onmany (more than 2) sets.
Use superscript to indicate the “number of times”
Cartesian product:
k times︷ ︸︸ ︷A× A× . . .× A= Ak
Same operation on different sets. Give sets the same nameand add subscripts.
Sets S1, S2, . . . ,Sn
S = S1 ∪ S2 ∪ . . . ∪ Sn is abbreviated as S =⋃n
i=1 Si
Lower limit doesn’t have to be 1, upper limit doesn’t have tobe “n” it can be finite number, say 12, or infinite, ∞.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
DeMorgan’s LawsIn Set Theory
A and B are sets.
A ∪ B = A ∩ B
A ∩ B = A ∪ B
The same rules apply to programming! ∪ is logical “or”, and∩ is logical “and”.
How we can show this using Venn Diagrams?...
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
DeMorgan’s LawsIn Set Theory
A and B are sets.
A ∪ B = A ∩ B
A ∩ B = A ∪ B
The same rules apply to programming! ∪ is logical “or”, and∩ is logical “and”.
How we can show this using Venn Diagrams?...
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
DeMorgan’s LawsIn Set Theory
A and B are sets.
A ∪ B = A ∩ B
A ∩ B = A ∪ B
The same rules apply to programming! ∪ is logical “or”, and∩ is logical “and”.
How we can show this using Venn Diagrams?...
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
DeMorgan’s LawsIn Set Theory
A and B are sets.
A ∪ B = A ∩ B
A ∩ B = A ∪ B
The same rules apply to programming! ∪ is logical “or”, and∩ is logical “and”.
How we can show this using Venn Diagrams?...
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 1
{1} = 1 ?
false
| {1, {sam, july}, {{ocean}}} | = ? 3
| {∅} | = ? 1
3 ∈ {1, {3}, {{5}}} ? false
{3} ∈ {1, {3}, {{5}}} true
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 1
{1} = 1 ? false
| {1, {sam, july}, {{ocean}}} | = ?
3
| {∅} | = ? 1
3 ∈ {1, {3}, {{5}}} ? false
{3} ∈ {1, {3}, {{5}}} true
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 1
{1} = 1 ? false
| {1, {sam, july}, {{ocean}}} | = ? 3
| {∅} | = ?
1
3 ∈ {1, {3}, {{5}}} ? false
{3} ∈ {1, {3}, {{5}}} true
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 1
{1} = 1 ? false
| {1, {sam, july}, {{ocean}}} | = ? 3
| {∅} | = ? 1
3 ∈ {1, {3}, {{5}}} ?
false
{3} ∈ {1, {3}, {{5}}} true
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 1
{1} = 1 ? false
| {1, {sam, july}, {{ocean}}} | = ? 3
| {∅} | = ? 1
3 ∈ {1, {3}, {{5}}} ? false
{3} ∈ {1, {3}, {{5}}}
true
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 1
{1} = 1 ? false
| {1, {sam, july}, {{ocean}}} | = ? 3
| {∅} | = ? 1
3 ∈ {1, {3}, {{5}}} ? false
{3} ∈ {1, {3}, {{5}}} true
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 2
What are the elements of S = {i | 5 ≤ i ≤ 20} ?
{5, 6, . . . , 19, 20}S = {a, b} ⊂ {a, b} ? false
b ⊆ {b} ? false
For any set S , ∅ ⊆ S ? true (!!!)
∅ ⊂ P(∅) ? true
P(∅) = ? ...answer...?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 2
What are the elements of S = {i | 5 ≤ i ≤ 20} ?{5, 6, . . . , 19, 20}S = {a, b} ⊂ {a, b} ?
false
b ⊆ {b} ? false
For any set S , ∅ ⊆ S ? true (!!!)
∅ ⊂ P(∅) ? true
P(∅) = ? ...answer...?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 2
What are the elements of S = {i | 5 ≤ i ≤ 20} ?{5, 6, . . . , 19, 20}S = {a, b} ⊂ {a, b} ? false
b ⊆ {b} ?
false
For any set S , ∅ ⊆ S ? true (!!!)
∅ ⊂ P(∅) ? true
P(∅) = ? ...answer...?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 2
What are the elements of S = {i | 5 ≤ i ≤ 20} ?{5, 6, . . . , 19, 20}S = {a, b} ⊂ {a, b} ? false
b ⊆ {b} ? false
For any set S , ∅ ⊆ S ?
true (!!!)
∅ ⊂ P(∅) ? true
P(∅) = ? ...answer...?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 2
What are the elements of S = {i | 5 ≤ i ≤ 20} ?{5, 6, . . . , 19, 20}S = {a, b} ⊂ {a, b} ? false
b ⊆ {b} ? false
For any set S , ∅ ⊆ S ? true (!!!)
∅ ⊂ P(∅) ?
true
P(∅) = ? ...answer...?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 2
What are the elements of S = {i | 5 ≤ i ≤ 20} ?{5, 6, . . . , 19, 20}S = {a, b} ⊂ {a, b} ? false
b ⊆ {b} ? false
For any set S , ∅ ⊆ S ? true (!!!)
∅ ⊂ P(∅) ? true
P(∅) = ?
...answer...?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 2
What are the elements of S = {i | 5 ≤ i ≤ 20} ?{5, 6, . . . , 19, 20}S = {a, b} ⊂ {a, b} ? false
b ⊆ {b} ? false
For any set S , ∅ ⊆ S ? true (!!!)
∅ ⊂ P(∅) ? true
P(∅) = ? ...answer...?
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 3
Let A = {1, 2} and B = {3, 4}. Does A× B = B × A ?
no
How many sets are operated on?T =
⋃1≤i≤20 Si 20
If we define U =⋃j=20
j=1 Sj , does T = U ? yes
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 3
Let A = {1, 2} and B = {3, 4}. Does A× B = B × A ? no
How many sets are operated on?T =
⋃1≤i≤20 Si
20
If we define U =⋃j=20
j=1 Sj , does T = U ? yes
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 3
Let A = {1, 2} and B = {3, 4}. Does A× B = B × A ? no
How many sets are operated on?T =
⋃1≤i≤20 Si 20
If we define U =⋃j=20
j=1 Sj , does T = U ?
yes
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Your turn.Answer these, Part 3
Let A = {1, 2} and B = {3, 4}. Does A× B = B × A ? no
How many sets are operated on?T =
⋃1≤i≤20 Si 20
If we define U =⋃j=20
j=1 Sj , does T = U ? yes
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Same Operations, Different Viewpoint
A and B are sets, p and q are propositions, and x and y areboolean variables.
Set Theory Logic Software Hardware
A ∪ B (union) p ∨ q (or) x || y (or) p + q (or)
A ∩ B (intersection) p ∧ q (and) x && y (and) p · q (and)
A (complement) ¬p (not) !x (not) p (not)Note: in h/w, p · q is typically written as pq.Why do we have the same operator names in Logic and Software and(digital) Hardware ?
Because they are equivalent. All are derived from Set Theory. It justdepends on your point of view. Specifically, hardware and software areequivalent. (Embedded) systems engineers decide what to implement inhardware and in software. It’s a design tradeoff.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Same Operations, Different Viewpoint
A and B are sets, p and q are propositions, and x and y areboolean variables.
Set Theory Logic Software Hardware
A ∪ B (union) p ∨ q (or) x || y (or) p + q (or)
A ∩ B (intersection) p ∧ q (and) x && y (and) p · q (and)
A (complement) ¬p (not) !x (not) p (not)Note: in h/w, p · q is typically written as pq.Why do we have the same operator names in Logic and Software and(digital) Hardware ?Because they are equivalent. All are derived from Set Theory. It justdepends on your point of view.
Specifically, hardware and software areequivalent. (Embedded) systems engineers decide what to implement inhardware and in software. It’s a design tradeoff.
E. Wenderholm Set Theory
DefinitionDenotationOperations
Special SetsSet Operations that Create New Sets
TuplesDeMorgan’s Laws
Your Turn
Same Operations, Different Viewpoint
A and B are sets, p and q are propositions, and x and y areboolean variables.
Set Theory Logic Software Hardware
A ∪ B (union) p ∨ q (or) x || y (or) p + q (or)
A ∩ B (intersection) p ∧ q (and) x && y (and) p · q (and)
A (complement) ¬p (not) !x (not) p (not)Note: in h/w, p · q is typically written as pq.Why do we have the same operator names in Logic and Software and(digital) Hardware ?Because they are equivalent. All are derived from Set Theory. It justdepends on your point of view. Specifically, hardware and software areequivalent. (Embedded) systems engineers decide what to implement inhardware and in software. It’s a design tradeoff.