Set Operators and Functions
Sets are entered as a list of elements separated by commas and enclosed in braces. For example, the empty set is entered as {}. Ellipses can be used to shorten the entry of sets. For example,
{1,...,10}
simplifies to
{1,2,3,4,5,6,7,8,9,10}
and
{1,3,...,10}
simplifies to
{1,3,5,7,9}
Use MEMBER? to test for set membership. If u is an expression and v is a set or vector, MEMBER?(u, v) returns true if u is a member of v; otherwise it returns false. For example,
MEMBER?(2*x, {x, x+x, x^2})
simplifies to true.
Set operators make it possible to combine sets. The following set operators are built into Derive:
• s` is the complement of s. ` is a postfix operator. The complement operator can be entered by clicking on the ` on the math symbol toolbar or by typing ` on the keyboard. Derive just uses the complement operator for algebraically simplifying expressions involving sets, since the complement of a finite set is not representable. For example,
s``
simplifies to s and
(s UNION t)`
simplifies to
s` ∩ t`
• s ∩ t is the intersection of s and t. ∩ is a binary infix set operator. The intersection operator can be entered by clicking on the ∩ on the math symbol toolbar, by pressing Ctrl+N, or by typing INTERSECTION. For example,
{1,3,5,7,9} INTERSECTION {2,3,5,8,13}
simplifies to
{3,5}
• s ∪ t is the union of s and t. ∪ is a binary infix set operator. The union operator can be entered by clicking on the ∪ on the math symbol toolbar, by pressing Ctrl+U, or by typing UNION. For example,
{1,3,5,7,9} UNION {2,3,5,8,13}
simplifies to
{1,2,3,5,7,8,9,13}
• s \ t is the set difference of s and t (i.e. those elements of s not in t). The difference operator can be entered by clicking on the \ on the math symbol toolbar or typing \ on the keyboard. For example,
{1,...,10}\{2,3,5,7}
simplifies to
{1,4,6,8,9,10}
As with the Numerical OperatorsNumerical_Operators, you can use parentheses to control the order in which set operators are applied. In the absence of parentheses, set operators with higher precedence are applied before those with lower precedence. The set operators above are listed in order of decreasing precedence. For example, entering
r` ∪ s ∩ t
is equivalent to entering
(r`) ∪ (s ∩ t)
Expressions involving set operators may have many logically equivalent forms. Derive uses the laws of Boolean algebra to simplify expressions involving sets into simpler ones that are equivalent. The following identities, valid for any sets r, s, and t, are among those used to simplify expressions involving ∩ and ∪:
r ∩ s ⇐⇒ s ∩ r
r ∪ s ⇐⇒ s ∪ r
r ∩ (s ∩ t) ⇐⇒ (r ∩ s) ∩ t
r ∪ (s ∪ t) ⇐⇒ (r ∪ s) ∪ t
(r ∩ s) ∪ (r ∩ t) ⇐⇒ r ∩ (s ∪ t)
(r ∪ s) ∩ (r ∪ t) ⇐⇒ r ∪ (s ∩ t)
The first two identities indicate that ∩ and ∪ are commutative. The second two indicate that ∩ and ∪ are associative. The last two indicate that ∩ distributes over ∪, and that ∪ distributes over ∩. To simplify expressions involving sets, Derive applies the last two identities in the left-to-right direction.
The following identities are among those used to simplify expressions involving the ` complement operator:
s`` ⇐⇒ s
(s ∩ t)` ⇐⇒ s` ∪ t`
(s ∪ t)` ⇐⇒ s` ∩ t`
The last two identities, called De Morgan's laws, allow the complement operator to be distributed over the intersection and union operators. To simplify expressions involving sets, Derive repeatedly applies the above rules to force the complement operator to the lowest level.
Use the function POWER_SET to generate the power set (i.e. all the subsets) of a set. POWER_SET(s) simplifies to all the subsets of s. For example,
POWER_SET({a, b, c})
simplifies to
{{}, {c}, {b}, {b, c}, {a}, {a, c}, {a, b}, {a, b, c}}
POWER_SET(s,n) simplifies to all the subsets of s having exactly n elements. For example,
POWER_SET({a, b, c}, 2)
simplifies to
{{b, c}, {a, c}, {a, b}}
In Derive sets of ordered pairs can be considered to define a function. In general, if u is a set of vectors and s equals the first element of one of the vectors, then u↓s simplifies to the second element of the vector. The subscript operator can be entered by clicking on the ↓ on the math symbol toolbar or by typing SUB. For example,
{[2, 3], [3, 5], [1, 7]} SUB 2
simplifies to 3.
The product of two sets simplifies to the Cartesian product (also called the outer product) of the sets. For example,
{a, b}*{1, 2}
simplifies to
{[a, 1], [a, 2], [b, 1], [b, 2]}
Other Built-in Functions and ConstantsBuilt_in_Functions_and_Constants
Created with the Personal Edition of HelpNDoc: Easily create HTML Help documents