What Happens When the Correct Rule Changes at a Boundary? Teach learners to identify the conditions that select a rule, test the boundary between cases and verify that every admissible input receives the intended result. AI can generate conditional formulas quickly, but learners need to distinguish a correct formula from a correct formula applied in the wrong region.
This international coursework lab uses an invented points-allocation exercise to develop piecewise reasoning. Learners examine an integer-domain tiered function, compare it with a retroactive threshold rule, extend the comparison to continuous models and test a changed problem. The lesson sequence is a proposed educational design, not a validated intervention; it does not assume that future superintelligence already exists.
- Define the input domain and each condition.
- Separate a marginal tier from an all-input threshold.
- Test values immediately below, at and above a boundary.
- Check whether cases overlap or leave gaps.
- Translate words into a piecewise formula and back.
- Solve a changed rule and explain its assumptions.
Choose your reading route
- Understand the capability
- Work through the example
- Identify failure modes
- Test independent transfer
- Four-week coursework plan
Coursework series: Quantifier and Scope Lab · Function and Inverse Mapping Lab · Boundary Testing Lab · Equivalence and Transformation Lab · Vocabulary Coding and Engineering
Continue this coursework series: Piecewise Rule Lab (this article) · Mixture and Concentration Lab · Version and Merge Studio · Questionnaire Design Studio
Full chapter index
Chapters 1–5
Chapters 6–10
Chapters 11–15
Chapters 16–20
Chapters 21–25
Chapter 26
1. A correct calculation can answer the wrong case
An assistant may correctly multiply an input by a stated rate and still return an incorrect result because the rate applies only within one region. Conditional rules occur in mathematics, computer programs, games and administrative instructions. Their meaning depends on both the operation and the condition under which it applies.
This lab teaches learners to inspect the complete rule before calculating. A good answer must show that the selected case covers the input and that the stated operation is actually the one associated with it.
2. Define a piecewise function
A piecewise function assigns outputs using different expressions on different parts of its domain. Its cases must collectively cover the intended domain, and any overlapping cases must give compatible outputs if the rule is to define a single-valued function.
For a classroom exercise, the simplest convention is a partition into nonoverlapping cases. A student should be able to draw a number line marking the regions and identify which boundary belongs to which region. The formula alone is not the whole definition.
Contents · Previous chapter · Next chapter
3. Vocabulary Coding and Engineering: preserve the conditions
The lab uses threshold for a specified boundary, tier for a region with its own calculation, inclusive for a boundary that belongs to a region, and exclusive for one that does not. Marginal rate means the contribution of an additional unit within a particular tier of the toy rule.
Within eduKate’s proposed Vocabulary Coding and Engineering framework, these terms help preserve meaning as a rule is translated between ordinary language, mathematical notation and software. The word over should not silently become at least; first units should not become all units.
Related framework: Vocabulary Coding and Engineering.
Contents · Previous chapter · Next chapter
4. The fictional points-allocation exercise
A fictional classroom activity awards abstract points according to a nonnegative integer number n of completed practice cards. The first five cards receive two points each. Every additional card receives three points. No real grades, money or educational rewards are involved.
The task is to calculate the total points for any allowed n. The teacher deliberately chooses a small threshold so learners can inspect every case near it and distinguish an additional-card rule from a rule that changes the rate of all cards.
Contents · Previous chapter · Next chapter
5. Calculate the first tier
For n from zero through five, every completed card receives two points. The function is P(n) = 2n on this region. It gives P(0) = 0, P(3) = 6 and P(5) = 10.
The phrase first five does not mean that exactly five cards are required before points can be earned. It identifies which cards are assigned the first-tier rate. A learner should verify the domain and interpret the zero case rather than start the formula at one by habit.
Contents · Previous chapter · Next chapter
6. Calculate the additional-card tier
For n greater than five, the first five cards contribute ten points. The remaining n − 5 cards contribute three each. Thus P(n) = 10 + 3(n − 5) = 3n − 5 for integers n ≥ 6.
For six cards, the result is thirteen; for eight cards, it is nineteen. The first-tier contribution remains included. This is a piecewise function with two expressions, not a function that retroactively changes all five earlier contributions to three each.
Contents · Previous chapter · Next chapter
7. Test values around the boundary
At n = 4 the total is eight. At n = 5 it is ten. At n = 6 it is thirteen. The increment from four to five cards is two points; the increment from five to six is three.
A table with these three rows can reveal an incorrect threshold interpretation quickly. Ask the learner to compute one value well above the boundary as another check. The rule is intended only for whole-card counts, so a value such as 5.2 is not an admissible input.
Contents · Previous chapter · Next chapter
8. Contrast a retroactive threshold rule
Define a separate fictional function R: two points per card when n ≤ 5, but three points per card on all completed cards when n ≥ 6. At n = 5 it gives ten, while at n = 6 it gives eighteen.
The change of eight points across this integer boundary is a property of the alternative rule. It is not the intended marginal-tier allocation P, which gives thirteen at six. Both functions are mathematically valid; choosing between them requires knowing which wording was authorised.
Contents · Previous chapter · Next chapter
9. Compare the functions away from the boundary
At n = 8, P gives nineteen and R gives twenty-four. At n = 20, P gives fifty-five and R gives sixty. For every integer n ≥ 6, R(n) − P(n) = 3n − (3n − 5) = 5.
The discrepancy has a clear origin: R assigns one extra point to each of the first five cards. It is not an arbitrary numerical error. Students should be able to explain the difference without recomputing every example. This strengthens their ability to diagnose the exact semantic change.
Contents · Previous chapter · Next chapter
10. Find the gap in an incomplete rule
Suppose a generated formula uses the condition n < 5 for its first expression and n > 5 for its second. The value at n = 5 belongs to neither case. Although each expression may be correct on its own region, the rule fails to cover an admissible input.
Repair the conditions by including n = 5 in the first region. Alternatively the second expression also gives ten when evaluated at five, so a carefully stated alternative partition can assign that boundary to the second expression instead. Verify that the repaired wording agrees with the original rule.
Contents · Previous chapter · Next chapter
11. Find a conflicting overlap
Consider a different generated rule that gives 2n when n ≤ 5 and 3n when n ≥ 5. At n = 5, the two expressions give ten and fifteen. Without a stated precedence rule, the specification gives incompatible outputs for one input.
Do not assume the first expression wins unless the specification actually defines that ordering. The task is to repair the meaning, not merely write a program that selects whichever branch appears first. This connects piecewise mathematics with the earlier work on precise quantifiers and conditions.
Contents · Previous chapter · Next chapter
12. Move from integer inputs to a continuous model
In a separate hypothetical distance model, let x be any nonnegative real number. Define C(x) = 2x for 0 ≤ x ≤ 5 and C(x) = 10 + 3(x − 5) for x > 5. This uses the same expressions as the points example but a different domain.
Both expressions approach ten at x = 5, and the assigned value is ten, so the function is continuous there. A graph consists of two straight-line regions with different slopes. The original integer-domain points rule does not by itself define fractional-card outputs.
Contents · Previous chapter · Next chapter
13. Distinguish a change in slope from a jump
For the continuous distance model, the slope changes from two to three at x = 5, but the output does not jump. Now define D(x) = 2x for x ≤ 5 and D(x) = 3x for x > 5. The left value is ten; values approaching five from above approach fifteen.
D has a discontinuity at five. The distinction matters because a rule may change the rate of future growth without changing the accumulated amount, or it may change the total immediately. Learners should test both the value at the boundary and the limiting behaviour when a continuous domain is intended.
Contents · Previous chapter · Next chapter
14. Add a cap to the points function
Return to whole-card inputs. Suppose a new authorised rule limits total points to twenty-five. Define Q(n) as the smaller of P(n) and twenty-five. At nine cards, P gives twenty-two; at ten it gives twenty-five; at eleven it gives twenty-eight but Q remains twenty-five.
The cap creates a third region where extra cards add no further points. It changes the objective of the allocation rather than correcting an error in the original. Ask learners to write a complete three-region piecewise definition and verify the transitions at five and ten.
Contents · Previous chapter · Next chapter
15. Reverse a piecewise result cautiously
For the original P, the reported total nineteen corresponds to eight cards: solving 3n − 5 = 19 gives n = 8, which lies in the second region. A total of twelve cannot occur, because the first region ends at ten and the second begins at thirteen.
For the capped Q, a total of twenty-five could correspond to ten or any larger whole number of cards. The cap makes the rule many-to-one on that region. This links the exercise to the Function and Inverse Mapping Lab: a numerical output cannot always reconstruct one unique input.
Contents · Previous chapter · Next chapter
16. Inspect what the rule does not authorise
The fictional points rule says nothing about the quality of a completed practice card, a maximum number of cards or whether a card can be counted twice. Those are separate questions about inputs and eligibility. It would be inappropriate to invent answers to them from the arithmetic alone.
A real administrative rule can also contain exceptions, definitions and required approvals not represented by a simplified formula. The classroom model is useful for learning conditional calculations, not for determining real entitlements or interpreting an actual policy without its authoritative text.
Contents · Previous chapter · Next chapter
17. Audit a generated implementation
Ask a reviewed AI assistant for pseudocode that computes P. A suitable structure first checks that n is a nonnegative integer, then returns 2n if n ≤ 5, otherwise returns 10 + 3(n − 5). Compare its outputs against the hand-worked cases.
If the assistant checks n < 5 and returns 3n otherwise, identify both the boundary error and the wrong upper-tier calculation. A correct-looking function name does not guarantee that its branch conditions encode the intended specification.
Contents · Previous chapter · Next chapter
18. Prompt for case coverage and boundary checks
A useful prompt is: state the input domain, translate each clause into a case condition and expression, check that the cases cover all valid inputs without conflicting overlap, and evaluate the boundary cases. Distinguish accumulated-tier calculations from retroactive threshold calculations.
The learner verifies the results and tests an invalid input as well. A small test suite can reveal many mistakes but does not necessarily establish correctness for every possible input. General verification should follow from the defined conditions and formulas.
Contents · Previous chapter · Next chapter
19. Assess conditional reasoning separately from arithmetic
Use four proposed rubric dimensions: correct domain definition, faithful translation of each condition, calculation and boundary verification, and explanation of a changed rule. Score each independently from zero to three based on observable work.
A student may multiply accurately yet consistently choose the wrong tier. That student needs different practice from one who selects the correct branch but makes an arithmetic slip. Accept number lines, tables, verbal explanations and appropriate symbols. The rubric has not been independently validated.
Contents · Previous chapter · Next chapter
20. Independent transfer: a fictional token counter
A new rule awards four abstract tokens per completed item for the first three items, then two tokens for each additional item, with a total cap of eighteen. Let m be a nonnegative integer. The uncapped function is 4m for m ≤ 3 and 12 + 2(m − 3) for m ≥ 4.
At m = 2, 3, 4, 6 and 7, the capped totals are 8, 12, 14, 18 and 18. Eighteen tokens can correspond to any m ≥ 6. Ask the learner to explain the change of marginal rate, the effect of the cap and why the token count does not uniquely determine the input at the cap.
Contents · Previous chapter · Next chapter
21. Primary school: follow the correct instruction
Use coloured counters in an invented game. The first three cards receive two counters each, and later cards receive one each. Children can physically group the counters and explain why the earlier ones do not change when another card arrives.
Adults may prepare reviewed practice examples with AI, but direct service use is unnecessary. Use tactile materials or picture cards as appropriate. The foundation is reading the condition attached to a rule rather than applying one familiar operation to every case.
Contents · Previous chapter · Next chapter
22. Secondary school: represent and compare piecewise rules
Students can work with integer-domain functions, continuous graphs and conditional formulas suitable for their curriculum. Require them to label intervals and distinguish open from closed endpoints when appropriate. Include an example with a gap and one with a conflicting overlap.
A teacher can provide a reviewed generated formula for diagnosis. Ask students to show why the formula matches or fails the original wording. The objective is precise translation and verification, not memorising a particular programming language.
Contents · Previous chapter · Next chapter
23. University, institutions and EnDist
Advanced coursework may examine conditional algorithms, policy models, optimisation and formal specifications. Real systems may include additional state, exceptional inputs and domain-specific requirements. The toy function does not establish a real allocation rule.
Within eduKate’s proposed EnDist framework, AI may distribute the ability to formalise and implement rules across many contexts. Education should also distribute the capacity to inspect which rule applies at each boundary. More capable intelligence can propagate an incorrect interpretation just as efficiently as a correct one.
Contents · Previous chapter · Next chapter
24. A four-week Piecewise Rule Lab
Week one: build the original points table and derive both expressions. Week two: compare marginal and retroactive rules; identify gaps, overlaps and boundary cases. Deliver a checked specification.
Week three: study the continuous model, add a cap, investigate inverse ambiguity and audit an AI-generated implementation. Week four: complete the token-counter transfer task and defend its cases. Evaluate the four rubric dimensions separately, using agreed access supports.
Contents · Previous chapter · Next chapter
25. Questions learners, families and educators may ask
Does every threshold cause a jump? No; it can change a rate without changing the accumulated value at a continuous boundary. Can two cases meet at the same input? They can if the rule remains unambiguous, but a conflicting overlap requires resolution. Is testing the boundary enough? No, it is an important check alongside the general formula and domain.
Can AI convert a verbal rule into code? It may help, but the learner must compare the implementation with the authorised meaning. A correct calculation under an incorrect interpretation is still an incorrect answer to the original problem.
Contents · Previous chapter · Next chapter
26. Sources, boundaries and next steps
All points, cards, distances and token rules in this lab are invented mathematical teaching materials. They do not describe actual grades, prices or administrative policies. The computations follow the stated domains and formulas, and the proposed lesson sequence has not been independently validated.
Continue through the Quantifier and Scope Lab, Function and Inverse Mapping Lab, Boundary Testing Lab and Equivalence and Transformation Lab. The durable capability is preserving conditional meaning as a rule travels from language into mathematics and AI-assisted action.
Related coursework: Quantifier and Scope Lab · Function and Inverse Mapping Lab · Boundary Testing Lab · Equivalence and Transformation Lab.