Semantics
Toaq is a loglang, which means that from any sentence, we can unambiguously derive its meaning in logic notation. Syntax describes how this process works; semantics describes how to interpret the result.
The refgram tells you that (Luı nuo sá tıqra nîe náokua) translates to . The reality is that this isn't "just" logic notation: it's a very specific notation that has been purpose-built for describing natural language semantics, and this article will help you understand the core concepts behind it.
Models
To help us reason about meaning more directly, mathematicians have come up with the idea of a model: a mathematical object that tells us exactly how to interpret statements in a given formal language. In its most basic form, a model has three parts:
- A signature, which is the set of all words and symbols found in the language, along with their syntactic properties.
- A domain, which is the set of all objects, functions, relations, etc. that the language is capable of representing.
- An interpretation, which is a function defining which symbols correspond to which elements of the domain.
For example, consider the language of basic arithmetic. A model for this language might look like this:
As it turns out, Toaq is a formal language too, which means we can reason about it using models. Now, being a human language, Toaq's semantics are quite a bit more complicated than that of arithmetic, but luckily for us, models are a pretty flexible concept, and we can extend them with extra features as we need them.
In its most basic form, a model for Toaq might look something like this:
As you can see, this model holds not just concepts like the meaning of "muao", but also context-sensitive information, such as what "káto" and "jí" refer to.
Say that you have an idea of what the world is like—maybe you have a mental model in your head, or maybe you have a database to look things up in. If your knowledge is complete enough, then that model lets you answer a question, or tell whether what someone said is true, by interpreting their words and then "looking up" the answer. But more often than not, people are working with incomplete knowledge. In this case, if someone tells you something, a model lets you interpret their words and then work backwards from the meaning to figure out what must be true about the world.
Semantic calculus
Now, we're ready to talk about notation. When you see something like , what you're looking at are a bunch of things from the domain of the model. A lot of these words ( , , , , ) are functions; some others ( ) represent literal "things" from the domain, like physical objects, people, and ideas, which we'll call individuals. Together, these words form an expression that shows you how to calculate the truth value of a specific sentence (in this case, (Neo sá kato múao)), given that you have the model.
There's a key difference here: In languages like English and mathematics, you can use words to form statements such as "The sky is blue" and " ", or you can use them to form smaller expressions, like "the author of this book" and " ". But in the semantic notation we're looking at, there are no statements, only expressions, because the point of semantics is to examine the values that things denote, including the values of statements themselves. As such, it doesn't make sense to call this a "logic notation", because on its own, it can't form statements. Instead, we'll call it a semantic calculus.
One interesting thing about this notation is that every expression has a type, like some programming languages do. These include:
- , the type of individuals, which encompasses everything you can refer in Toaq. This is a rather broad category, so to help us get more specific when we need it, it includes a couple of subtypes:
- , the type of events (things that can happen). More on them later.
- , the type of time intervals
- , the type of truth values, such as 'true' and 'false'
- , the type of worlds (frames of reference to evaluate claims by). More on them later.
There are also functions, for which we use angle brackets: is the type of functions that take an event as their input, and return a truth value as their output. Functions can take or return other functions: for example, is the type of functions that take a function from events to truth values, and return a function from time intervals to truth values.
To keep all these types straight, we give each a dedicated set of variables:
- for individuals
- for events
- for time intervals
- for worlds
It turns out we don't need variables for truth values or functions, so we don't assign them any.
TODO: lambdas