Conditional expressions

Most programming languages have conditional operators that combine a (boolean) condition and two singular terms into a singular term. For example, in Python the expression

'hi' if 2 < 7 else 'hello'

is a singular term whose value is the string 'hi' (because 2 < 7). In general, the expression

x if p else y

denotes x in case p is true and otherwise y. So, for example,

print 'hi' if 2 < 7 else 'hello'

prints 'hi',

print ('hi' if 2 < 7 else 'hello') if 8 < 7 else 'yo'
prints 'yo', and
x = 'hi' if 2 < 7 else 'hello'

assigns 'hi' to the variable x.

Arguably such expressions can also be formed in natural language.

We will say 'hi' if we're late, else/otherwise 'hello'.
Who will be there? -- Alice if you arrive before noon, otherwise Bob.
In general, the expression 'x if p else y' denotes x in case p is true and otherwise y.

It also looks like we can apply ternary conditionals to verb phrases and adverbs and adjectives:

Alice walks if she's on time and otherwise runs.
Alice walks slowly if she's early, otherwise fast.
Alice is slow if she's bored but otherwise fast.

Maybe not all of these sound completely colloquial, but I think we could easily start using conditional expressions in those ways without violating the basic rules of English.

The situation is then similar to that of 'or' and 'and', which can also join all sorts of syntactical categories besides complete sentences. For example:

Alice walked or ran home in order to watch TV with Bob or Carl.

An old-fashioned and unappealing proposal is that in the underlying logical form, 'or' and 'and' always operate on full sentences. The logical form of the previous sentence would therefore be something like

Alice walked home in order to watch TV with Bob or Alice walked home in order to watch TV with Carl or Alice ran home in order to watch TV with Bob or Alice ran home in order to watch TV with Carl.

That is not only inelegant, it doesn't even get the truth-conditions right. A much better idea is to give a uniform semantics for 'and' and 'or' that applies across syntactic categories. Given a suitable background semantics, saying that 'or' expresses set union and 'and' intersection arguably does the job.

We should similarly ask for a uniform semantics for 'if-then-else'. However, at least at first sight, most standard accounts of conditionals look very ill-suited to the task.

Consider a Stalnakerian semantics. Here

if p then q else r

is true at a world w iff q is true at the closest p world to w and r is true at the closest non-p world to w. What, then, is the denotation of

x if p else y

at a world w? In fact, the denotation is either x or y, depending on whether p is true at w. It is hard to see how a generalisation of Stalnaker's semantics could deliver that result. Nearby worlds don't even enter the picture.

Kratzerian accounts also run into problems, since the relevant singular terms, verb phrases, adverbs etc. don't seem to contain a modal that could be restricted by 'if' and 'else'.

One account that straightforwardly gets all cases right is the material conditional theory. The account I sketched in my "Displacement and Restriction" paper also seems to work. What a pleasant surprise.

Comments

No comments yet.

Add a comment

Please leave these fields blank (spam trap):

No HTML please.
You can edit this comment until 30 minutes after posting.