Keywords

1 Background

After many years of theoretical research on logic programming and nonmotonic reasoning, I sought practical applications of my theoretical research and I entered law school in 2006 and learned “Japanese presupposed ultimate fact theory” (we write “JUF theory” for short in this paper) which was developed in lawyers training center in Japan at the law school. This theory is to help judges to make reasonable conclusions even under incomplete information environment due to lack of evidence. I immediately understood the aim of this theory is exactly same as nonmonotonic reasoning and am sure that I can implement the reasoning in JUF theory [10].

My understanding of JUF theory is as follows:

In a litigation, the truth values of some facts which contribute to the judgement might be unknown due to the sufficient evidence. Then, from the deductive reasoning, the correct logical condition for the judgment is “unknown” as well. However, judges are not allowed to give such unknown judgement but have to give decisive answer. To solve this problem, JUF theory attach a default truth value to every condition in Japanese Civil Code and let judges use the default value when the condition is unknown in the litigation. Then all the conditions are determined by real truth values or default truth values and therefore conclude the decisive judgement. Actually, an attached default value is closely related with the burden of proof. Since if the default value is favorable to the plaintiff (the defendant, respectively), the defendant (the plaintiff, respectively) must prove the negation of the default value otherwise the defendant (the plaintiff, respectively) lose the litigation.

2 PROLEG

We firstly started to write legal rules in PROLOG [10] reflecting burden of proof in a similar way to the British Nationality Act in PROLOG [13]. However, we found that lawyers have difficulty to understand negation as failure in PROLOG so we changed the syntax from negation as failure into a framework of general rules and exceptions which is a common reasoning pattern among lawyers to create PROLEG (PROlog based LEGal reasoning support system) [7].

Our main aim is to make lawyers to use legal reasoning system by providing a minimum legal language sufficient for the reasoning so that lawyers understand the behavior of the system. Our approach is quite opposite with academic trends in AI and law in that researchers introduce many subtlty to express detailed deontic modality. As far as pratical legal system is concerned, however, the legal systems which usual AI and Law researchers provide is too complicated for lawyers who do not have a background of logic and thus the lawyers do not use them.

Although we have not conducted any psychological experiments, we had experiences on PROLEG with law school graduates who write PROLEG solution for Japanese bar exams for each year from 2009 to 2022 (total more than 60 graduates) in that they can start to make a program in PROLEG after a few weeks training of programming in PROLEG. I believe that PROLEG is the most familiar legal knowledge representation language for lawyers and has a potential to be a de fact standard.

Now, we introduce PROLEG. PROLEG system consists of a rulebase and a fact base.

  • A PROLEG rulebase consists of the following expression.

    • A rule of the form of Horn clauses (without negation as failure):

      $$H \Leftarrow B1, ..., Bn.$$
    • An exception is an expression of the form:

      $$exception(H,E).$$

      where H, E are atoms each of which is the head of a rule.

  • A PROLEG factbase consists of the truth value of related facts in a case. We use an expression for a fact P in a case as:

    $$fact(P).$$

The intuitive meaning of PROLEG rules is that if the conditions of general rules are satisfied, its conclusion is satisfied in general but if the exception E is satisfied the conclusion is no longer true. Note that E of exception(HE) is the head of a rule so there is a general rule whose head is E. Then we could write an exception E of exception \(E'\) by representing as \(exception(E,E')\).

The semantics of PROLEG program is defined as follows [7]. We make a program to be grounded by the constants in the program and name it as P. Let M be a set of atoms. We define a set of applicable rules w.r.t. M, \(P^M\), as follows:

$$\{R\in P|\text{ there } \text{ is } \text{ no } E \text{ s.t. } exception(head(R),E) \text{ and } E \in M\}$$

This means that if some exception is found for a conclusion H of rule R, we do not allow such a rule R to participate in a derivation. The semantics of P (called an extension of P) is given as a set of atoms M s.t. \(M = min(P^M)\) where min(T) is the minimum model of T.

It is analogous to answer set definition and actually, PROLOG and PROLEG is mathematically equivalent in the sense that there is a one-to-one translation from PROLEG to PROLOG and vice versa. Here, we reproduce the equivalence translation according to [9].

Suppose that we have a program whose general rules are as follows:

   \(C\Leftarrow B_{11},...,B_{1n_1}.\)

   \(C\Leftarrow B_{21},...,B_{2n_2}.\)

   \(\vdots \)

   \(C\Leftarrow B_{k1},...,B_{kn_k}.\)

and excetions are as follows:

   \(exception(C,E_1).\)

   \(\vdots \)

   \(exception(C,E_m).\)

Then, we can traslate the above PROLEG program into the following program:

   \(C\mathtt{:-}B_{11},...,B_{1n_1}, \mathtt{\ not\ }E_1,...,\mathtt{\ not\ }E_m.\)

   \(C\mathtt{:-}B_{21},...,B_{2n_2}, \mathtt{\ not\ }E_1,...,\mathtt{\ not\ }E_m.\)

\(\vdots \)

   \(C\mathtt{:-}B_{k1},...,B_{kn_k}, \mathtt{\ not\ }E_1,...,\mathtt{\ not\ }E_m.\)

Note that rules with the same head has the same negative literals. If we add some facts in PROLEG and PROLOG, we can show that derived literals are equivalent.

On the other hand, suppose that we have the following PROLOG program:

   \(C\mathtt{:-}B_{11},...,B_{1n_1}, \mathtt{\ not\ }E_{11},...,\mathtt{\ not\ }E_{1m_1}.\)

   \(C\mathtt{:-}B_{21},...,B_{2n_2}, \mathtt{\ not\ }E_{21},...,\mathtt{\ not\ }E_{2m_1}.\)

   \(\vdots \)

   \(C\mathtt{:-}B_{k1},...,B_{kn_k}, \mathtt{\ not\ }E_{k1},...,\mathtt{\ not\ }E_{km_k}.\)

Then, we can translate a PROLOG program into the following PROLEG program using additional predicate \(C_i\).

   \(C\Leftarrow C_1.\)    \(C_1\Leftarrow B_{11},...,B_{1n_1}.\)

   \(C\Leftarrow C_2.\)    \(C_2\Leftarrow B_{21},...,B_{2n_2}.\)

   \(\vdots \)

   \(C\Leftarrow C_k.\)    \(C_k\Leftarrow B_{k1},...,B_{kn_k}.\)

   \(exception(C_1,E_{11}).\)    \(\qquad \cdots \)    \(exception(C_1,E_{1m_1}).\)

   \(exception(C_2,E_{21}).\)    \(\qquad \cdots \)    \(exception(C_2,E_{2m_2}).\)

   \(\vdots \)

   \(exception(C_k,E_{k1}).\)    \(\qquad \cdots \)    \(exception(C_k,E_{km_k}).\)

If we add some facts in PROLEG and PROLOG, we can show that derived literals except additional predicate \(C_i\)’s are equivalent.

It is interesting that even two languages are mathematically equivalent but understandability of lawyers is different.

Moreover, this way of writing rules explicitly reflects a burden of proof in litigation. The burden of proof for the conditions of a general rule resides in the party who wants its conclusion to be satisfied whereas the burden of proof for exceptions resides in the party who wants to deny the conclusion. Therefore, it is useful for lawyers in civil litigation to decide which evidence should be collected to win the case. Here is an example of PROLEG rules in contract law. We omit detailed arguments in each predicate for the sake of explanation.

figure a

And here is a case description using PROLEG facts

figure b

PROLEG provides an explanation of the reasoning process to a judgement using a block diagram. We show a block diagram for the above case in Fig. 1. The explanation of block diagram is as follows:

  • Right-handside top-most block expresses a judgement.

  • A bottom item of each block expresses the result of evaluation of conclusions/conditions; o: success, x: fail

  • A solid line between blocks expresses conclusion-condition relation for a general rule.

  • A dotted line shows exception of the conclusion of a general rule.

Fig. 1.
figure 1

PROLEG block diagram

3 Current Status of PROLEG and Its Applicability and Possible Extensions

We have been constructing a large rule base of 2500 rules and exceptions consisting of civil code and supreme court case rules since 2009. As far as we know, it is the largest legal rule base in the world. We checked the correctness of the rulebase to solve the multiple-choice part of Japanese bar exams by the law school graduates from University of Tokyo which is one of the best law school in Japan for 2009–2022. To manage such a large database, debugging tools are essentially necessary so we have investigated such legal debugging [1] as well. Regarding the efficiency of legal reasoning in civil litigation, a judge must provide a decisive decision so the structure of rule base in PROLEG is a stratified logic programming to guarantee a binary decision so that efficient implementation is possible. As a direct application of PROLEG in civil code litigation, PROLEG can be used to check a missing arguments which should be made by lawyers and as an educational tool, for law school students to enhance their understanding on legal reasoning based on burden of proof. We extend PROLEG into an interactive system to arrange issues [11]Footnote 1. We have been developing ODR (Online Dispute Reasoning) system more intelligent than E-Bay ODR system by enhancing man/machine interface of PROLEG system [6]. We have also been investigating a combination of natural language processing and PROLEG so that a lay user can write a case description in natural language and NLP extracts necessary information for an input to PROLEG so that a lay user can find out an outcome of his/her problem by PROLEG block diagram [2,3,4].

There are various directions for extension. Since PROLEG is a framework to write legal rules in terms of general rules and exceptions so we could formalize statutory laws in general [9]. We have investigated an application to criminal law [5], GDPR [12] and an application to Private International Law [8].

4 Conclusion

We have described our activities of logic programming paradigm in legal domain and explained our legal knowledge representation language PROLEG, which has a lot of potential for supporting various legal activities. We strongly believe that PROLEG would be one of the prominent practical application in logic programming.