URS Formal Specification v0.1.0
The universal formalization of constitutional representation — how entities are declared, identified, related, and verified under constitutional rules.
Preamble
This document is the formal specification of URS (Universal Representation System) — Layer 3 of the ICore constitutional derivation graph. It defines what constitutes a representation under constitutional governance: the kinds of entities that may exist, how they are identified, how they relate, and how their representation carries constitutional provenance, authority, and verifiability.
URS does not define canonical encodings (that is the URS Canonicalization and Codec Family). URS does not define how components communicate (that is UCN) or how components execute (that is USR). URS defines the representation model that answers: What exists?, How is it identified?, How do things relate?, and How is representation verified constitutionally?
Codec independence: URS defines the constitutional representation model. It does not prescribe any particular serialization or encoding. Canonical codecs (DAG-JSON-LD, DAG-CBOR-LD, or future codecs) are defined separately and SHALL preserve all URS invariants. This specification is encoding-agnostic — a codec is conformant if and only if every valid encoding decodes to a representation that satisfies all URS invariants.
This specification is frozen. It is an immutable constitutional artifact. Changes require formal derivation through the constitutional process, not modification.
Classification: Constitutional — defines the representation model for all of ICore.
Derivation:
UCE (Epistemology) + UCM (Mathematics) + UCC (Calculus) → URS (Representation)
Depends on: UCE (what can be known bounds what can be represented), UCM (mathematical consistency constrains representation structure), UCC (valid transformations constrain how representations change). Transitively the entire stack through UCE/UCM/UCC to USCP primitives.
Depended on by: UWA (components use URS to declare their interfaces), UCN (nodes use URS to represent network identities and messages), UCModels (data models inherit URS kinds), UCRS (coordinate references are URS Identifiers with spatial semantics), UVS (visualizations represent URS entities graphically), all downstream specs.
Section 1: Foundational Axioms
Every representation capability must trace to these axioms. Nothing exists in URS that these axioms do not authorize.
1.1 The Six Representation Axioms
| # | Axiom | Statement | Derived From |
|---|---|---|---|
| RA1 | **Representation requires existence.** | Only entities that exist may be represented. Representation of non-existence represents the absence of an entity, not a fictional entity. The represented and the representation are distinct — the representation is not the entity it represents. | Existence (USCP) |
| RA2 | **Representation requires identity.** | Every represented entity has at least one identity within its representation context. An entity without identity is not represented — it is unnamed presence. Identity may be local (context-relative) or constitutional (globally verifiable). | Identity (USCP) |
| RA3 | **Representation requires relationship.** | Every representation occurs within a network of relationships. No representation is isolated — even the declaration of a single entity implies its relationship to the representation context, the representer, and the representation act itself. | Relationship (USCP) |
| RA4 | **Representation is constrained.** | The kinds of entities, the forms of identity, the types of relationships, and the permitted transformations are bounded by constitutional rules. Unlimited representation is ungovernable representation. | Constraint (USCP) |
| RA5 | **Representation is transformative.** | Every representation act transforms some prior state of represented knowledge into a new state. Representation is not passive recording — it is an act of construction that changes what can be known. | Transformation (USCP) |
| RA6 | **Representation is verifiable.** | Every representation must be verifiable against the entity it represents. Verification may be direct (the represented entity is accessible) or indirect (the representation carries sufficient proof). Unverifiable representation is not constitutional representation — it is assertion. | Verification (USCP) |
1.2 Axiom Sufficiency
All six USCP primitives are represented across the axioms:
| Primitive | Present In | Role |
|---|---|---|
| Existence | RA1 (existence) | Only existent entities may be represented |
| Identity | RA2 (identity) | Every entity has at least one identity |
| Relationship | RA3 (relationship) | Representations form relationship networks |
| Constraint | RA4 (constrained) | Representation is bounded by constitutional rules |
| Transformation | RA5 (transformative) | Representation changes what can be known |
| Verification | RA6 (verifiable) | Representation must be verifiable against the entity |
The foundation is complete. The six primitives are fully represented.
These axioms are invariants. They define what must always be true of any constitutional representation.
Section 2: Definitions
| Term | Definition |
|---|---|
| **URS** | Universal Representation System — the constitutional model defining how entities are declared, identified, related, and verified in representation. |
| **Entity** | A distinct thing that exists in representation. The foundational URS kind. Everything that can be represented is an Entity or a relationship involving entities. |
| **Representation** | A constitutional act of declaring an Entity within URS. A representation is not the entity — it is a governed declaration *of* the entity. |
| **Representation Kind** | A primitive category of Entity within URS. URS defines a closed set of five Representation Kinds derived from USCP via UCE/UCM/UCC. |
| **Property** | A named attribute of an Entity. Properties associate values with entities. Values may be scalar, Entity references, or Links. |
| **Identifier** | A unique designation for an Entity within a representation context. Identifiers may be local (valid within a document or scope) or constitutional (globally unique and verifiable). |
| **Link** | A typed, directed relationship from one Entity (source) to another Entity (target). Links carry a type and may carry provenance. |
| **Group** | A collection of Entities. Groups may be unordered (Set), ordered (Sequence), or keyed (Map). Groups are themselves Entities. |
| **Expression** | A higher-order construct (not a primitive kind) that constrains, transforms, or queries representations. Expressions are defined in terms of the five primitive kinds — a Group of Entities with Link-type relationships that encode evaluable rules. |
| **Representation Context** | The scope within which Identifiers are resolved and Relationships are defined. Every representation occurs within at least one context. |
| **Constitutional Identity** | An Identifier that is globally unique, cryptographically bound to an Entity, and verifiable through the constitutional attestation chain. |
| **Provenance** | A verifiable record of a representation act: who represented, when, under what authority, and in what context. |
| **Authority** | The constitutional right to represent a specific Entity or class of Entities. Authority is granted, derived, or inherent — never assumed. |
| **Verification** | The process of confirming that a representation satisfies URS invariants and that its provenance is valid. |
Section 3: The URS Representation Kinds
URS defines five primitive Representation Kinds. These are the irreducible categories of representation. All constitutional representations are composed from these five kinds. A sixth concept — Expression — is a higher-order construct defined in terms of the five primitives (see Section 3.6) and does not enjoy primitive status.
Derivation Architecture
Each primitive Kind traces a formal derivation chain through the constitutional stack:
USCP Primitive
→ Intermediate Layer (UCE / UCM / UCC)
→ Representation Axiom (RA1–RA6)
→ Representation Kind
This chain ensures that every representation kind is constitutionally justified — no kind exists without a traceable path from the USCP primitives through the intermediate epistemic, mathematical, or calculative layer.
URS Kind Derivation Map:
USCP Existence → UCE (Epistemology) → RA1 → Entity
USCP Identity → UCE (Epistemology) → RA2 → Property, Identifier
USCP Relationship → UCM (Mathematics) → RA3 → Link
USCP Constraint → UCM (Mathematics) → RA4 → Group
USCP Transformation→ UCM (Mathematics) → RA5 → Group
USCP Verification → UCE (Epistemology) → RA6 → Identifier
USCP Transformation→ UCC (Calculus) → RA5 → [Expression — higher-order]
USCP Verification → UCC (Calculus) → RA6 → [Expression — higher-order]
3.1 Entity (Kind: `entity`)
Definition: A distinct thing that exists in representation. The foundational kind from which all other kinds derive. Every representation begins with an Entity.
Full derivation chain:
USCP Existence
→ UCE Axiom of Known Existence: "An entity can only be known if its existence is acknowledged prior to any claim about its nature."
→ RA1 (Representation requires existence)
→ Entity: The primitive representation of existence.
Properties:
- Every Entity has exactly one Representation Kind (its kind is intrinsic, not assigned)
- Every Entity has at least one Identifier within its Representation Context (RA2)
- An Entity may have zero or more Properties
- An Entity may be the source or target of zero or more Links
- An Entity may belong to zero or more Groups
Constitutional constraint: An Entity represents something that exists. The existence may be physical (a person, a device), conceptual (a contract, a law), or relational (a session, a relationship) — but it must be grounded in constitutional reality. Fictional entities are not representable in URS.
3.2 Property (Kind: `property`)
Definition: A named attribute of an Entity that associates a value with that entity. Properties are the mechanism by which entities are distinguished.
Full derivation chain:
USCP Identity
→ UCE Axiom of Discernibility: "An entity is known by the attributes that distinguish it from other entities."
→ RA2 (Representation requires identity)
→ Property: The primitive representation of a distinguishing attribute.
Properties:
- Every Property belongs to exactly one Entity (its owner)
- A Property has a name (a string within a naming context)
- A Property has a value, which is one of: a scalar (null, boolean, number, string, bytes), a reference to another Entity (via Identifier), or a Link
- A Property may be singular (exactly one value) or plural (zero or more values)
- A Property may be required or optional
Constitutional constraint: Properties represent attributes of the owning Entity, not independent entities. A Property value that references another Entity creates an implicit relationship that may also be represented explicitly as a Link.
3.3 Identifier (Kind: `identifier`)
Definition: A unique designation for an Entity within a representation context. Identifiers are the mechanism by which entities are known, distinguished, and verified.
Full derivation chain:
USCP Identity + USCP Verification
→ UCE Axiom of Identification: "To know an entity is to be able to refer to it uniquely."
→ UCE Axiom of Verifiability: "A reference is only knowledge if its referent can be confirmed."
→ RA2 (Representation requires identity) + RA6 (Representation is verifiable)
→ Identifier: The primitive representation of a unique, verifiable designation.
Properties:
- Every Identifier is unique within its Representation Context
- An Identifier has a scope: local (document-relative) or constitutional (globally unique)
- An Identifier may be resolvable — producing the identified Entity within its context
- Constitutional Identifiers are cryptographically bound to their Entity through an attestation chain
- An Identifier may have a type (e.g., DID, CID, URN, constitutional identity reference)
Identifier types (specified, not exhaustive):
| Type | Scope | Resolution | Example |
|---|---|---|---|
| Local | Document | By position in context | `#1`, `_:b0` |
| Reference | Document | By name within context | `urn:urs:local:my-entity` |
| Content-addressed | Global | By hash of representation | `bafy...` (CID-equivalent) |
| Constitutional | Global | By constitutional attestation chain | `urs:id:constitutional:<hash>` |
Constitutional constraint: A Constitutional Identifier is the strongest form of identity — it binds an Entity to a globally unique, verifiable reference through the constitutional attestation chain. Local Identifiers are valid within their context but carry no constitutional weight beyond that context.
3.4 Link (Kind: `link`)
Definition: A typed, directed relationship from one Entity (source) to another Entity (target). Links are the primitive representation of relationship.
Full derivation chain:
USCP Relationship
→ UCM Axiom of Relational Structure: "A relationship between two entities is representable as a directed, typed edge in a graph."
→ RA3 (Representation requires relationship)
→ Link: The primitive representation of a relationship.
Properties:
- Every Link has exactly one source Entity
- Every Link has exactly one target Entity (which may be reached via an Identifier)
- Every Link has a type (a string or reference to a Link Type Entity)
- A Link may carry its own Properties (provenance, timestamp, weight, etc.)
- Links are themselves Entities — a Link can be the source or target of other Links
- Link traversal is deterministic: given a source and a link type, the targets are enumerable
Link traversal rules:
- Links are directed: source → target. Bidirectionality requires a complementary Link.
- Link types are constitutional: only declared Link Types may be used in representations
- Link chains are representable: a Link may target an Entity that is itself the source of further Links
Constitutional constraint: A Link represents a declared relationship. Undeclared relationships are not represented. An Entity may have relationships not captured by Links — Links represent represented relationships, not all possible relationships.
3.5 Group (Kind: `group`)
Definition: A collection of Entities. Groups are themselves Entities (they have identity, properties, and may be linked). Groups structure entities without changing their identity.
Full derivation chain:
USCP Constraint + USCP Transformation
→ UCM Axiom of Composition: "Entities may be composed into collections, and collections may be decomposed into entities, without altering the identity of the members."
→ UCM Axiom of Ordering: "Collections may be ordered, keyed, or unordered; each variant imposes distinct constraints on membership."
→ RA4 (Representation is constrained) + RA5 (Representation is transformative)
→ Group: The primitive representation of structured composition.
Group variants:
| Variant | Order | Keys | Membership |
|---|---|---|---|
| Set | None | No | Each Entity appears at most once |
| Sequence | Ordered | No | Entities ordered; duplicates permitted |
| Map | None | Yes | Key-Entity pairs; each key unique within the Map |
Properties:
- Every Group has a variant (set, sequence, or map)
- Every Group has zero or more members
- A Group may be empty
- A Group is itself an Entity — it has an Identifier, may have Properties, and may be the source or target of Links
- Nested Groups are permitted (a Group may contain another Group as a member)
- Recursive containment (a Group containing itself) is prohibited
Constitutional constraint: A Group structures entities without changing their identity. Membership in a Group is a relationship (representable as a Link from the Group to each member). A Group does not own its members — it references them. The Group variant determines which structural constraints apply (uniqueness for Set, ordering for Sequence, key uniqueness for Map).
3.6 Expression (Higher-Order Construct)
Expression is not a primitive representation kind. It is a higher-order construct defined in terms of the five primitive kinds.
Definition: An Expression is a representation that constrains, transforms, or queries other representations. Expressions are themselves representable as Entities composed from the five primitive kinds.
Derivation chain:
USCP Transformation + USCP Verification
→ UCC Axiom of Computation: "Rules about representations may be expressed as representations themselves, subject to the same constitutional constraints."
→ RA5 (Representation is transformative) + RA6 (Representation is verifiable)
→ Expression: A higher-order representation of rules about representation.
Encoding in primitives: An Expression is a Group (specifically, a Map) whose members include:
- An Entity with kind `entity` and Property `expression:type` (constraint, transformation, query, declaration)
- A Link with type `expression:body` targeting the Entity or Group that encodes the operation
- Optional Links for inputs, outputs, and dependencies
Because Expression is encoded in primitives, it carries no new primitive status — any URS implementation that handles the five primitive kinds can handle Expressions without additional machinery. The constitutional significance of Expressions is recognized (constraints, transformations, and queries are fundamental to constitutional operation) but their representation is not primitive.
Expression types (defined, not exhaustive):
| Type | Purpose | Example |
|---|---|---|
| Constraint | Defines a condition that representations must satisfy | Invariant, schema, validation rule |
| Transformation | Defines a mapping from one representation to another | Normalization, encoding, derivation |
| Query | Defines a retrieval over a representation | Selection, projection, traversal |
| Declaration | Defines a new Entity, Type, or Link Type | Schema definition, type introduction |
Constitutional constraint: Expressions operate on representations, not on the entities themselves. An Expression that transforms a representation does not transform the underlying entity — it produces a new representation subject to the same URS invariants. Expressions must themselves satisfy all URS invariants.
Section 4: Canonical Representation Rules
This section defines what makes two representations the same, how representations are compared, and how they are deterministically ordered. These rules are foundational to the URS data model and must be preserved by any conforming canonicalization or codec specification.
4.1 Representation Identity (When Are Two Representations the Same?)
Two URS representations are structurally identical if and only if they have isomorphic representation graphs under identifier-renaming equivalence.
Structural identity conditions:
1. Root-kind match: Both representations have root Entities of the same Representation Kind. 2. Property equivalence: For every Property on a given Entity in representation A, there exists a corresponding Property in representation B with the same name and an equivalent value. Property equivalence for scalars is value equality; for Entity references, it is identifier resolution followed by recursive structural comparison; for Links, it is source, type, and target equivalence with recursive Link comparison. 3. Identifier normalization: Identifiers are compared after normalization (Section 4.4). Two representations that differ only in their local identifier names are structurally identical under renaming. 4. Link-structure isomorphism: The directed, labeled graph formed by Entities and Links in representation A is isomorphic to that of representation B under a bijection that preserves Link types and Entity kinds. 5. Group-member equivalence: For each Group, the membership sets/sequences/maps are equivalent under the same Entity bijection.
Equivalence hierarchy:
| Level | Name | Conditions | Use |
|---|---|---|---|
| L1 | **Structural identity** | Conditions 1–5 above | Canonicalization verification |
| L2 | **Content identity** | L1 + all Property values byte-identical | Hashing / content addressing |
| L3 | **Constitutional identity** | L2 + same Constitutional Identifiers, provenance, attesations | Constitutional verification |
4.2 Graph Equivalence (When Are Two Representation Graphs the Same?)
Two representation graphs are equivalent if there exists a bijection between their Entities such that:
- Every Entity maps to an Entity of the same Representation Kind
- Every Property maps to a Property with the same name and equivalent value
- Every Link maps to a Link with the same type connecting corresponding Entities
- Every Group member maps to a corresponding Group member with the same position (Sequence), key (Map), or set membership (Set)
Graph equivalence is the canonical comparison operation. Two representations that are graph-equivalent are interchangeable for all structural purposes.
4.3 Canonical Ordering
Canonical ordering is required for deterministic serialization, hashing, and comparison.
Property ordering: Within an Entity, Properties are ordered canonically by their name (lexicographic byte order of the property name string).
Link ordering: Where links from a single source Entity must be ordered (for deterministic serialization), they are ordered primarily by Link type (lexicographic), then by target Identifier (lexicographic), then by a canonical hash of the Link's Properties if any.
Group member ordering:
- Set: Members are ordered by their canonical Identifier (lexicographic). An implementation MAY produce any ordering for internal use but MUST produce canonical ordering for serialization.
- Sequence: Member order is as declared. The Sequence variant is the only one where order carries semantic meaning.
- Map: Entries are ordered by key (lexicographic byte order of the key).
4.4 Identifier Normalization
Local identifiers: Are normalized by replacing each local identifier with a canonical blank-node label derived from the Entity's position in a deterministic traversal of the representation graph (depth-first, kind-order, property-order).
Constitutional identifiers: Are never normalized. They are immutable by definition.
Cross-context reference: An Identifier that references an Entity in a different Representation Context is resolved to that context's canonical form, then compared.
4.5 Cycle Handling
Detection: Every conforming URS implementation MUST detect cycles in the representation graph (Entity → Link → Entity chains).
Permitted cycles: Cycles are permitted in the representation graph. A Link chain may form a cycle (Entity A links to Entity B which links back to Entity A). This represents mutual relationship, not error.
Prohibited cycles: A Group MUST NOT contain itself, directly or transitively (Invariant I10). An Identifier MUST NOT be declared as its own resolution target (a self-referencing identifier is a representation error).
Deterministic traversal: A conforming implementation MUST handle cycles deterministically during traversal — either by maintaining a visited-Entity set and terminating cycles at the revisit point, or by recording cycle depth and bounding traversal.
Cycle serialization: A canonical serialization of a graph containing cycles MUST document each cycle's structure (source → link → intermediate chain → return link) rather than entering infinite recursion.
4.6 Canonicalization Rules for Each Kind
| Kind | Canonicalization Rule |
|---|---|
| Entity | Identified by its canonical Identifier. Properties ordered canonically. |
| Property | Name byte-ordered. Value serialized deterministically (scalars by their natural order; Entity references by canonical Identifier of target; Links by their canonical form). |
| Identifier | Local identifiers normalized. Constitutional identifiers preserved verbatim. |
| Link | Source identified by canonical Identifier. Type string byte-ordered. Target identified by canonical Identifier. Link Properties ordered canonically. |
| Group | Variant declared. Members ordered as defined in Section 4.3. Nested Groups canonicalized recursively. |
Section 5: Identity and Relationship Model
5.1 Identity Model
URS recognizes two levels of identity:
Local Identity: An Entity has local identity if it can be uniquely referred to within its Representation Context. Local identity is established by:
- Position (e.g., the third Entity declared in a document)
- Local name (e.g., `_:myEntity` in a document-scoped namespace)
- Structural uniqueness (e.g., the only Entity of its kind with a given Property value)
Local Identifiers are valid only within their Representation Context. Two different contexts may assign the same Local Identifier to different Entities without conflict.
Constitutional Identity: An Entity has constitutional identity if it is bound to a globally unique, verifiable Identifier through the constitutional attestation chain. Constitutional Identity is established by:
- A constitutional identity declaration signed by an authorized representer
- Cryptographic binding between the Identifier and the Entity (via content-addressed representation hash)
- An attestation chain tracing authority back to a constitutional trust anchor
Constitutional Identity is the strongest identity claim in URS. An Entity with Constitutional Identity can be verified across any Representation Context.
Identity resolution chain:
Local Identifier → Context-scoped lookup → Entity
Constitutional Identifier → Attestation chain verification → Constitutional Identity → Entity
5.2 Relationship Model
URS recognizes three categories of relationships:
Structural relationships — inherent to the representation model:
- Entity has Property (Entity → Property)
- Entity has Identifier (Entity → Identifier)
- Group contains Entity (Group → Entity via membership Link)
Declared relationships — represented explicitly as Links:
- Source Entity → [Link Type] → Target Entity
- Links are first-class Entities (can be identified, described, and verified independently)
- Link types are declared and governed
Derived relationships — computable from the representation graph:
- Transitive closure of Link chains
- Property value references to other Entities
- Group membership hierarchies (membership of members)
5.3 The Representation Graph
All URS representations form a directed, labeled graph where:
- Nodes are Entities (with Groups and Links as Entity subtypes)
- Edges are Links (typed, directed relationships)
- Labels are Properties (named attributes on nodes and edges)
- Identifiers are node designators within the graph
This graph is the universal representation canvas. Every constitutional representation is a subgraph of this universal graph, scoped by Representation Context.
Section 6: Constitutional Semantics
URS representations carry constitutional meaning beyond structure. Every constitutional semantic field in this section is specified with four answers:
| Question | Purpose |
|---|---|
| **Why is it constitutional?** | The constitutional principle that requires this field to exist. Traces to a USCP primitive. |
| **What invariant requires it?** | The specific URS invariant that mandates or constrains this field. |
| **How is it verified?** | The mechanical or protocol-level check that confirms this field is valid. |
| **What happens if it is absent?** | The constitutional consequence of omission — whether the representation is invalid, degraded, or structurally valid but non-constitutional. |
These answers strengthen the specification by converting architectural descriptions into testable, enforceable requirements.
6.1 Provenance
| Question | Answer |
|---|---|
| **Why is it constitutional?** | RA3 (Relationship) and RA6 (Verification) require that every representation act be traceable. Untraced representation is unverifiable, and unverifiable representation is assertion, not constitutional representation. |
| **What invariant requires it?** | I17: Every representation that carries a Constitutional Identifier MUST include a provenance record. I18: Every representation act MUST be traceable to a Representer with valid authority. |
| **How is it verified?** | A conforming implementation verifies provenance by (a) confirming the Representer is a valid Entity, (b) confirming the Timestamp is within an acceptable temporal bound, (c) confirming the declared Authority is valid for the representation act, (d) confirming the Prior State Identifier (if any) resolves to a valid representation. |
| **What happens if it is absent?** | A representation with Constitutional Identifiers but no provenance is **invalid** — it is structurally well-formed but constitutionally incomplete. A representation with only Local Identifiers MAY omit provenance and remain valid as structurally identifiable data, but it carries no constitutional weight and cannot be used in constitutional contexts (verification, governance, attestation). |
Provenance record fields:
| Field | Required? | Description |
|---|---|---|
| Representer | Yes | The constitutional Entity that performed the representation act |
| Timestamp | Yes | When the representation was created (ISO 8601 or constitutional time reference) |
| Authority | Yes | The constitutional basis for representing (inherent, granted, or derived) |
| Representation Context | Yes | The scope within which the representation is valid |
| Prior State | No | The Identifier of the representation (if any) that this representation supersedes or derives from |
Provenance chain:
Representation_N { Representer, Timestamp, Authority, Context, Prior → Representation_N-1 }
↓
Representation_N-1 { ..., Prior → Representation_N-2 }
↓
... → Representation_0 { Origin Declaration }
6.2 Authority and Authorization
| Question | Answer |
|---|---|
| **Why is it constitutional?** | RA4 (Constraint) requires that representation be bounded by rules — including who may represent what. Unauthorized representation is ungoverned representation, which is indistinguishable from assertion. |
| **What invariant requires it?** | I19: Every representation act MUST have a Representer with declared or derivable authority for each Entity represented. I20: A Granted authority MUST permit delegation explicitly — delegation is never automatic. |
| **How is it verified?** | Verification confirms (a) the declared Authority type is one of the three recognized forms, (b) for Granted authority, the granting constitutional act is valid and unrevoked, (c) for Derived authority, the role or position is currently held, (d) for delegation chains, each link in the chain explicitly permits delegation. |
| **What happens if it is absent?** | A representation without declared authority is **structurally valid but constitutionally unweighted** — it carries no claim about who had the right to represent. It may be treated as data but not as constitutional representation. |
URS recognizes three forms of authority:
| Authority Type | Description | Example | Verification |
|---|---|---|---|
| **Inherent** | Authority derived from being the entity represented | A person represents themselves | Identity match between Representer and represented Entity |
| **Granted** | Authority delegated by a constitutional act | A verifier is authorized by constitutional appointment | Constitutional delegation record exists and is unrevoked |
| **Derived** | Authority arising from constitutional role or position | A UCN node represents network state by virtue of being that node | Role or position is currently valid and the representation is within scope |
Authority invariants:
- Every representation act is traceable to a specific authority
- An authority may delegate its representational authority (through a constitutional delegation act)
- Delegation is transitive only if each granting act explicitly permits it
- Delegation depth is bounded by constitutional policy (default: maximum depth of 5)
- Authority without provenance is not authority — it is claimed authority
6.3 Verification
| Question | Answer |
|---|---|
| **Why is it constitutional?** | RA6 (Verification) requires that every representation be verifiable against the entity it represents. A representation that cannot be verified is assertion, not constitutional representation. |
| **What invariant requires it?** | I13 (Constitutional Identifiers cryptographically bound), I14 (attestation chain unbroken), I16 (Constitutional Identifiers carry provenance). These collectively ensure verifiability. |
| **How is it verified?** | Three-level verification (below). Each level subsumes the prior. |
| **What happens if it is absent?** | A representation that fails verification at any level is **constitutionally invalid** at that level. Structural failure invalidates the entire representation; identity failure invalidates all claims involving the misbound Identity; constitutional failure invalidates the representation's authority but may leave its structure intact for non-constitutional use. |
Representation verification in URS operates at three levels:
Level 1 — Structural verification: The representation satisfies all URS invariants (I1–I23). The representation graph is well-formed. Kinds are valid. Identifiers are unique within their context. Links connect existent Entities. Canonical ordering rules are followed. Cycles are handled deterministically.
Level 2 — Identity verification: Every Constitutional Identifier is cryptographically bound to its Entity. The attestation chain is unbroken. The represented Entity matches the declared identity. Local Identifiers are not used outside their declared Context.
Level 3 — Constitutional verification: The representation carries valid provenance. The Representer had authority to represent. The representation was performed within a valid constitutional context. The representation does not violate any constitutional constraint applicable to the represented Entity type. Authority delegations are valid and within bounded depth.
6.4 Representation Context
| Question | Answer |
|---|---|
| **Why is it constitutional?** | RA4 (Constraint) requires that representation be bounded. Without a Context, Identifiers cannot be resolved, provenance cannot be scoped, and verification cannot be performed. |
| **What invariant requires it?** | I22: Every representation MUST carry or inherit a Representation Context. A representation without a declared context is incomplete. |
| **How is it verified?** | Verification confirms (a) that a Representation Context is declared or inheritable, (b) that all Identifiers used in the representation are resolvable within that Context, (c) that any cross-context references are explicitly declared. |
| **What happens if it is absent?** | A representation without a Context is **structurally valid but semantically ambiguous** — its Identifiers cannot be resolved, its provenance cannot be scoped, and its constitutional weight is zero. |
The Context defines:
- The scope within which Identifiers are resolved
- The set of constitutional rules applicable to the representation
- The trust anchors for identity verification
- The boundaries of the representation graph fragment
Contexts may nest: a representation within Context A may reference Entities whose identities are resolved in a sub-Context B. Context boundaries are constitutional — crossing a context boundary requires explicit declaration.
Section 7: Compatibility Profiles
URS is an independent representation model. It does not depend on any external data model for its definition or validity. However, interoperability with existing ecosystems is a strategic priority. This section defines compatibility profiles — subsets of URS that correspond to external data models, enabling bidirectional interop without making those models part of URS core.
7.1 IPLD Compatibility Profile
#### 7.1.1 Profile Scope
The IPLD Compatibility Profile defines a subset of URS that maps to and from IPLD's data model without loss. A URS implementation that supports this profile SHALL accept any valid IPLD representation and produce an equivalent URS representation, and SHALL accept any URS representation within the profile and produce the original IPLD representation.
#### 7.1.2 IPLD Kind Mapping
| IPLD Kind | URS Representation | Profile Constraint |
|---|---|---|
| `null` | Property value (scalar `null`) | — |
| `bool` | Property value (scalar `boolean`) | — |
| `int` | Property value (scalar `integer`) | — |
| `float` | Property value (scalar `float`) | — |
| `string` | Property value (scalar `string`) | — |
| `bytes` | Property value (scalar `bytes`) | — |
| `list` | Group (Sequence variant) | Each element mapped to a member Entity |
| `map` | Group (Map variant) | Each key-value pair mapped to a keyed entry |
| `link` (CID) | Link (Link Type `ipld:cid`) | Target Identifier is the CID value |
#### 7.1.3 Profile Constraints
A URS representation conforms to the IPLD Compatibility Profile if and only if:
- It uses only the Entity, Property, Identifier (Local only), Group, and Link kinds
- All Identifiers are Local (no Constitutional Identifiers used)
- No provenance or authority declarations are present (they may be carried opaquely without requiring constitutional processing)
- The representation graph is acyclic and strictly content-addressable
- All Link targets are content-addressable Identifiers (CIP-equivalent)
- The representation requires no constitutional semantics for structural interpretation
#### 7.1.4 Interop Path
IPLD Data
→ URS Entity mapped via Section 7.1.2
→ IPLD Compatibility Profile subset
→ Optional: add provenance (Representer, Authority, Timestamp)
→ Optional: upgrade Local Identifiers to Constitutional Identifiers
→ Full URS Representation (outside profile)
#### 7.1.5 Profile Invariant
A URS representation within the IPLD Compatibility Profile MUST NOT require constitutional semantics for interpretation. An IPLD consumer reading a profile-conformant representation may ignore provenance, authority, and constitutional identity without losing the data's structural meaning. A URS representation outside the profile MUST declare its constitutional requirements explicitly; a compliant URS implementation MUST NOT silently drop constitutional semantics when converting to IPLD format.
7.2 RDF Compatibility Profile (Future)
A profile mapping URS to RDF/OWL is recognized as a future specification target. The RDF profile will map URS Entities to RDF nodes, URS Properties to RDF predicates, and URS Links to RDF triples. It is not defined in this specification.
7.3 Future Profiles (Extensibility)
Additional compatibility profiles may be defined as separate specifications. Each profile SHALL:
- Declare which URS invariants it preserves and which (if any) it relaxes
- Specify a bidirectional mapping between URS and the target model
- Document lossy aspects of the mapping (if any)
- Preserve all URS invariants in the URS direction
Section 8: Invariants
The following invariants constrain every valid URS representation. An implementation that violates any invariant is not conformant to this specification.
Every invariant is specified with its mechanical verifiability — the precise check that a conforming implementation SHALL perform to confirm the invariant holds.
8.1 Structural Invariants (I1–I11)
| # | Invariant | Applies To | Mechanical Verification |
|---|---|---|---|
| I1 | Every Entity has exactly one Representation Kind (entity, property, identifier, link, group). | All entities | Inspect each Entity's kind field. Confirm it is one of the five declared kinds. Reject on zero or multiple. |
| I2 | Every Entity has at least one Identifier within its Representation Context. | All entities | For each Entity, confirm at least one Identifier is declared or derivable (by position for root Entities). |
| I3 | No Identifier is duplicated within its Representation Context. | Identifiers | Build a set of all Identifiers within the Context. Confirm count equals distinct entity count. |
| I4 | Every Property belongs to exactly one Entity. A Property not attached to an Entity does not exist. | Properties | No free-floating Properties. Every Property appears as a child of exactly one Entity. |
| I5 | A Property value that references another Entity MUST use that Entity's Identifier within the same Representation Context (or a resolvable Constitutional Identifier). | Property values | For each Property value of type Entity reference, resolve the Identifier. Confirm it targets an Entity in the same Context (or via cross-context resolution). |
| I6 | Every Link has exactly one source Entity and exactly one target Entity. A Link without a source or target is invalid. | Links | Inspect every Link's source and target. Both MUST be non-null and resolve to Entities. |
| I7 | Every Link has a declared Link Type. A Link without a type has no representational meaning. | Links | Inspect every Link's type field. MUST be a non-empty string or a resolvable Link Type Entity reference. |
| I8 | A Group (Set variant) MUST NOT contain the same Entity more than once. Duplicate membership is prohibited. | Groups (Set) | For each Set-variant Group, hash each member's canonical Identifier. Confirm no hash collisions. |
| I9 | A Group (Map variant) MUST have unique keys. No two entries in a Map may share the same key. | Groups (Map) | For each Map-variant Group, build a set of declared keys. Confirm count equals entry count. |
| I10 | No Group may contain itself, directly or transitively. Recursive containment is prohibited. | All Groups | Build the containment graph. Confirm no path exists from a Group back to itself via nested membership. |
| I11 | Every representation has exactly one root Entity — the top-level Entity from which all other Entities in the representation are reachable via Properties, Links, or Group membership. | All representations | Starting from every Entity, walk Properties → referenced Entities, Links → source/target Entities, Group → member Entities. Confirm exactly one Entity is reachable from all paths (the root). |
8.2 Identity Invariants (I12–I15)
| # | Invariant | Applies To | Mechanical Verification |
|---|---|---|---|
| I12 | A Constitutional Identifier MUST be cryptographically bound to its Entity. The binding is established by including the canonical representation hash in the identity declaration. | Constitutional Identifiers | For each Constitutional Identifier, compute the canonical hash of the Entity's representation (excluding the Identifier itself). Confirm it matches the hash declared in the Identifier. |
| I13 | A Constitutional Identifier's attestation chain MUST be unbroken. Every link in the chain from trust anchor to current declaration must be verifiable. | Constitutional Identifiers | Walk the attestation chain from trust anchor to current Identifier. Confirm each signature is valid and each link's subject matches the next link's issuer. |
| I14 | A Local Identifier MUST be resolvable within its Representation Context and MUST NOT be treated as a Constitutional Identifier. | Local Identifiers | For each Local Identifier, confirm resolution produces exactly one Entity within the Context. Confirm the Identifier type does not carry constitutional semantics. |
| I15 | An Entity with a Constitutional Identifier MUST carry provenance (Section 6.1). An Entity with only Local Identifiers MAY carry provenance but is not required to. | All entities | For each Entity with any Constitutional Identifier, confirm provenance fields (Representer, Timestamp, Authority, Context) are present and populated. |
8.3 Provenance and Authority Invariants (I16–I19)
| # | Invariant | Applies To | Mechanical Verification |
|---|---|---|---|
| I16 | A representation that carries a Constitutional Identifier MUST include a provenance record (Representer, Timestamp, Authority, Context). | Representations with Constitutional Identifiers | Confirm provenance record exists and all four required fields are populated. Omission means the representation is structurally valid but constitutionally incomplete. |
| I17 | The Representer MUST have authority (inherent, granted, or derived) to represent each Entity in the representation. Authority for each Entity must be declared or derivable. | All representations with provenance | For each Entity, walk the authority chain. Confirm an authority exists that covers the Entity type and representation act. |
| I18 | A Granted authority MUST be delegable only if the granting act explicitly permits delegation. Delegation is not automatic. | Authority delegations | For each delegated authority, inspect the granting act. Confirm a `may_delegate: true` Property exists. |
| I19 | Delegation depth MUST NOT exceed the constitutional policy bound (default: 5). | Authority chains | Walk each authority chain from trust anchor to current. Count the number of delegation links. If the count exceeds the bound, the authority is invalid. |
8.4 Representation Context Invariant (I20)
| # | Invariant | Applies To | Mechanical Verification |
|---|---|---|---|
| I20 | Every representation MUST carry or inherit a Representation Context. A representation without a declared or inheritable context is incomplete — its Identifiers cannot be resolved and its provenance cannot be verified. | All representations | Confirm a Representation Context is declared in the representation metadata or inherited from a containing representation. If neither exists, the representation is structurally valid but semantically ambiguous. |
8.5 Canonicalization Invariants (I21–I23)
| # | Invariant | Applies To | Mechanical Verification |
|---|---|---|---|
| I21 | A representation MUST produce the same canonical form on every invocation. Canonicalization is deterministic. | All representations | Run canonicalization twice on the same representation. Byte-compare the output. Any difference is a canonicalization implementation error. |
| I22 | Two representations that are structurally identical (Section 4.1, L1) MUST produce byte-identical canonical forms. | Canonicalization implementations | Given two structurally identical representations with different local identifier names, confirm their canonical forms are byte-identical. |
| I23 | A representation containing a cycle MUST be serializable deterministically. No canonical serialization may enter infinite recursion. | Cyclic representations | For each detected cycle, confirm the canonical form documents the cycle structure without infinite recursion. |
8.6 Invariant Coverage
All six USCP primitives are represented across the invariants:
| Primitive | Invariants | Role |
|---|---|---|
| Existence | I1, I11 | Every Entity has a kind; every representation has a root |
| Identity | I2, I3, I12–I15 | Identifiers are unique, scoped, and verifiable |
| Relationship | I4–I7, I10 | Properties and Links connect entities in governed ways |
| Constraint | I8, I9, I17, I18, I19 | Groups, authority, and delegation are bounded |
| Transformation | I5, I6, I21, I22, I23 | Representations reference, link, canonicalize deterministically |
| Verification | I12, I13, I16 | Representations are verifiable through attestation and provenance |
8.7 Invariant Audit
All 23 invariants satisfy the four evaluation criteria:
| Criterion | How It Is Met |
|---|---|
| **Necessary** | Each invariant traces to a Representation Axiom and a USCP primitive. Removing any invariant would weaken the model's ability to constrain constitutional representation. |
| **Independent** | No invariant is derivable from any combination of the others. Each constrains a distinct aspect (structure, identity, provenance, context, canonicalization). |
| **Verifiable** | Every invariant has a defined mechanical verification procedure. A conforming implementation can execute the check and produce a pass/fail result. |
| **Testable** | Each invariant can be tested in isolation with a constructed representation that violates it. The conformance suite SHALL include a test case for each invariant (pass case + fail case). |
Section 9: Constitutional Layer
| Property | Value |
|---|---|
| Layer ordinal | 3 (Representation) |
| Layer name | Representation |
| Derives from | Layer 2 (Epistemology: UCE, Calculus: UCC, Mathematics: UCM) |
| Depended on by | Layer 4 (Components: UWA, Networking: UCN), Layer 3 spec siblings (UCRS, UCModels, UVS) |
| Governance status | **Constitutional — frozen. Changes require formal derivation, not modification.** |
Doctrine Position
| Doctrine Principle | URS Position |
|---|---|
| Constitution before architecture | URS axioms (RA1–RA6) are constitutional law derived from USCP primitives through UCE/UCM/UCC |
| Architecture before implementation | The five Representation Kinds and 23 invariants define the architecture; DAG-JSON-LD and DAG-CBOR-LD are implementation codecs |
| Implementation before optimization | This specification defines representation invariants; conforming implementations and codec specs follow |
| Codec independence | URS does not depend on any serialization. Codecs SHALL preserve URS invariants, not define them. |
| Sovereignty | Representation is sovereign — no external system can dictate what entities exist, how they are identified, or how they relate |
End of URS Formal Specification v0.1.0