Skip to content

Set Operations

Set operations define how two result sets are combined, intersected, or compared inside relational classifications.

In Minyu, a set is a collection of row identities (id) originating from the same table.
Set operations operate purely on these row identities.

Core Set Properties in Minyu

  • No duplicates
    Row identity is defined by id. A row can only occur once in a set.

  • Type safety
    Set operations are only valid between sets originating from the same table.

Union (A ∪ B)

The union contains all rows that exist in either set A or set B.

  • Minyu meaning: Rows matching Classification A OR Classification B.

Visualization

Comparison

Set Result
Set A {1, 2, 3, 4}
Set B {3, 4, 5, 6}
Union (A ∪ B) {1, 2, 3, 4, 5, 6}

Intersection (A ∩ B)

The intersection contains only rows that exist in both sets.

  • Minyu meaning: Rows that match Classification A AND Classification B.

Visualization

Comparison

Set Result
Set A {1, 2, 3, 4}
Set B {3, 4, 5, 6}
Intersection (A ∩ B) {3, 4}

Difference (A − B / B − A)

The difference contains rows that exist in one set but not the other.

  • Minyu meaning: Exclusion-based filtering.

Visualization


Comparison

Operation Result
Difference (A − B) {1, 2}
Difference (B − A) {5, 6}

Identity Selection (UI: One Set A or B)

This is not a mathematical binary operation.
It represents selecting exactly one classification set without combining it.

It exists purely because the UI allows selecting a single Venn area.

  • Minyu meaning: Pass-through of one classification result set without modification.

Visualization

Comparison

Selection Result
All in A {1, 2, 3, 4}
All in B {3, 4, 5, 6}

Symmetric Difference (A Δ B)

The symmetric difference contains rows that exist in either A or B, but not both.

  • Minyu meaning: Exclusive classification matching.

Visualization

Comparison

Operation Result
Symmetric Difference (A Δ B) {1, 2, 5, 6}

Usage in Minyu

Set operations are used in relational and logical classifications.

They are selected visually using Venn diagrams and control how multiple classification result sets are combined into a final evaluated row set.