# How do we model a subject domain in second-order predicates and do not notice it

Any model has limited accuracy. The more accurate the model must be built, the more information for this will have to be stored. If it is possible to collapse the data array according to some of the criteria, then such a convolution can dramatically reduce the amount of information stored. However, such a convolution is not modeled by regular modeling methods, because it requires modeling statements at the same time with respect to sets of objects, and not with respect to objects of these sets. In fact, we need a tool for modeling both first-order predicates and second-order predicates.

I will explain the most common example. When we write that the machine was released in 1939 and disposed of in 1990, we mean that the machine existed for the entire specified period and at any time interval between the specified dates. An alternative to this statement would be to store information about all possible intervals during which the machine was recognized as existing. But all possible time intervals during this period, even with a sampling step per day, are a huge array of data.

Using this data array is just as inconvenient as storing it. Building queries on this data array is also inconvenient. For example, we have a record that the machine existed from June 12 to June 17 and was in the HPP engine room during this period. But based on this record, we can not say anything about the existence and location of the machine in the period from June 13 to June 15, because with this approach to modeling, to answer this question, we need a separate corresponding record.

In order not to store each interval separately, to reduce the amount of information stored and the time for processing requests, we resort to modeling multiple intervals. We say that in any time interval between 1939 and 1990, the machine existed. True, at the same time, we lost information about its location, but reduced the amount of stored information and increased the speed of access to this information by a million times. Formally, this information is written as follows: for any element of the set of time intervals from 1939 to 1990, the following is true: during this time interval, the specified machine existed. This is modeling in second-order predicates. We recorded our knowledge in the form of knowledge about many objects: the set of all possible time intervals from 1939 to 1990.

Is it possible to interpret the record that the machine exists from 1939 to 1990 as an assertion not about a set, but as an assertion about a time interval? Yes you can. But with such an interpretation it is impossible to get an answer to the question: did the machine exist from 1956 to 1958? This modeling method is not used.

We see that the same words have completely different meanings, depending on their interpretation. If we write that the machine existed from 1939 to 1990, then these words can be interpreted in two different ways:

• as a statement regarding all intervals that can be obtained from the interval from 1939 to 1990.
• as a statement regarding the interval from 1939 to 1990.

The trouble with our language is that it is impossible to separate these two different interpretations of the same words. This makes us think that by indicating the start time and completion time of some operation, we model the interval, and not the set of all its parts. This leads to the inconvenience that we experience when designing systems. Have you noticed that working with dates in queries that we build is different from working with data of a different type? Have you thought: why? The answer is that by indicating the time interval, we model the statement regarding the set of intervals that can be distinguished from this interval, and not relative to the specified interval. Since within the framework of OOP, or other similar modeling standards, it is not possible to model second-order predicates, it becomes impossible to model classes of time intervals in a regular way.

As soon as we resort to the compression of information, we are dealing with statements regarding sets, which requires statements in second-order predicates, modeling of which by regular means is not yet possible for us.

When modeling objects, when we indicate the spatial volume occupied by an object, we, as in the case of time intervals, can express different thoughts in one word. For example, we can say that an object is located inside the volume indicated by us. But there are two different ways to interpret this statement. For example, there are two different ways of interpreting a statement as a glass of water.

• whether it is an object.
• whether it is a substance.

The difference is the same as with modeling the time interval and many intervals. In the first case, we model the volume of space, in the second - the set of all volumes that can be distinguished from the specified volume. The words are the same, but their meaning is different. In the first case, the statement is constructed in predicates of the first order, in the second - of the second. And just as we experience difficulties with modeling time intervals, we experience difficulties with modeling substances using regular methods.

The same problem occurs when we model the state of an object. If you say: from such and such a time the light was on, what do we want to say? As a rule, we mean that at any period from the indicated interval, the bulb is in a luminous state. That is, what we used to call the state of an object is a set of time intervals during which the object is in a similar state, and not just one single time interval.

If we define the state of an object as a period of time during which an object retains some property, then we need to clarify what is meant, not the time interval, but the set of all intervals that can be obtained from the specified interval.
An equivalent alternative to this statement would be the following: at any time from the indicated range, the object had the same state. Why I do not like the second interpretation of this thesis? Because it is based on the concept of instant, which inevitably leads us to the concept of continuum. My interpretation is based on common sense and does not require the concept of a continuum.

Let's get back to the concept of registration. I wrote earlier that by registering the state of an object it can be understood:

• one-time registration of the state of the object (stream, environment)
• many registrations of similar conditions.

Moreover, our consciousness is not aware of one-time registration. When he is informed that at 12-00 the air temperature was 25 degrees, the consciousness can save this information, but cannot imagine it. He uses experience that says that the air temperature could not change quickly, consciousness offers its own version, which presents a whole story from some point before registration to some point after, for example, from 11-30 to 12-30. Throughout this time interval, consciousness suggests that the air temperature be unchanged and equal to 25 degrees. Moreover, not just throughout this interval, but throughout any range from the specified interval! The same thing happens when we see an old building. We do not just register the fact that it exists at the time of registration, we imagine its existence for a long time before and some time after. And again - not just during this time interval, but during any of the time ranges within the time interval that we have presented!

When the registration of the state of an object means many registrations, our consciousness extends the hypothesis beyond the boundaries that were built on the basis of a single registration. For example, if you inform that at 12-00, at 13-00 and at 14-00 the air temperature was the same and equal to 25 degrees, then the boundaries of the time interval during which we consider the temperature unchanged expand from 12-30 to 14- thirty.

We are busy getting new data for making forecasts with the accuracy we need, building hypotheses, and reconciling reality with these hypotheses.

For this, on the one hand, we are forced to produce new evidence, and on the other, we seek to save the resources necessary to store these hypotheses. Moreover, if we try to store the actual data without distortion, then we try to compress the hypotheses as much as possible.

I will give an example. Suppose that we know that Ivanov left point A at 11-00 and arrived at point B at 12-00, moving on foot. To imagine this movement, one can imagine a sequence of moments that, with a sufficient degree of accuracy, will transmit this movement. Since there are an infinite number of instants, such an information storage method requires an infinitely large amount of memory. However, as we see, the entire amount of stored information fits in a few words and a link to the type of movement. This is enough to imagine any segment of Ivanov’s path. To do this, we choose any time interval between 11-00 and 12-00 and fill it with a repeatedly replicated typical movement, which is stored in our memory. Of course, this is only a hypothesis, but it is close enough to predict the consequences we need. For example, after we meet Ivanov, we can ask him: is he tired of walking so much? All information compression methods are based on generalizations of this kind.

Thus, we add to the two interpretations of the term registration a new interpretation. By registering the state of an object at a certain time interval can be understood:

• one-time registration of the state of the object (flow, medium), perfect for this time interval.
• many registrations of similar states committed within this time interval.
• the set of all ranges lying within the time interval during which the state of the object was considered the same.

If the first two interpretations can be obtained as a result of the research, then the third interpretation is obtained as the result of a hypothesis that we built on the basis of registration, or a series of registrations. By the way, this means that the continuum of states is also the result of a hypothesis, but not the result of observations.

As well as state registration, the state of an object during a certain time interval can also be interpreted in three different ways:

• as a result of a one-time registration completed during this time interval.
• as a result of many registrations of similar states committed within this time interval.
• as a result of the hypothesis that the state of the object in all ranges lying inside this time interval is the same.

When modeling the first thesis, we refer from the time interval to the type of state. When modeling the second thesis, we refer from the time intervals to the type of state. When modeling the third thesis, we refer from the time interval to the type of state, but the meaning of this link is different than in the first case.