Sets, Relations, and Discrete Functions
-
Describing a Set by Listing or by Rule
A set records which objects belong to it. An explicit list or a predicate over a universe can describe the same set.
-
Sets and Sequences as Mathematical Models
A sequence records positions and repeated elements. A set preserves membership while discarding both position and multiplicity.
-
Set Complements and the Universe
The complement of a set contains all elements of a declared universe outside the set. Changing the universe changes the answer.
-
Proving Equality with Membership Tests
Two sets are equal when every allowed element belongs to either both or neither. This can be proved with two subset directions.
-
Cartesian Products and Ordered Coordinates
A Cartesian product contains ordered pairs with one coordinate from each specified set.
-
Representing a Power Set with Bit Patterns
The power set contains all subsets of a set. Indexing elements lets a Boolean choice describe each subset uniquely.
-
Partitions as Disjoint Nonempty Buckets
A partition of a set assigns each item to exactly one nonempty subset and covers the full set.
-
Counting the Union of Two Sets
The size of a union is the sum of member counts minus the overlap because shared members appeared twice in that sum.
-
Inclusion–Exclusion for Three Sets
For three sets, adding sizes and subtracting pair overlaps removes a triple member once too often. Add the triple overlap back.
-
A Function as a Discrete Mapping
A function assigns exactly one result to each member of its declared domain. A table or formula can specify the assignments.
-
Domain, Codomain, and Image
A domain names allowed inputs, a codomain names the result set, and an image consists of results actually reached.
-
Injectivity and Losing Information
A mapping is injective when different inputs always produce different outputs. A collision provides a direct counterexample.
-
Surjectivity and the Choice of Codomain
A mapping is surjective when every element of the chosen codomain is reached by at least one input.
-
Inverting a Bijection
A bijection maps each output to exactly one input. Its inverse sends that output back to the unique originating input.
-
Order Matters in Function Composition
Composing mappings passes one result into another mapping. Reversing their order can change the result or make the composition undefined.
-
A Binary Relation as a Set of Pairs
A binary relation records which ordered pairs satisfy a relationship. One item can relate to several others or to none.
-
Testing Reflexivity, Symmetry, and Transitivity
These properties describe how a relation treats identical objects, reversing pairs, and composing consecutive pairs.
-
Equivalence Classes Formed by a Key
An equivalence relation groups each element with all elements related to it. Equal values of a key define one such relation.
-
Partial Order by Set Inclusion
Inclusion orders sets by containment. Some pairs are incomparable, even if every pair would be comparable in another ordering.
-
Dependencies as a Partial Order
A finite acyclic dependency graph can define a partial order by reachability, including the zero-length path at each node.
-
Reversing the Direction of a Relation
The inverse of a relation reverses each ordered pair. It remains a relation even if one reversed entry has several results.
-
Universal and Existential Conditions in Programs
A universal condition requires a predicate for every eligible element. An existential condition requires at least one witness.
-
Negating an All or Any Condition
Negating “all satisfy the rule” yields “some violates the rule.” Negating “some satisfies it” yields “all violate it.”
-
Implication, Its Converse, and a Counterexample
An implication says that whenever a premise holds its conclusion follows. Reversing the statement asks a separate question.
-
Using a Counterexample to Disprove an Algorithm Claim
A counterexample shows a single allowed input violating a claimed universal result.
-
Proving a Function by Cases
A case proof covers the legal input domain with cases and shows that the contract holds for every case.
-
Induction Over Iteration Counts
Induction can prove a state property for zero completed iterations and preserve it through an arbitrary next iteration.
-
The Pigeonhole Principle for Finite Labels
If more items than available categories are assigned to exactly one category each, at least one category receives multiple items.
-
An Invariant Under a Transformation
An invariant is a property preserved when a specified transformation is applied. It can summarize what many distinct states have in common.
-
Closure of a Set Under an Operation
A set is closed under an operation when applying it to allowed operands always returns an element of that set.