The NAI Tutorial

June 21st, 2019 | Montréal (Québec), Canada

Co-located with The 17th International Conference on Artificial Intelligence and Law (ICAIL 2019)

Automated deduction is a field of research in artificial intelligence whose outputs are potentially relevant for reasoning in the legal domain; however, only few connections between the two areas have been explored so far. In particular, recent years have witnessed several attempts at making general and freely-available tools for automated reasoning accessible to experts of legal texts; the present tutorial for ICAIL aims at introducing people with legal knowledge to the use of these tools.

Description

The proposed tutorial is intended to make people from the law community acquainted with formal tools for efficient and automated reasoning on legal texts.

How can computers aid legal practitioners in their work? The interpretation of legal texts and regulations depends on many factors such as experience and context. Nevertheless, once an interpretation is given, a computer can help in several ways:

  • It can check if the interpretation is consistent. Inconsistencies among legal norms mean there are two (or more) legal norms that pursue the opposite intention, which is an undesirable and confusing phenomenon. This situation may, in extreme cases, lead to the abolition of one of the norms by the constitutional judicial authority. In contracts, this situation can lead to problems with the interpretation and, in extreme cases, to the termination of the contract. For example, contradictory conclusions can be that you are obliged to build a fence around your house but, at the same time, you are permitted not to.
  • It can check whether some norms are redundant and can therefore be removed without harming the correctness of the legal document. Considering contracts again, redundant obligations may be frequent. For example, a contractual party might have an obligation to provide the services at the agreed quality level to the other party. The contract may contain a provision that if a party violates an obligation in the contract, it has to pay fines. At the same time, the contract contains an article stating that if a party does not provide the service quality at the agreed level, it should pay a fine too. The second clause is redundant, because the general provision to pay a fine for any violation of an obligation in the contract subsumes the one for violating more specific cases.
  • It can help reasoning fully automatically. For example, given that I signed the contract and a part of the service is of the agreed quality while another is of inferior one, am I entitled for a reimbursement?

The help of a computer is not only limited to the three points described above. For example, once an interpretation is given, a computer can be used in order to visualize all possible normative paths and can therefore help judges to avoid choosing a path which does not follow their interpretation. Or, it can be used in order to look for information, such as evidence, which can help making a correct normative decision. However, in this tutorial we are going to focus only on the three points described above since they are supported by the current version of the NAI tool.

What software do I need in order to use the NAI tool? The tool is a web application, which means that the only software required is a browser, such as Firefox or Chrome.

What knowledge and skills are required in order to be able to use the NAI tool? Clearly, the most important task is the interpretation of the text. We believe that any tool whose goal is to aid legal practitioners must make this task as easy as possible. At the same time, giving an interpretation which is unambiguous and formal enough, so that it can be used in order to answer relevant questions, requires one's understanding of a formal language. This is the main task of the tutorial's first two sessions. Once an interpretation is formalized within the tool, the computer can be used in order to support the three operations described above. The use of this part of the tool is handled in the third session of the tutorial.

Example

Consider the Regulation (EC) No 593/2008 of the European Parliament and of the Council of 17 June 2008 on the law applicable to contractual obligations (Rome I). This regulation specifies different situations and cases which should affect the law used in contracts. In this example we focus on articles 3 and 4.

Article 3 - Freedom of choice

  1. A contract shall be governed by the law chosen by the parties. The choice shall be made expressly or clearly demonstrated by the terms of the contract or the circumstances of the case. By their choice the parties can select the law applicable to the whole or to part only of the contract.
  2. The parties may at any time agree to subject the contract to a law other than that which previously governed it, whether as a result of an earlier choice made under this Article or of other provisions of this Regulation. Any change in the law to be applied that is made after the conclusion of the contract shall not prejudice its formal validity under Article 11 or adversely affect the rights of third parties.
  3. Where all other elements relevant to the situation at the time of the choice are located in a country other than the country whose law has been chosen, the choice of the parties shall not prejudice the application of provisions of the law of that other country which cannot be derogated from by agreement.
  4. Where all other elements relevant to the situation at the time of the choice are located in one or more Member States, the parties' choice of applicable law other than that of a Member State shall not prejudice the application of provisions of Community law, where appropriate as implemented in the Member State of the forum, which cannot be derogated from by agreement.
  5. The existence and validity of the consent of the parties as to the choice of the applicable law shall be determined in accordance with the provisions of Articles 10, 11 and 13.

Article 4 - Applicable law in the absence of choice

  1. To the extent that the law applicable to the contract has not been chosen in accordance with Article 3 and without prejudice to Articles 5 to 8, the law governing the contract shall be determined as follows:
    1. a contract for the sale of goods shall be governed by the law of the country where the seller has his habitual residence;
    2. a contract for the provision of services shall be governed by the law of the country where the service provider has his habitual residence;
    3. a contract relating to a right in rem in immovable property or to a tenancy of immovable property shall be governed by the law of the country where the property is situated;
    4. notwithstanding point (c), a tenancy of immovable property concluded for temporary private use for a period of no more than six consecutive months shall be governed by the law of the country where the landlord has his habitual residence, provided that the tenant is a natural person and has his habitual residence in the same country;
    5. a franchise contract shall be governed by the law of the country where the franchisee has his habitual residence;
    6. a distribution contract shall be governed by the law of the country where the distributor has his habitual residence;
    7. a contract for the sale of goods by auction shall be governed by the law of the country where the auction takes place, if such a place can be determined;
    8. a contract concluded within a multilateral system which brings together or facilitates the bringing together of multiple third-party buying and selling interests in financial instruments, as defined by Article 4(1), point (17) of Directive 2004/39/EC, in accordance with non-discretionary rules and governed by a single law, shall be governed by that law.
  2. Where the contract is not covered by paragraph 1 or where the elements of the contract would be covered by more than one of points (a) to (h) of paragraph 1, the contract shall be governed by the law of the country where the party required to effect the characteristic performance of the contract has his habitual residence.
  3. Where it is clear from all the circumstances of the case that the contract is manifestly more closely connected with a country other than that indicated in paragraphs 1 or 2, the law of that other country shall apply.
  4. Where the law applicable cannot be determined pursuant to paragraphs 1 or 2, the contract shall be governed by the law of the country with which it is most closely connected.

Our main task is the formalization of the above norms. In order to make this task as simple and intuitive as possible, we have chosen to support it via annotations.

  • The user first needs to login to the system and create a new legislation
  • The user then copies the text from the legislation and pastes it in the text annotator within the tool
  • The user can now annotate the norms with her/his interpretation. Let us demonstrate it on the first item of Article 3. A note, the annotation tool allows for different annotations to be assigned to the same part of a sentence. This page shows a simplified version of the tool. Please hover with the mouse above the annotated (colored) text in order to see the annotation.
    • A contract shall be governed by the law chosen by the parties.
    • The choice shall be made expressly or clearly demonstrated by the terms of the contract or the circumstances of the case.
    • By their choice the parties can select the law applicable to the whole or to part only of the contract.
  • Note that the last sentence is not annotated and provides therefore no additiional information to the formalization. The sentence puts restrictions on the applicability of the choice, a feature not yet supported by the NAI tool.
  • Once we finish a norm, we can immediately check if it is consistent with respect to the other norms. If it is not, we can deactivate norms until we find which group of norms is responsible for the inconsistency. Removing inconsistencies is crucial for the correctness of an interpretation and the tool can be used in order to detect and correct such problems.
  • For each norm, we can also check if it is independent with respect to the remaining norms.
  • Lastly, we can move now from the legislation editor to the queries editor and add different queries. Queries try to apply the interpretation to specific cases and have, therefore, further assumptions. These assumptions can also be checked for consistency with regard to the legislation. The following is an example of such queries
    • Is the French law applicable to the second part if the parties involved chose to use the Czech law for the whole contract but the choice was demonstrated only for the first part. and, in addition, we know that the contract is about franchise and that the habitual law is the French law.

Structure

The tutorial consists of four lectures

Introduction to a normative logic (given by Tomer Libal) [Slides]

This lecture will introduce the audience to propositional normal modal logic used to represent normative reasoning. It will focus on two specific logical systems: SDL (Standard Deontic Logic) and DL*.

Formalization of legal texts (given by Tereza Novotná) [Slides]

We will show how the system DL* can be used to formalize certain aspects of legal documents. This lecture will present the audience with the NAI graphical tool and the basics of legal text formalization.

Automated reasoning on legal texts (given by Alexander Steen)

This lecture will present the field of automated reasoning. It will describe the capabilities of automated theorem proving and will introduce the audience to the automated features of NAI

Interactive session

In the last lecture the participants will use the NAI tool in order to first formalize a legal text and to get automatic answers to questions of various kind.

Material

Slides

Videos

Tool

The legislation editor can be found at nai.uni.lu

Demo accounts

  1. email: nai@uni.lu, password: nai
  2. email: tomer.libal@nai.lu, password: nai

Slack group

The group contains discussions about the material and tutorial and members can ask to be notified when updates take place. Please email tlibal@aup.edu in case you are interested in joining the group.

Literature

The tutorial and web application are based on the following works and tools.

  • Normalization of legal texts
    • Allen L.E. (1957) "Symbolic logic: a razor-edged tool for drafting and interpreting legal documents". Yale Law J. 66 833-879.
    • Allen L.E. (1982). "Towards a normalized language to clarify the structure of legal discourse". Deontic Logic, Computational Linguistics, and Legal Informations Systems, North Holland, Amsterdam, pp. 349-407.
  • Formal legal language
    • Tomer Libal and Matteo Pascucci. 2019. Automated reasoning in normative detachment structures with ideal conditions. In Proceedings of Seventeenth International Conference on Artificial Intelligence and Law, Montreal, QC, Canada, June 17–21, 2019 (ICAIL ’19), 10 pages.
    • A. Jones and I. Pörn. 1985. Ideality, sub-ideality and deontic logic. Synthese 65, 2 (1985), 275–290
    • M. de Boer, D.M. Gabbay, X. Parent and M. Slavkovic. 2012. Two dimensional standard deontic logic [including a detailed analysis of the 1985 Jones-Pörn deontic logic system]. Synthese 187, 2 (2012), 623–660.
  • Technical tools and resources