No, it isn't valid. What .if and .ie do is read one line, then decide
whether it gets processed or skipped, depending on the condition. The real
magic is in the \{ sequence, which is the only thing in the Roff language
resembling a "multi-line" statement.
Troff, in a manner befitting a text proces
> .if COND1 .ie COND2 xxx
> . el yyy
> If this is considered working as designed, however, the
> documentation ought to mention the restriction. It currently
> implies the opposite, by saying the part after the condition
> in an .if request "is interpreted as though it was on a line
>
Is this construct legal *roff code?
.if COND1 .ie COND2 xxx
. el yyy
Groff is OK with it if COND1 is true, but emits an "unbalanced .el request"
warning if COND1 is false. This seems logically inconsistent: whether .ie/.el
requests are balanced is a structural aspect of the document,