# Stosowanie przepisu do faktów (rozumowanie z ustaw)

EN: **Statutory reasoning** · id `statutoryreasoning` · aliases: statutory reasoning, statute application, rule application, SARA, tax law reasoning, rozumowanie ustawowe, subsumpcja

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [AI w prawie](https://aiatlasgraph.com/t/legalai.md) › [Rozumowanie prawne i przewidywanie](https://aiatlasgraph.com/t/legalreasoning.md) › Stosowanie przepisu do faktów (rozumowanie z ustaw)

## Description

- PL: Zastosowanie podanego tekstu ustawy do opisanego stanu faktycznego: rozstrzygnięcie, czy przepis ma zastosowanie, lub obliczenie skutku prawnego.
- EN: Applying a given statute text to a described set of facts: deciding whether a provision applies or computing the legal outcome.

## In one sentence

- PL: Model dostaje tekst przepisu i opis sytuacji i ma rozstrzygnąć, czy przepis ma zastosowanie, albo policzyć na tej podstawie wynik, np. podatek.
- EN: Given a law's text and a description of a situation, a model decides whether the law applies or computes a result such as tax owed.

## Problem it solves

- PL: Przepisy pełne wyjątków i odesłań łatwo zastosować źle, a błąd w podatku czy świadczeniu kosztuje konkretnych ludzi pieniądze.
- EN: Laws full of exceptions and cross-references are easy to misapply, and a mistake in tax or benefits costs real people money.

## What it does

- PL: Jak uczeń rozwiązujący zadanie z treścią: najpierw przekłada słowa przepisu na reguły, potem podstawia fakty i liczy.
- EN: Like a pupil solving a word problem: first turning the law's words into rules, then plugging in the facts and calculating.

## Everyday example

- PL: Ktoś wpisuje do asystenta podatkowego swoją sytuację rodzinną i dochody i pyta, czy może rozliczyć się wspólnie z małżonkiem i ile zapłaci.
- EN: Someone enters their family situation and income into a tax assistant and asks whether they can file jointly with their spouse and how much they will pay.

## This concerns you if you…

- PL: rozliczasz podatki lub świadczenia z pomocą AI
- PL: budujesz system stosujący przepisy do wniosków
- EN: do taxes or benefit claims with AI help
- EN: build a system that applies rules to applications

## Keywords

SARA dataset · Prolog · logic programs · neuro-symbolic · semantic parsing · tax law · chain-of-thought · LegalBench rule application

## How it works

- PL: Zadanie ma dwie formy: wynikanie (czy przepis stosuje się do faktów) i obliczenie wyniku, np. należnego podatku. Podejścia obejmują bezpośrednie promptowanie LLM oraz metody neurosymboliczne: model tłumaczy przepisy i fakty na program logiczny, a solver liczy odpowiedź. Ręcznie napisany program w Prologu rozwiązywał referencyjny zbiór bezbłędnie.
- EN: The task has two forms: entailment (does the provision apply to the facts) and computing an outcome such as tax owed. Approaches include direct LLM prompting and neuro-symbolic methods: the model translates statutes and facts into a logic program and a solver computes the answer. A hand-written Prolog program solved the reference dataset perfectly.

## Limits

- PL: Czyste modele mylą się w arytmetyce i wyjątkach oraz opierają się na zapamiętanym prawie zamiast na podanym tekście; na sztucznych przepisach spoza treningu radziły sobie słabo. Metody symboliczne zależą od trafnego przełożenia tekstu na logikę. Zbiory testowe są małe i oparte na uproszczonym prawie.
- EN: Pure models make arithmetic and exception errors and lean on memorised law rather than the given text; on synthetic statutes unseen in training they did poorly. Symbolic methods depend on accurate translation of text into logic. Test sets are small and based on simplified law.

## Key terms

- PL: **subsumpcja**: Przyporządkowanie faktów sprawy do hipotezy przepisu.
- PL: **program logiczny**: Zapis reguł, z którego solver wyprowadza wnioski.
- PL: **wynikanie (entailment)**: Czy z przepisu i faktów wynika dane twierdzenie.
- EN: **subsumption**: Fitting the facts of a case under the conditions of a provision.
- EN: **logic program**: A set of rules from which a solver derives conclusions.
- EN: **entailment**: Whether a claim follows from the provision and the facts.

## Know first

- [AI neurosymboliczna (Neuro-symbolic AI)](https://aiatlasgraph.com/t/neurosymbolic.md)
- [Odpowiedzi na pytania z przepisów (Statute retrieval and legal entailment)](https://aiatlasgraph.com/t/statuteqa.md)

## Related topics

Untyped, symmetric "see also" links.

- [Prawo jako kod (Rules as code)](https://aiatlasgraph.com/t/rulesascode.md)

## Sources

- [A Dataset for Statutory Reasoning in Tax Law Entailment and Question Answering](<https://arxiv.org/abs/2005.05257>) `holzenberger-sara-2020` · by Nils Holzenberger, Andrew Blair-Stanek, Benjamin Van Durme
- [Can GPT-3 Perform Statutory Reasoning?](<https://arxiv.org/abs/2302.06100>) `blairstanek-gpt3-statutory-2023` · by Andrew Blair-Stanek, Nils Holzenberger, Benjamin Van Durme
- [Language Models and Logic Programs for Trustworthy Tax Reasoning](<https://arxiv.org/abs/2508.21051>) `jurayj-tax-logic-programs-2025` · by William Jurayj, Nils Holzenberger, Benjamin Van Durme

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/statutoryreasoning · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
