RDFS: Semantic Hierarchies and Inference

RDF Schema (RDFS) provides the foundational vocabulary for defining the structure and relationships within RDF data. It allows for the creation of lightweight ontologies by defining classes and properties.

1. Class Hierarchies: rdfs:subClassOf

The core of RDFS taxonomy is the `rdfs:subClassOf` property. It establishes a specialization relationship where every instance of a subclass is mathematically an instance of its superclass.

* **Logic:** $\forall x (x \in C_1 \implies x \in C_2)$* **Transitivity:** If `C1 subClassOf C2` and `C2 subClassOf C3`, then `C1 subClassOf C3`.

* *Application:* Defining that a `SoftwareEngineer` is a subclass of `Engineer` allows a query for all "Engineers" to automatically include all "SoftwareEngineers".

2. Property Constraints: Domain and Range

RDFS uses domain and range to provide semantic context to predicates. Crucially, these are **Inference Rules**, not validation constraints.

2.1 rdfs:domain

Specifies the class of the **Subject** of a property.

* **Rule:** If `P rdfs:domain D` and a triple `S P O` exists, then `S` is inferred to be of type `D`.

* *Example:* If `hasProgrammingLanguage` has domain `SoftwareEngineer`, and we assert `Alice hasProgrammingLanguage Java`, RDFS infers `Alice rdf:type SoftwareEngineer`.

2.2 rdfs:range

Specifies the class of the **Object** of a property.

* **Rule:** If `P rdfs:range R` and a triple `S P O` exists, then `O` is inferred to be of type `R`.

* *Example:* If `worksFor` has range `Organization`, and we assert `Alice worksFor AcmeCorp`, RDFS infers `AcmeCorp rdf:type Organization`.

3. Property Hierarchies: rdfs:subPropertyOf

Properties can also be organized hierarchically.

* **Example:** `hasFather rdfs:subPropertyOf hasParent`.

* **Inference:** If `Bob hasFather John`, the reasoner automatically asserts `Bob hasParent John`.

4. Technical Summary Table

| Construct | Purpose | Mathematical Effect |

| :--- | :--- | :--- |

| **rdfs:Class** | Defines a type | Sets a set boundary |

| **subClassOf** | Specialization |$C1 \subseteq C2$|

| **subPropertyOf**| Property specialization |$P1 \subseteq P2$|

| **rdfs:domain** | Subject typing |$\forall s, o : P(s,o) \implies D(s)$|

| **rdfs:range** | Object typing |$\forall s, o : P(s,o) \implies R(o)$ |

5. Summary

RDFS is the "Type System" of the Semantic Web. By using simple logical rules, it transforms a flat graph of triples into a structured knowledge base where information about types and relationships can be discovered through automated reasoning rather than manual labeling.