Solution (source code)

= Solution

The standard relational <guarded fragment> contains $\boxed{\text{(i) and (ii)}}$. In (i), $\mathit{Student}(x)$ guards the only quantified variable:
$$
\forall x\bigl(\mathit{Student}(x)\to(\mathit{Takes}(x,\mathit{KRR},2015)\to((\mathit{Undergrad}(x)\lor\mathit{Masters}(x))\land\neg(\mathit{Undergrad}(x)\land\mathit{Masters}(x))))\bigr).
$$
The constants in the course-taking relation do not introduce additional free variables that need guarding.

For (ii), use the two implications from part (c)(i). Each outer <universal quantification> is guarded by its unary category predicate. The inner <existential quantification> can be written
$$
\exists y\,(\mathit{SupervisedBy}(x,y)\land\top),
$$
whose guard contains both $x$ and $y$. Sentence (iii) uses a nonconstant function and so is outside the standard relational <guarded fragment>. This conclusion uses the original vocabulary; it does not silently replace the counting term by a fresh relation.