23 lessons · about 71 minutes of video
Correspondence Matrices: From Logic to Code
Build, transform and verify Boolean rules with correspondence matrices, then use them in Python. Follow the course in order or return to a particular construction.
Start with basic Boolean values and operators. The final five lessons use Python and a checkout of the CM_Computation repository; the earlier lessons can be followed on paper.
1. Foundations and layouts
Turn a truth table into a labelled matrix, build larger rules, and change their layout.
- From truth tables to operator CMsRead a CM in numeric and bracketed-operator notation.3:49
- Build CMs from four basis matricesBuild a numeric basis matrix and connect it to its operator symbol.2:29
- Calculate a CM measurementCompute both groupings of ⟨0|[⇕]|1⟩ using AND and XOR.3:39
- Derive the paper’s implication exampleDerive the page-7 identity, including intermediate rows and simplification.3:42
- Expressions first, values secondEvaluate an expression-valued LM and distinguish it from a numeric CM.3:05
- Two logical matrices become a 4×4Expand a tensor product and identify its full row and column components.2:58
- Build and check a four-variable ruleConstruct the paper example and verify a cell directly from its Boolean rule.3:30
- Find a cell in the repository layoutSplit an assignment, convert binary groups to indices, and check the stored output.3:09
- Change the layout, keep the functionTrack one assignment through 4×4, 2×8, and 8×2 layouts.3:13
2. Matrix operations
Transpose, negate, compose and factor; connect numeric and formula-valued matrices.
- Swap operands by transposing a CMExplain a transpose with its operand order and labelled axes.2:41
- Negate an input, or negate the outputDistinguish entry complement from row and column permutations.2:42
- Compose and decompose over XORUse XOR composition with aligned matrices and explicit overlap checks.2:51
- Remove shared features with a CM quotientCompute a quotient as entrywise A∧¬B and preserve its order.2:27
- Combine rules with a shared ordered basisNormalize order and negations, then compose and verify the result.2:36
- Complement and factor logical matricesKeep symbolic factors, entrywise operations and valuation separate.3:02
- Measure with a logical matrixCompute the intermediate vectors; distinguish matched constants from general formulas.2:54
- Generalize the tensor constructionGeneralize tensors by tracking factors, axis order and assignment count.3:00
- Transform and combine larger CMsAlign axes, apply the outer rule entrywise, and verify all assignments.2:44
3. From mathematics to code
Use the public Python API, verify a complete example, and compare output contracts fairly.
- Explicit CM versus the repository’s CM-IRName the representation and output contract before discussing its behavior.2:46
- Build, query and validate a CM in codeBuild through the public API and validate against a separate scalar oracle.3:15
- Packed evaluation, execution choices and output costDistinguish representation, execution strategy and unavoidable output work.3:48
- When preparation pays: a fair comparisonEvaluate preparation tradeoffs with declared costs and matching output contracts.2:39
- A small end-to-end access-policy exampleBuild a bounded CM application with explicit inputs, outputs and exhaustive verification.3:35

