SRAI Book 1 · Chapter 2 · PU-B01-C02

Sets, Logic, Relations and Functions

Sets determine what belongs. Logic determines truth conditions. Relations determine what is connected. Functions determine how declared inputs map to outputs. Lesson 2 connects these foundations to data filters, databases, knowledge systems, algorithms and transparent decision rules.

01 / LEARNING OUTCOMES

Make categories, rules and mappings explicit.

  1. Distinguish membership from subsethood.
  2. Compute and interpret core set operations.
  3. Evaluate logical connectives and material implication.
  4. Distinguish relations, partial functions and total functions.
  5. Translate predicates into reproducible filters.
  6. Document universes, domains, codomains, missing-data rules and decision reasons.

02 / FOUNDATIONAL STRUCTURE

Four ideas organise much of data and computation.

01

Sets

Declare what belongs to a collection and the universe within which membership is judged.

02

Logic

State truth conditions and make decision rules inspectable.

03

Relations

Represent declared connections between elements without assuming a unique output.

04

Functions

Map each declared input to exactly one output in a stated codomain.

03 / SET OPERATIONS

Membership rules become reproducible operations.

For sets A and B, the notebook verifies union, intersection, difference, complement relative to a declared universe, and Cartesian product.

The universe is part of the specification. Without it, a complement is ambiguous and the resulting analytical claim cannot be defended.

CORE NOTATION
UnionA ∪ B
IntersectionA ∩ B
DifferenceA ∖ B
Cartesian productA × B

Every operation is checked against explicit expected results.

RELATION

A connection may be one-to-many, many-to-one or incomplete.

A relation records which ordered pairs belong. It does not automatically guarantee a unique output for every input.

FUNCTION

Every declared input has exactly one output.

Totality and uniqueness are obligations that must be tested—not merely assumed from a label or data structure.

04 / DEFENSIBLE DECISION RULES

A transparent rule records both the outcome and why it follows.

  • Declare the universe and eligibility population.
  • State predicates and truth conditions explicitly.
  • Define treatment of missing and exceptional values.
  • Separate a relation from a function claim.
  • Verify totality and uniqueness where required.
  • Preserve reasons so decisions can be reviewed.

VIDEO LESSON

Watch the complete Lesson 2 presentation.

Open on YouTube ↗

CONTROLLED RESOURCES

Read, reproduce, practise and review.

View the complete GitHub production unit ↗