Lesson overview
Explain why formal notation, modelling and proof support reliable computing work.
Starter: make the model explicit
Before reading the worked example, write down the objects involved, the claim being made and the notation you expect to use. This prevents the common error of calculating before modelling.
Learning objectives
- Distinguish informal intuition from formal modelling.
- Connect formal topics to programming, data, networks and software design.
- Describe what good evidence looks like in a mathematical computing answer.
Learning outcomes
- By the end of this lesson, you can distinguish informal intuition from formal modelling.
- By the end of this lesson, you can connect formal topics to programming, data, networks and software design.
- By the end of this lesson, you can describe what good evidence looks like in a mathematical computing answer.
Key vocabulary
What this lesson is about
Formal foundations are the precise ideas that let computing move from informal descriptions to reliable systems. They include sets for collections, logic for conditions, functions for mappings, graphs for connections and proof for justification.
The aim is not to memorise isolated mathematics. It is to use formal ideas to make computing claims clearer, testable and less ambiguous.
Terms, acronyms and named methods
These are the phrases and named techniques used in this lesson. Read this section before the worked example so the notation and examples have a clear meaning.
Formal notation and definitions
How to read the symbols
Use the arrow symbol → to mean 'is translated into' or 'leads to'. In a formal model, state the domain first: the collection of inputs, users, records, states or cases that the claim is about.
First precise model: sets
A set is a well-defined collection of objects. In computing, sets are useful whenever we need to say exactly which records, users, states, files or permissions are included in a rule.
How to read the diagram
The rectangle is U, the universal set, meaning all users in this example. The left circle is A, users with admin rights. The right circle is P, users with paid accounts. The overlap is A ∩ P, users who are both admins and paid-account users.
The diagram supports understanding, but it is not the proof. A degree-level answer must still use the definitions: membership, subset, intersection, union and difference.
Worked interpretation
Scenario: A system rule says that only paid admins may approve refunds.
Formal model: Let U be all users, A be users with admin rights, and P be users with paid accounts. The eligible users are A ∩ P.
Reasoning: If x ∈ A ∩ P, then x ∈ A and x ∈ P. In plain English, x is an admin and x is a paid-account user. Therefore x satisfies both parts of the approval rule.
Computing meaning: The implementation should check both conditions. Checking only x ∈ A would allow unpaid admins; checking only x ∈ P would allow paid users without admin rights.
Degree-level reasoning
Formal methods support computing by making claims testable and assumptions inspectable. This matters in requirements, algorithms, data modelling, networking and security.
The habit to develop is not memorising symbols, but using symbols to remove ambiguity.
Do not stop at a correct-looking answer. State why the method is valid, whether the result depends on a hidden assumption, and what would count as a counterexample.
Worked formal model
This section shows the model, notation, calculation and interpretation as one worked answer. The notation is part of the reasoning, not decoration.
1. Context and objects
A password rule, a database filter and a network route all need exact meaning before they can be implemented safely.
Objects: a computing situation, the formal objects chosen to represent it, the assumptions, and the claim to be justified.
Model cue: Use a modelling chain: start with the real computing situation, name the formal objects, state assumptions, derive a conclusion, then translate that conclusion back into a computing decision.
2. Mathematical working
Plain text version
Model: real situation → formal objects → valid inference → computing decision. The arrow symbol → means 'leads to' or 'is translated into' in this learning route. A claim is useful only when its domain, assumptions and conclusion are explicit. A domain is the collection of objects the claim is about. Worked use: For a refund-approval rule, let U be all users, A be admin users and P be paid-account users. The policy 'only paid admins may approve refunds' is modelled by Eligible = A ∩ P. If x ∈ Eligible, then x ∈ A and x ∈ P, so x satisfies both required conditions.
3. How to read the working
- Read the first line as a modelling route: an informal scenario is turned into named objects, assumptions, a claim and then a justified computing decision.
- In the set definitions, U fixes the domain of users, A names admins and P names paid-account users; the vertical bar means 'such that'.
- Eligible = A ∩ P says a refund approver must belong to both sets. The implication Approve(u) ⇒ u ∈ Eligible is a rule about every user u, not one example.
- Check the implementation meaning: if a user can approve without being in both A and P, the formal rule and the program disagree.
4. Computing meaning and check
The formal model makes the boundary of a computing claim visible: which objects are in scope, which assumptions are being made, and which conclusion is justified.
Now check: Explain why the formal model would be wrong if the implementation checked only A or only P. State the counterexample user in each case.
Worked example
From scenario to formal reasoning
Scenario: A password rule, a database filter and a network route all need exact meaning before they can be implemented safely.
Method: Use the definitions and notation introduced above, then state what the result means in this computing scenario.
Reveal model answer
For a refund-approval rule, let U be all users, A be admin users and P be paid-account users. The policy 'only paid admins may approve refunds' is modelled by Eligible = A ∩ P. If x ∈ Eligible, then x ∈ A and x ∈ P, so x satisfies both required conditions.
Worked solution structure
How a strong answer should be written
- Define: State the domain and the objects under discussion. For this lesson, begin from Model: real situation → formal objects → valid inference → computing decision. The arrow symbol → means 'leads to' or 'is translated into' in this learning route.
- Apply: Use the relevant definition from orientation; do not rely on the diagram, wording or intuition alone.
- Check: Test a boundary case, counterexample candidate or representation limit.
- Conclude: Write one sentence that connects the formal result back to the computing scenario.
Common misconception
A common mistake is treating this module as separate from computing practice. The point is to make hidden assumptions visible before code or systems depend on them.
Guided practice
- Model a refund-approval rule with U as all users, A as admins and P as paid-account users. Write the eligible set and explain the implementation check.
- Give one counterexample user that would pass an admin-only check but fail the intended paid-admin rule.
- Write two sentences explaining why a formal model is stronger evidence than a vague statement such as 'check the right users'.
- Translate the formal result back into a coding decision: which two boolean conditions must be checked?
Quick checks
1. For 'only paid admins may approve refunds', which set describes eligible users?
2. Which user is a counterexample to an admin-only check?
Digital exam practice
Example exam task
A refund system should allow approvals only for users who are both admins and paid-account users. Define U, A and P, write the eligible set, state the permission implication, and give one counterexample for checking only A and one for checking only P.
Notation toolkit
Means: the universe or domain being discussed
How to use: State it before using any set such as A or P.
Means: the overlap: objects that are in both A and P
How to use: Use it when a rule requires two conditions at the same time.
Means: if P is true, then Q must be true
How to use: Use it to express a permission rule or required consequence.
What a good answer is expected to show
A strong answer for this lesson defines a computing situation, the formal objects chosen to represent it, the assumptions, and the claim to be justified, applies the orientation method with visible working, and finishes by interpreting the result in the computing scenario.
How to solve it
- Read the first line as a modelling route: an informal scenario is turned into named objects, assumptions, a claim and then a justified computing decision.
- In the set definitions, U fixes the domain of users, A names admins and P names paid-account users; the vertical bar means 'such that'.
- Eligible = A ∩ P says a refund approver must belong to both sets. The implication Approve(u) ⇒ u ∈ Eligible is a rule about every user u, not one example.
- Check the implementation meaning: if a user can approve without being in both A and P, the formal rule and the program disagree.
Model answer
Reveal model answer
Let U be all users, A be admin users and P be paid-account users. The eligible approvers are Eligible = A ∩ P. The permission rule is Approve(u) ⇒ u ∈ Eligible, so approval requires both admin status and paid-account status. An unpaid admin is a counterexample to checking only A; a paid non-admin is a counterexample to checking only P.
Practise next
- Model a refund-approval rule with U as all users, A as admins and P as paid-account users. Write the eligible set and explain the implementation check.
- Give one counterexample user that would pass an admin-only check but fail the intended paid-admin rule.
Self-marking criteria
- Defines U, A and P before using notation.
- Uses Eligible = A ∩ P or an equivalent condition.
- States that approval requires membership of both A and P.
- Gives two clear counterexample users.
- Connects the model to implementation checks.
Extension
Change one assumption in the worked scenario and decide whether the same method still applies. If it does not, name the exact point where the reasoning breaks.
Study route
Save one clean worked answer from this lesson. Include the problem statement, notation, working, final answer and a short note explaining the computing meaning of the result.
Next lesson: Mathematical Notation, Sets and Statements.
