0

# Switch It On

### Creating Composition With Switch Statements

$$(\textbf{A}^n)_\alpha=\Big(\big((A_0)_\mathtt{0x1},(\textbf{A}^n)_\alpha\big|_{A_0=0}\big)_\mathtt{0x8},\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0x8}\Big)_\mathtt{0xE}$$

#### Derivation

1. Start by defining a switch statement
$(\textbf{A}^n)_\alpha=\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=0},(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0xE4}$
2. Define an equivalent composition with $\mathtt{0xE}$ for the principal operator.
$\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=0},(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0xE4}=$

$=\Big(\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=0},(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0x44},\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=0},(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0xA0}\Big)_\mathtt{0xE}$

3. Simplify the expression
$\Big(\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=0},(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0x44},\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=0},(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0xA0}\Big)_\mathtt{0xE}=$

$=\Big(\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=0}\big)_\mathtt{0x4},\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0x8}\Big)_\mathtt{0xE}$

4. Negate $A_0$ in the first component to make that component a conjunction.
$\Big(\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=0}\big)_\mathtt{0x4},\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0x8}\Big)_\mathtt{0xE}=$

$\Big(\big((A_0)_\mathtt{0x1},(\textbf{A}^n)_\alpha\big|_{A_0=0}\big)_\mathtt{0x8},\big(A_0,(\textbf{A}^n)_\alpha\big|_{A_0=1}\big)_\mathtt{0x8}\Big)_\mathtt{0xE}$