← Course overview and all lessons

Lesson 19 of 23 · 2:46

Explicit CM versus the repository’s CM-IR

Name the representation and output contract before discussing its behavior.

Keyboard: focus the player, then Space or K to play/pause and arrow keys to seek. Tab moves through the controls. Selectable captions replace the video's caption strip with the same timed text below.

In this lesson

  1. 0:00 · Why keep both a graph and a matrix?
  2. 0:23 · Read the expression tree
  3. 0:41 · Compile into a reusable graph
  4. 1:05 · Materialize with a declared layout
  5. 1:25 · Trace a graph computation into one cell
  6. 1:44 · Understand structural identity
  7. 2:06 · Your turn: classify the artifact
  8. 2:29 · Answer: the explicit matrix

Complete transcript

This transcript includes the answers to prediction prompts.

Show transcript

Why keep both a graph and a matrix? · 0:00

Why keep both a graph and a matrix? The repository can represent the same Boolean rule as a written expression, a compiled graph, or an explicit grid of answers. Our example takes exclusive-or between A AND B and C OR D. We will compare what these objects contain and learn which questions each representation can answer.

Read the expression tree · 0:23

The root operation is exclusive-or. Its left child computes A and B; its right child computes C or D. At the leaves are four variables. This tree describes how to compute a result. It does not yet contain a separate output cell for every possible assignment.

Compile into a reusable graph · 0:41

The public compile expression function builds a compiled object containing a node graph and an expression hash. The builder normalizes supported operations and can share repeated structure. Compilation prepares a representation that later evaluators or materializers can use; it is not itself a dense output matrix.

Materialize with a declared layout · 1:05

To make a dense CM, declare row variables A B and column variables C D. The repository uses false-first binary order, zero-zero through one-one. That differs from the paper’s true-first examples. Each output cell is now the rule evaluated at one complete assignment.

Trace a graph computation into one cell · 1:25

Choose A one, B one, C zero, D zero. AND produces one, OR produces zero, and the root exclusive-or produces one. This assignment selects row three and column zero in the repository layout. The same answer appears in that matrix cell.

Understand structural identity · 1:44

An expression hash helps identify a stored expression structure. It is not a proof that all logically equivalent formulas have the same key. For example, distributivity gives two equivalent formulas with different expression structures. Their truth tables agree, but the repository’s expression hashes differ in our checked example.

Your turn: classify the artifact · 2:06

Suppose you receive a sixteen-entry array together with the row and column variable lists. Is that an expression graph, an explicit CM, or merely a hash key? Identify the artifact by what it contains and what you can do with it.

Prediction pause: 8 seconds.

Answer: the explicit matrix · 2:29

The array with its axis lists is an explicit CM. It lets you address stored results. A graph stores operations and dependencies; a hash is an identity key. Next we will build this exact example using the actual public API, then validate every lookup.