AI curriculum
Course outline for Formal Methods for Reliable AI Systems
Tests check selected executions. Formal methods make requirements and assumptions precise so that behavior can be explored or claims proved. Specify a small shared resource controller, find and correct a counterexample with TLA+ and TLC, and complete a small checked proof in Lean. Connect these methods to reliable software and AI-system control without claiming to prove generated answers true.
Formal Methods for Reliable AI Systems Course Objectives
- Translate a requirement into states, transitions, assumptions, and invariants.
- Run a finite TLA+ model with TLC and correct a counterexample.
- Complete and check a small Lean proof with explicit assumptions.
- Distinguish safety, progress, model exploration, proof, and implementation evidence.
Pre-requisites
- Describe small programs, state changes, and failure cases.
- Read Boolean conditions, sets, and simple logical statements.
- Programming Language Concepts for AI Engineers or equivalent program-design experience is recommended; Software Engineering Foundations for AI Engineers adds testing context.
- Concurrency examples are introduced here; no AI or theorem-prover experience is required.
Before this course
Complete the required courses or bring equivalent experience. Recommended courses add useful depth; they are not enrolment gates.
No prerequisite course is required. The entry skills above still apply.
Recommended preparation
Readiness checks
- Describe small programs, state changes, and failure cases.
- Read Boolean conditions, sets, and simple logical statements.
- Programming Language Concepts for AI Engineers or equivalent program-design experience is recommended; Software Engineering Foundations for AI Engineers adds testing context.
- Concurrency examples are introduced here; no AI or theorem-prover experience is required.
Can describe small programs, state changes, and failures and read Boolean conditions, sets, and simple logic; concurrency is introduced here and no theorem-prover experience is required.
Find your place in the learning mapLab Setup
Delivery requirements: the following environment, materials, access, and exercise timing must be prepared and verified before delivery. This outline does not certify that a lab package is ready.
Verified TLA+/TLC and Lean environments, with setup completed before guided hours. Exact stable versions and installation instructions must be confirmed before delivery. Small model and proof scaffolds are required; screenshots alone do not replace running the tools. No model API or production system is needed.
Detailed Course Outline
Module 1: Precise requirements and state models (2 hours)
- Requirements and assumptions: Translate informal requirements into explicit claims with stated environmental assumptions.
- State models: Describe states, initial conditions, transitions, and reachable executions of a controller.
- Invariants and safety: Invariants and safety properties in a shared-resource example.
- Progress and fairness: Explain progress properties and their dependence on scheduling assumptions and fairness.
Practical outcome: Write a small state model and explain what its properties require.
Module 2: Model checking with TLA+ (2 hours)
- TLA+ specifications: TLA+ state variables, initial predicates, and next-state actions.
- TLC configuration: TLC configuration, finite model instances, and invariant checks.
- Counterexample exploration: Run the checker and read a counterexample to a stated property.
- Correcting a transition: Correcting a transition and rerunning the same checks.
- Distributed interleavings: Explore interleavings, delayed messages, and assumptions about a distributed system.
Practical outcome: Produce actual before-and-after checker results for a corrected model.
Module 3: Checked proofs with Lean (2 hours)
- Proof goals: Identify propositions, explicit assumptions, and proof goals before checking a proof.
- Checked logical steps: A small proof from definitions and checked logical steps.
- Lean proof scaffolds: Completing a proof scaffold and checking it with Lean.
- Proof and exploration: Compare a checked proof with finite state-space exploration and its bounds.
- Guarantees and implementation boundaries: Transfer to software and AI controls: guarantees and unproved boundaries.
Practical outcome: Complete a small Lean proof and explain what it does not establish.
Practical exercise
- Model a small shared-resource controller and state a mutual-exclusion invariant. Run a deliberately faulty finite model, explain its counterexample, correct it, and rerun the check. Complete a separate elementary Lean proof. State the bounds, assumptions, and implementation questions not settled by either result.
What you will produce
Correct a TLA+/TLC counterexample and complete a small checked Lean proof while stating the limits of both results.
How the work is checked
- The specification expresses the requirement rather than one successful trace.
- Checker records show the failed property and the corrected model's result.
- A progress claim identifies its scheduling assumptions.
- Lean accepts the completed proof without `sorry` or an added axiom.
- The explanation separates checked properties from real implementation behavior.
Six guided hours retain actual TLA+/TLC and Lean tool experiences. Demonstrations, practice, feedback, and questions are included; breaks and pre-course setup are outside the total. This is an introduction to two verification methods, not proficiency in either language. The Lean proof is deliberately smaller than the shared-resource controller model. Checked properties do not establish that generated answers are true or that an implementation matches its model. Exact stable versions, environments, and scaffolds require verification before delivery.
When another approach is better
- Use ordinary testing to check selected implementations; a checked model does not replace implementation evidence.
- Use specialist formal-methods training for larger proofs or production verification.
How we train
Contact us for full course details, including duration, delivery options and lab requirements.
Ask about exercises, instructor feedback and the prior knowledge you need. Tool-specific courses marked provisional may become modules in a broader course.
Discuss your learning goals