RDF MUST give class schemas: a class and its fields, each field a property, a range (a plain string, a plain string that is one of a list of words, whose union is the field's type, a string in a language, either, a boolean, an integer, or a reference to an individual of a class) and a cardinality (one, optional, many). The type of an individual's values MUST be derived from its schema and never written twice; an individual made by a schema MUST be a named node of the schema's class, usable wherever a reference to that class is asked for; and a required field left out, a value of the wrong range or a reference to an individual of another class MUST NOT compile. An individual's triples MUST be its rdf:type and then its fields in the schema's order, each field's values in the order given.
Enforced (check): .github: cd commons/rdf && bun test suite/ — rdf.test.ts: an individual's values typed from its schema, its triples in the schema's order, and type-level tests of a missing field, a wrong range and a wrong class
Proved by: rdf/suite/rdf.test.ts
Written in: rdf/src/rdf-schema.ts
Tests: passed: suite/rdf.test.ts the compiler refuses an individual of another class, a missing field and a wrong range; passed: suite/rdf.test.ts an individual's triples are its type, then its fields in the schema's order, values in the
Cited by: The ontology in TypeScript