If ... then ...

The construction If ... then ... is used for making an implication (semantic rule). The construction can be used for two purposes: SWRL rules and axioms about properties/roles. In SWRL rules about concept and roles variables appear with a/the prefix. There is a special class of semantic rules - axioms about roles in which X/Y variables are used. Both antecedent and consequent clauses in the implication can be complex sentences.

Different use cases of variables in semantic rules are summed up in the table below.

Variable pattern Use case
a/the class-name  denotes variables assigned to a class/concept
a/the thing  represents an instance of the top concept "owl:Thing" and thus any variable in the SR-CE sentence.
a/the class-name(n)/thing(n)  different number in parenthesis marks more variables of the same type.

Examples

Those examples show how to write semantic rules with the construction If ... then ....

Example: Axiom about role. Semantic rule for general role inclusion.
If X is-proper-part-of Y then X is-part-of Y.
Example: In the semantic rule below, there is one variable 'person'.
If a person is-year-old greater-or-equal-to 18 then the person is an adult-person.
Example: In the semantic rule below, there is one variable which could be anything.
If a thing is a person then the thing has-name (some string value).