Skip to main content

Code Katas

Use the runnable labs; the earlier 20-minute limits were unsuitable for a first implementation with validation and proof work. Lab hours are already counted in the module estimate.

P18 — Explain a witness. For each failed relation property, turn the tuple returned by your program into a full sentence stating the premises and the violated conclusion. Change the carrier while keeping the pairs: can reflexivity change? Explain before running.

P19 — Empty and malformed cases. Predict empty-to-empty function classification, the empty relation's properties, and a constant formula's zero-variable truth table. Supply one invalid input for each API family and explain why rejecting it differs from reporting a false mathematical property.

P20 — Challenge your checker. Introduce one fault in your own implementation: reverse implication, confuse antisymmetry with asymmetry, choose the first minimal element as least, or count shared tree objects once. Record a fixture that detects it and explain the violated contract. Restore the correct implementation afterward.

Feedback is in Practice Solutions. If using another language, port the contracts and independently derived fixtures and include the compiler/runtime version and commands. A translation still needs review.