Blog Post · Sets and lists and matching

Sets and lists and matching ^

Posted On Wednesday 30 May 2012 by Timlan Team (timlanami_ludef)

After reading a mostly-incomprehensible document about Lojban, we've realised that we needed some way to specify exactly how groups of entities interact with other single entities or groups of entities. We have come up with two different systems which should be used together to make a fully useful system.

Firstly, we need to define two new (to timlan) terms:

* A LIST is a group of entities in which every entity is taken individually; the sentence can be split into multiple separate sentences, one for each entity, and effectively mean the same thing.

* A SET is a group of entities taken as one entity grammatically.

*** Simple relationships ***

Many entities to one entity.

Three people carried the seat:

This sentence is an example of a many to one relationship. In this sense, we mean that there is one seat, and three different people carried it, but not at the same time. In other words, it means the same as:

Person1 carried the seat. Person2 carried the seat. Person3 carried the seat.

So, in Timlan, we therefore want the subject to be taken as a list. How do we do that? Well, we do nothing, because we've decided for multiple reasons to have multiple entities be a list by default:

lugicoht seluxeta kesit f-eta rek

= Three people carried this seat, translates also to "person1 carried this seat. Person2 carried this seat. Person3 carried this seat."

One entity to one entity

We will use the same example sentence, "three people carried the seat". In this case, the three people would have been acting together, as one, to carry the seat. Therefore, we want to convert the list that is the three people into a set. So, we use a new "verb":

terit

This verb means "treated as". You use it with sit~s or (rarely) lit~s (set and list respectively) as the object in order to specify a conversion. Lists can be converted to sets, and we haven't decided about the rest yet:

teritelem sit~s lot

= "treat (thing) as a set".

So, the sentence would be:

lugicoht seluxeta kesit teritelem sit~s f-eta rek

= "Three people (treated as one entity) carried the seat" - in other words, three people carried the seat together.

Similar things can be worked out for one person and three seats in both interpretations of "three seats", this is left as an exercise for the reader.

*** Complex relationships ***

If you're intelligent like us, you might at this point be thinking, "but what about many to many relationships? Aren't they illegal or something?". Yes, we did have some issues when coming up with how to handle this, but we think we have a solution - you specify the matching with a verb attached to the clause. These clauses should usually be relative so that words like puc can still be used without horrible confusion ensuing.

Our example sentence: Three people carried three seats.

So, we have another lot of words:

mac - matched as (verb). The subject is the clause to be matched, the object is the matching type (see below).
fev - one-to-one bipartite. Each item in the subject list is matched with its corresponding item in the object list. For obvious reasons, the lists have to be the same size.
kev - complete bipartite. Each item in the subject list is matched with every item in the object list. These lists can, of course, be different sizes.

We have left it open so that, in the future, we can specify user-defined matchings, but we haven't yet decided on a decent syntax for that so we can leave it for another day/year.

If a mac clause is not given, it is left vague - you have no idea who carried which chair in our example.

So, without further ado, here are the examples and what they mean:

lugicoht f-eta rek f-eta kesit

Since f-eta rek and f-eta kesit are both lists, this sentence is intentionally vague in who exactly carried what - the important information it conveys is just that, by whatever means, three chairs were carried, and it was three people who were involved in doing it.

macelem fev lugicoht f-eta rek f-eta kesit

fev is the one-to-one matching specifier. So, this sentence means that each person carried a single chair.

macelem kev lugicoht f-eta rek f-eta kesit

kev is the complete matching specifier. So, this sentence means that of the three people, each one at some point carried all the seats (but not at the same time necessarily).

*** ANDS ***

And, finally, we realised that having "and" for and in every English usage of the word "and" was a failure of an idea. So, we made another word for and:

dan

This one is used just as a generic verb, indicating that 2 entities (or lists of entities) are to be handled as one list.

For instance

taropeht danelem ohk tok ei

= "I like apples and oranges (as a list)"
= "I like apples. I like oranges."

HAPPY?