The brief. The whole lesson is one line —
net = gross + ceded, with ceded stored negative. Simple, so you already know every net, right? Predict the net for all seven claims, then press Run. Each row starts pre-filled with the naive guess that treats ceded as a positive amount to add. Every ✗ is a place the sign rule bit you — and the sign rule is the whole point.
This is Lesson 1's discipline in miniature: before you trust a cession — or a cube that sums over it — pin what the arithmetic actually does. Storing ceded as a negative amount is what lets every later lesson net by plain summing; here you prove to yourself, row by row, that adding a negative is the cession.
The rules
GrossandCededare the givens — the loss book with a flat facultative cession already applied. Only your prediction moves.- The
Your netcolumn is pre-filled with the naive guessgross + |ceded|— treating ceded as a positive number to add. Some rows agree; most do not. - Run, read the ✗ rows, and change each
Your netto match theNetcolumn until all seven say ✓. You have then internalised the sign rule.
No peeking at the solution until at least one row has surprised you.
Your workbench
using MeshWeaver.Layout;
using MeshWeaver.Layout.Composition;
using MeshWeaver.Layout.DataGrid;
using MeshWeaver.Utils;
// THE SIGN RULE — ceded is stored NEGATIVE, and net = gross + ceded. That is all there is.
// Your job: PREDICT the net for each claim. The `Your net` column is pre-filled with the
// naive guess that treats ceded as a POSITIVE amount to add (gross + |ceded|) — exactly the
// mistake the sign rule exists to kill. Some rows agree; most do not.
// Change each prediction to match the Net column and re-run until every row says ✓.
// Do NOT touch Gross or Ceded — those are the givens; only your prediction moves.
record Row(string Claim, double Gross, double Ceded, double Predicted, double Net, string Result);
// (Claim, Gross, Ceded [stored NEGATIVE], Predicted [<-- your guess])
(string Claim, double Gross, double Ceded, double Predicted)[] cases =
[
("C1", 80, 0, 80), // nothing ceded — this one already agrees
("C2", 240, -40, 280), // 👉 your prediction — is +(-40) really +40?
("C3", 420, -120, 540),
("C4", 760, -100, 860),
("C5", 1300, -300, 1600),
("C6", 90, -90, 180),
("ATT", 350, -50, 400),
];
var rows = cases.Select(c =>
{
var net = c.Gross + c.Ceded; // the sign rule — no subtraction anywhere
var ok = Math.Abs(c.Predicted - net) < 1e-9;
return new Row(c.Claim, c.Gross, c.Ceded, c.Predicted, net, ok ? "✓ correct" : "✗ mind the sign");
}).ToArray();
var right = rows.Count(r => r.Result.StartsWith("✓"));
Controls.Stack
.WithView(Controls.H4($"Nets predicted — {right}/{rows.Length} correct"))
.WithView(Controls.DataGrid(rows)
.WithColumn(new PropertyColumnControl<string> { Property = nameof(Row.Claim).ToCamelCase() }.WithTitle("Claim"))
.WithColumn(new PropertyColumnControl<double> { Property = nameof(Row.Gross).ToCamelCase() }.WithTitle("Gross").WithFormat("N0").WithAlign("end"))
.WithColumn(new PropertyColumnControl<double> { Property = nameof(Row.Ceded).ToCamelCase() }.WithTitle("Ceded").WithFormat("N0").WithAlign("end"))
.WithColumn(new PropertyColumnControl<double> { Property = nameof(Row.Predicted).ToCamelCase() }.WithTitle("Your net").WithFormat("N0").WithAlign("end"))
.WithColumn(new PropertyColumnControl<double> { Property = nameof(Row.Net).ToCamelCase() }.WithTitle("Net = gross + ceded").WithFormat("N0").WithAlign("end"))
.WithColumn(new PropertyColumnControl<string> { Property = nameof(Row.Result).ToCamelCase() }.WithTitle("Result"))
.Resizable(false))
.WithView(Controls.Markdown(
$"**Book totals:** gross **{rows.Sum(r => r.Gross):N0}** · ceded **{rows.Sum(r => r.Ceded):N0}** · net **{rows.Sum(r => r.Net):N0}**. Plain summing over the book gives net — precisely because ceded is negative."))
When every row says ✓, you no longer think the sign rule works — you have run it seven times and watched adding a negative do the cession, on every row and in the totals.
Surprised at least once? Reveal the solution — the same seven claims with their true nets and why +(−100) is the whole cession.