Skip to main content

Guided Labs

Download the offline proof and discrete structures kit and extract it. It contains a starter, reference implementation, independent checker, demonstration and evidence template. Python 3.10+ and its standard library are sufficient. In the extracted proofs-discrete directory run:

python check.py starter
python run_labs.py starter

The unfinished starter fails intentionally. Implement one lab at a time; the README defines all arguments, outputs, ordering and invalid-input behavior. After your attempt, use python check.py reference to calibrate your setup. The reference is teaching material, not a submission to copy.

LabImplementWritten evidencePlanning time
1Boolean evaluator and complete truth tablesFour-row contrapositive proof; converse counter-row; finite coverage argument3–4 h
2Total-function report and relation-property witnessesNegate each definition; explain empty carriers and a collision4–6 h
3Typed composition, equivalence classes, partial-order reportPartition proof; minimal versus least; cover reconstruction4–6 h
4Full binary tree counts with an explicit stackStructural proof; shared-subtree fixture; unary-constructor variation3–4 h

For each lab: derive a fixture by hand, implement it, run checks, explain one failure, then change one assumption. Save output and reasoning in the supplied evidence template. If your first implementation is correct, critique a deliberate fault rather than inventing a personal mistake.

The checker uses all relations on carriers of sizes zero through three, all small total functions through three inputs/outputs, all pairs of two-element relations for composition, tree shapes through five internal nodes, and invalid inputs. Passing these finite checks supports the implementation; the written proofs still establish the general mathematical claims.

The full API deliberately validates branches that Boolean short-circuit execution could skip. These are pure finite mathematical expressions. Software expressions with side effects, exceptions or divergence require a richer model.

Before the capstone, read Proof and Model Contracts. The demonstration prints a worked workflow fixture; attempt the project independently before consulting that implementation.