4A4. πŸ€– Case Study: Boolean Algebra - JulTob/Mathematics GitHub Wiki

We will explore abstract algebra concepts step by step using Boolean Algebra as our case study. 🎲✨

What is Boolean Algebra?

🧩 The Light Switch Game

🎯 Understand how Boolean Algebra models binary operations.

πŸ’‘ You enter a mysterious room with two light bulbs πŸ’‘πŸ’‘ and two switches πŸ”³πŸ”³.

  • Each switch has two states: ON (1)[πŸ”²] or OFF (0)[πŸ”³].

  • The room follows a strange logic:

    1. If either switch is ON, the red light πŸ”΄ turns ON.
    2. If both switches are ON, the green light 🟒 turns ON.
    3. The lights turn off if these conditions don't apply.

πŸ€” Question: What kind of operation describes this behavior?

πŸ“Œ Defining the Boolean Set

The light switch system follows a binary structure:

\color{gold}
B=ο½›0,1}

where:

  • πŸ”³ 0 means OFF,
  • πŸ”² 1 means ON.

βœ… Boolean algebra operates on just two values: $ο½›0,1}$ .

πŸ“Œ Boolean Operations

The room follows two main rules:

  • 1️⃣ πŸ”΄ The "OR" Switch (Logical OR $∨$ )
    • The light turns on if at least one switch is ONπŸ”².
  • 2️⃣ 🟒 The "AND" Switch (Logical AND $∧$ )
    • The light turns on only if both switches are ONπŸ”².
πŸ”³ Switch 1 πŸ”³ Switch 2 πŸ”΄ Light (A OR B) 🟒 Light (A AND B)
πŸ”³ 0 πŸ”³ 0 ⚫ 0 ⚫ 0
πŸ”³ 0 πŸ”² 1 πŸ”΄ 1 ⚫ 0
πŸ”² 1 πŸ”³ 0 πŸ”΄ 1 ⚫ 0
πŸ”² 1 πŸ”² 1 πŸ”΄ 1 🟒 1

πŸ“Œ Boolean Algebra as a Lattice

🧩 The Hierarchy of Truth

🎯 Understand how Boolean Algebra forms a lattice, a fundamental structure in algebra.

πŸ“– The Hierarchy of Truth πŸ“œ

πŸ“Œ What is a Lattice?

A lattice is a set where every pair of elements has:

  • πŸ”Ί A Greatest Lower Bound (GLB, also called meet, denoted $β‹€$)
  • πŸ”» A Least Upper Bound (LUB, also called join, denoted $⋁$ )

In Boolean Algebra:

  • $A∧B$ gives the "greatest" truth that is common to both statements.
  • $A∨B$ gives the "least" truth that includes both statements.

πŸ“’ Question:

  • What happens when you combine the statements "It is raining" and "It is cloudy" using AND $(∧)$? What happens when you combine them using OR $(∨)$?

Each statement (A, B, etc.) forms part of a hierarchical structure, where:

  • $0$ (false) is the lowest element.

  • $1$ (true) is the highest element.

  • $A∨B$ is the lowest truth that contains A and B.

  • $A∧B$ is the highest truth that is contained in both A and B.

  • πŸ“’ Check if $A∧B=B∧A$ (Commutativity).

  • πŸ“’ Check if $A∧(B∧C)=(A∧B)∧C$ (Associativity).

Why Boolean Algebra Forms a Lattice

Boolean Algebra satisfies lattice properties because:

  • 1️⃣ It is a set B={0,1}B={0,1} with two operations $∧$ and $∨$.
  • 2️⃣ Every pair of elements has a GLB (meet) and LUB (join).
  • 3️⃣ It satisfies
    • Associativity: $\frac{A∧(B∧C)=(A∧B)∧C}{A∨(B∨C)=(A∨B)∨C}$
    • Commutativity: $\frac{A∧B=B∧A }{A∨B=B∨A }$
    • Idempotency: $\frac{A∧A=A }{A∨A=A }$

This is a fundamental structure in logic, computing, and abstract algebra!

πŸ“Œ Boolean Algebra as a Group?

A group is a set with a single binary operation that satisfies:

  • Closure: $aβˆ—b$ is still in the set.
  • Associativity: $(aβˆ—b)βˆ—c=aβˆ—(bβˆ—c)$.
  • Identity Element: There exists an element $e$ such that $aβˆ—e=a$.
  • Inverses: Every element has an inverse $a^{βˆ’1}$ such that $aβˆ—a^{βˆ’1}=e$.
πŸ”³ A πŸ”³ B πŸ”΄ A OR B 🟒 A AND B A XOR B
πŸ”³ 0 πŸ”³ 0 ⚫ 0 ⚫ 0 ⚫ 0
πŸ”³ 0 πŸ”² 1 πŸ”΄ 1 ⚫ 0 🟑 1
πŸ”² 1 πŸ”³ 0 πŸ”΄ 1 ⚫ 0 🟑 1
πŸ”² 1 πŸ”² 1 πŸ”΄ 1 🟒 1 ⚫ 0
  • AND:

    • Closure βœ… (only 0 and 1 appear)
    • Associativity βœ… $(A∧B)∧C=A∧(B∧C)$
    • Identity? ❌ There is no element $e$ such that $A∧e=A$ for all $A$.
    • Inverses? ❌ There is no inverse for $1$ (since $1∧x=1$ has no solution for $x$).
    • 🚨 Boolean Algebra under AND is NOT a group.
  • OR:

    • Closure βœ… (only $0$ and $1$ appear)
    • Associativity βœ… $(A∨B)∨C=A∨(B∨C)$
    • Identity? ❌ There is no element $e$ such that $A∨e=A$ for all $A$.
    • Inverses? ❌ No inverse for $0$ (since $0∨x=0$ has no solution for $x$).
  • XOR

    • βœ… Closure

    • βœ… Associativity

    • βœ… Identity: $0$ since $AβŠ•0$ = A$

    • βœ… Inverses: $AβŠ•A=0$ (so every element is its own inverse!)

    • πŸ”₯ Boolean Algebra under XOR is a Group! In fact, it forms an Abelian group of order 2 (isomorphic to $β„€β‚‚$​).