Books / Law as Code in Practice: German Housing Benefit (Wohngeld) / Chapter 3
Part II · Chapter 3
One Family, One Decision: Weimar, Mietenstufe III, €485

Contents of Law as Code in Practice: German Housing Benefit (Wohngeld)
On a first read, follow the family’s question and answer and come back to the code afterwards. By the end of this chapter you will be able to read one decision from the model: the facts it used, the rules that applied, the sections behind them — and what moves when a fact changes.
Lawyer: which section fixes each step of the answer.
Analyst: which facts the answer depends on, and by how much.
Developer: how a case holds facts and questions, and what comes back.
1. The question
The Vogts from Chapter 0 applied for Wohngeld from January 2025. Chapters 1 and 2 built the pieces: the edition in force, the household, Y = €1,710.00 and M = €777.80. Now the whole decision, in one place.
Predict before you read on: if the Vogts’ rent rose from €580 to €850, would their Wohngeld rise by the full €270, by less, or not at all?
2. How the case is built
A case holds the facts of one situation. The rules are not in the case: they come from the canons it depends on — reusable packages of legal rules, one per act — the Wohngeld canon, the WoGV canon with the rent levels and the EStG canon with the income definitions. The case records who the household is, what is known about it, on which date, and where each fact comes from.
case Familie2025 {
context {
legal_time @2025-01-01;
knowledge_time @2026-09-15T09:00:00Z;
decision_time @2026-09-15T09:00:00Z;
timezone "Europe/Berlin";
}
assert "antrag": de.social.wohngeld::wohngeldantrag(…haushalt…, …ehefrau…, de.social.wohngeld::MIETZUSCHUSS) { origin case_input; }
assert "wohnort": de.social.wohngeld::wohnort(…haushalt…, "Thüringen", "Weimar, Stadt") { origin case_input; }
assert "entgelt": de.social.wohngeld::vereinbartes_entgelt(…mietverhaeltnis…, 580.00 EUR) { origin case_input; }
assert "ehefrau-lohn": de.tax.income_for_wohngeld::arbeitslohn_in_geld(…ehefrau…, 26880.00 EUR) { origin case_input; }
assert "behoerde-21-nr3": not de.social.wohngeld::missbraeuchliche_inanspruchnahme(…haushalt…) { origin adjudicated; }
…
}
The full case has 42 facts. Three things to notice:
- The date of the question is part of the case.
legal_timeselects the edition of the Act and the rows of the annexes: the values in force on 1 January 2025. - Every fact says where it comes from. Most are
case_input— declared by the household. The assessment under § 21 Nr. 3 isadjudicated— decided by the Wohngeldbehörde. The proof keeps the two apart. - The place is a name, not a rent level. The case says “Weimar, Stadt” in Thuringia; the model reads the rent level from the WoGV’s own list. Nobody types “III”.
3. The decision, step by step
| Step | Value | Rule and section |
|---|---|---|
| Household | 4 members, all counted | § 5 Abs. 1, §§ 6, 7 WoGG |
| Annual income of Katrin | €26,880 − €1,230 = €25,650; − 20 % = €20,520 | § 14 WoGG, § 9a EStG, § 16 WoGG |
| Monthly assessed income Y | €1,710.00 | § 13 Abs. 2 WoGG |
| Rent level | Mietenstufe III (Weimar, Stadt) | § 12 Abs. 1 WoGG, Anlage to § 1 Abs. 3 WoGV |
| Rent under § 9 | €580.00 | § 9 WoGG |
| Ceiling + climate component | €766 + €34.40 = €800.40 | § 12 Abs. 1, 7, Anlage 1 |
| Heating relief | €197.80 | § 12 Abs. 6 |
| Rent taken into account M | min(€580, €800.40) + €197.80 = €777.80 | § 11 Abs. 1 |
| Unrounded Wohngeld z4 | 484.7809136900 | § 19 Abs. 1, Anlagen 2, 3 |
| Monthly Wohngeld | €485 | Anlage 3 Nr. 3 |
| Claim | €485, established | §§ 19–21 WoGG |
Each line is a node in the proof graph, with the rule that produced it and the section it cites. The ministry’s Rechenbeispiel 7 prints the rent level, Y (€1,710.00), the rent (€580), the ceiling with its climate component (€766 + €34.40), the heating relief (€197.80), M (€777.80) and the Wohngeld (€485), and the model matches each of them. The annual figures, z4 and the claim are the model’s own: the example works month by month, prints no step of the formula and, as its brochure says, establishes no claim.
4. The answer card
Every volume of this series shows a decision on the same card:
| Question | monthly Wohngeld and the claim to it, Familie Vogt |
| Legal date | 1 January 2025 — values of the second WoGFV |
| Answer | €485 a month (Mietzuschuss) — established |
| Claim | €485 — established |
| Decisive provisions | the amount — § 19 Abs. 1–2 with Anlagen 1–3, last step Anlage 3 Nr. 3; the claim — §§ 19–21 |
| Sources | § 19 Abs. 1, 2 WoGG; Anlagen 1–3 as published in BGBl. 2024 I Nr. 314 |
| Readings applied | intermediate values longer than ten decimal places are rounded half up to ten (Chapter 4) |
| Open questions | none — the § 21 Nr. 3 assessment is recorded as decided by the authority |
| Fingerprints | program sha256:8a69e9ad…, case sha256:8eb8b743… (Chapter 9) |
5. Change one thing
The same case, one fact changed at a time. Each line is a run of the model, recorded 12 October 2026:
| Change | Rent taken into account M, €/month | Assessed income Y, €/month | Monthly Wohngeld |
|---|---|---|---|
| none — the Vogts as they are | €777.80 | €1,710.00 | €485 |
| the date: 31 December 2024 | €777.80 | €1,710.00 | €463 |
| the rent: €850 instead of €580 | €998.20 | €1,710.00 | €644 |
| income tax also expected (§ 16, three deductions) | €777.80 | €1,496.25 | €542 |
| proven work expenses €2,000 instead of the flat rate | €777.80 | €1,658.6666666667 — held at ten decimal places (rounded half up), not rounded to the cent | €499 |
| Markus not established as living in the flat | €750.20 | €1,600.00 | €351, for 3 members |
| the § 21 Nr. 3 assessment not yet made | €777.80 | €1,710.00 | €485 — claim requires judgment |
Now the prediction. A rent of €850 is above the ceiling plus climate component (€800.40), so only €220.40 more counts, not €270; and the formula pays about 72 cents of each extra euro of M. The Wohngeld rises by €159, to €644. Less than the full increase — and once the rent is above the ceiling, not at all.
The table also shows why the amount alone is not the decision. The last line has the same €485 as the first, and yet no claim is established: the authority has not spoken (Chapter 6).
6. What this gives the authority
One case, one place: the household, the income and rent as the Act defines them, the edition and rows used, the amount, and the claim with every premise. A caseworker can see what is established and what is still open; a team leader can see which fact would change the amount and by how much; a reviewer can follow every number to its section and its gazette.
7. Where Catala stands on this
Catala 1.3.0 supports the exact arithmetic this formula needs — exact decimals, money and dates (Catala book, ch. 5.2). The difference begins after the number: Arxo returns the decision around it — the claim kept apart from the amount, the authority’s assessment marked as decided by the authority, and each annex row tied to its gazette issue.
8. Run it
law ask <case package> --case Familie2025 --query-json queries/einkommen-1710.json
law ask <case package> --case Familie2025 --query-json queries/miete-777-80.json
law ask <case package> --case Familie2025 --query-json queries/wohngeld-485.json
law ask <case package> --case Familie2025 --query-json queries/anspruch-485.json
All four answers are established, recorded on 12 October 2026 with law 0.1.12. The 31 December 2024 and the pending-assessment lines of section 5 are the cases Familie20241231 and FamilieOhneWuerdigung of the same package; the other four variations — rent, income tax, work expenses and Markus — are cases of a second case package, familie-weimar-varianten, listed in the appendix on reproducing the examples.
Exercise
- Which fact of the case would you change to move the Vogts from Mietenstufe III to another rent level, and why can you not simply enter “IV”?
- In section 5, the rent rises by €270 but M rises by only €220.40. Which section caps it?
- The answer card lists “open questions: none”. Which fact of the case makes that true?