# Declarations

RuLa has two kinds of variables: **instance variables**, introduced through declarations, and **value variables**, introduced with `:=` inside the assignment part of a rule. This page covers instance variables. For value variables, see [Variables](/rule-language/variables.md).

A declaration does two things at once: it matches one or more instances from the case (a Person, Entity, Contract, etc.) and it defines an instance variable — a short name you can use throughout the rest of the rule to refer to that instance and access its information fields. Each additional declaration matches one more instance, so `p is Person` and `c is Contract` together match one person and one contract.

You need to declare an instance variable before you can use it — an undeclared variable is unknown in RuLa.

```
c is Contract
e is Entity
p is Person, AccountHolder
```

### The Impact of a Declaration

How you formulate a declaration has an impact on what a rule will be about. If, on a [document](/guides/glossary/document.md), you declare these instance variables

```
c is Contract
p is Person
```

that document will need to contain one contract and one person.

Alternatively, if you declare

```
p is Person
```

that document will be about exactly one person. In a [case](/guides/glossary/case.md) that involves not one but three people, the system will require this document three times: once for each person in the case.

However, if you declare

```
p1 is Person
p2 is Person
p3 is Person
```

on a document, that document can contain all three people in the case. It will only be required once.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.atfinity.io/rule-language/declarations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
