18.17. Logical and non-logical connectives within mekso

The following cmavo are discussed in this section:

.abu

BY

letter a

by

BY

letter b

cy

BY

letter c

fe'a

VUhU

nth root of (default square root)

lo'o

LOhO

terminator for LI

As befits a logical language, Lojban has extensive provision for logical connectives within both operators and operands. Full details on logical and non-logical connectives are provided in Chapter 18. Operands are connected in afterthought with selma'o A and in forethought with selma'o GA, just like sumti. Operators are connected in afterthought with selma'o JA and in forethought with selma'o GUhA, just like tanru components. This parallelism is no accident.

In addition, A+BO and A+KE constructs are allowed for grouping logically connected operands, and keke'e is allowed for grouping logically connected operators, although there are no analogues of tanru among the operators.

Despite the large number of rules required to support this feature, it is of relatively minor importance in the mekso scheme of things. Example 18.114 exhibits afterthought logical connection between operands:

Example 18.114. 

veici.avove'oprenucuklamalezarci
(Threeorfour)peoplegoto-themarket.

Example 18.115 is equivalent in meaning, but uses forethought connection:

Example 18.115. 

veigacigivove'oprenucuklamalezarci
(Either3or4)peoplegoto-themarket.

Note that the mekso here are being used as quantifiers. Lojban requires that any mekso other than a simple number be enclosed in parentheses when used as a quantifier. This rule prevents ambiguities that do not exist when using li.

By the way, li has an elidable terminator, lo'o, which is needed when a li sumti is followed by a logical connective that could seem to be within the mekso. For example:

Example 18.116. 

liresu'iredu
The-numbertwoplustwoequals
livolo'o.onailonalseldjunonamcu
the-numberfouror-elseanon-knownnumber.

Omitting the lo'o would cause the parser to assume that another operand followed the .onai and reject lo as an invalid operand.

Simple examples of logical connection between operators are hard to come by. A contrived example is:

Example 18.117. 

liresu'ijepi'iredulivo
The-numbertwoplusandtimestwoequalsthe-numberfour.
2 + 2 = 4 and 2 × 2 = 4.

The forethought-connection form of Example 18.117 is:

Example 18.118. 

liregu'esu'igipi'iredulivo
the-numbertwobothplusandtimestwoequalsthe-numberfour.
Both 2 + 2 = 4 and 2 × 2 = 4.

Here is a classic example of operator logical connection:

Example 18.119. 

goli.abubi'epi'iveixy.te'areve'osu'i
If-and-only-ifthe-numberatimes(xpowertwo)plus
by.bi'epi'ixy.su'icy.dulino
btimesxpluscequalsthe-numberzero
gilixy.duliveiva'aby.ku'e
thenthe-numberxequalsthe-number[the-negation-of(b)
su'ijavu'ufe'a
plusorminusthe-root-of
veiby.bi'ete'arevu'uvobi'epi'i.abubi'epi'icy.
(bpower2minusfourtimesatimesc
ve'o[ku'e]ve'ofe'irebi'epi'i.abu
)]divided-bytwotimesa
Iff a x 2 + b x + c = 0 , then x = - b ± b 2 - 4 a c 2 a

Note the mixture of styles in Example 18.119: the negation of b and the square root are represented by forethought and most of the operator precedence by prefixed bi'e, but explicit parentheses had to be added to group the numerator properly. In addition, the square root parentheses cannot be removed here in favor of simple fe'a and ku'e bracketing, because infix operators are present in the operand. Getting Example 18.119 to parse perfectly using the current parser took several tries: a more relaxed style would dispense with most of the bi'e cmavo and just let the standard precedence rules be understood.

Non-logical connection with JOI and BIhI is also permitted between operands and between operators. One use for this construct is to connect operands with bi'o to create intervals:

Example 18.120. 

linoga'obi'oke'ipa
the-numberzero(inclusive)from-to(exclusive)one
[0,1)

the numbers from zero to one, including zero but not including one


Intervals defined by a midpoint and range rather than beginning and end points can be expressed by mi'i:

Example 18.121. 

lipimuga'omi'ike'ipimu
the-number0.5(inclusive)centered-with-range(exclusive)0.5

which expresses the same interval as Example 18.120. Note that the ga'o and ke'i still refer to the endpoints, although these are now implied rather than expressed. Another way of expressing the same thing:

Example 18.122. 

lipimusu'ini'upimubi'oke'ima'upimu
the-number0.5plus[-0.5from-to(exclusive)+0.5]

Here we have the sum of a number and an interval, which produces another interval centered on the number. As Example 18.122 shows, non-logical (or logical) connection of operands has higher precedence than any mekso operator.

You can also combine two operands with ce'o, the sequence connective of selma'o JOI, to make a compound subscript:

Example 18.123. 

xy.xiveiby.ce'ody.[ve'o]
xsub(bsequenced)
xb,d