← All Specifications

URS

The universal formalization of constitutional representation — how entities are declared, identified, related, and verified under constitutional rules.

L3 — Universal Representation System 23 Invariants 684 Lines ❄️ Frozen

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

#AxiomStatementDerived 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:

PrimitivePresent InRole
ExistenceRA1 (existence)Only existent entities may be represented
IdentityRA2 (identity)Every entity has at least one identity
RelationshipRA3 (relationship)Representations form relationship networks
ConstraintRA4 (constrained)Representation is bounded by constitutional rules
TransformationRA5 (transformative)Representation changes what can be known
VerificationRA6 (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

TermDefinition
**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:

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:

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:

Identifier types (specified, not exhaustive):

TypeScopeResolutionExample
LocalDocumentBy position in context`#1`, `_:b0`
ReferenceDocumentBy name within context`urn:urs:local:my-entity`
Content-addressedGlobalBy hash of representation`bafy...` (CID-equivalent)
ConstitutionalGlobalBy 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.

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:

Link traversal rules:

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:

VariantOrderKeysMembership
SetNoneNoEach Entity appears at most once
SequenceOrderedNoEntities ordered; duplicates permitted
MapNoneYesKey-Entity pairs; each key unique within the Map

Properties:

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:

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):

TypePurposeExample
ConstraintDefines a condition that representations must satisfyInvariant, schema, validation rule
TransformationDefines a mapping from one representation to anotherNormalization, encoding, derivation
QueryDefines a retrieval over a representationSelection, projection, traversal
DeclarationDefines a new Entity, Type, or Link TypeSchema 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:

LevelNameConditionsUse
L1**Structural identity**Conditions 1–5 aboveCanonicalization verification
L2**Content identity**L1 + all Property values byte-identicalHashing / content addressing
L3**Constitutional identity**L2 + same Constitutional Identifiers, provenance, attesationsConstitutional 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:

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:

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

KindCanonicalization Rule
EntityIdentified by its canonical Identifier. Properties ordered canonically.
PropertyName byte-ordered. Value serialized deterministically (scalars by their natural order; Entity references by canonical Identifier of target; Links by their canonical form).
IdentifierLocal identifiers normalized. Constitutional identifiers preserved verbatim.
LinkSource identified by canonical Identifier. Type string byte-ordered. Target identified by canonical Identifier. Link Properties ordered canonically.
GroupVariant 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:

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:

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:

Declared relationships — represented explicitly as Links:

Derived relationships — computable from the representation graph:

5.3 The Representation Graph

All URS representations form a directed, labeled graph where:

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:

QuestionPurpose
**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

QuestionAnswer
**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:

FieldRequired?Description
RepresenterYesThe constitutional Entity that performed the representation act
TimestampYesWhen the representation was created (ISO 8601 or constitutional time reference)
AuthorityYesThe constitutional basis for representing (inherent, granted, or derived)
Representation ContextYesThe scope within which the representation is valid
Prior StateNoThe 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

QuestionAnswer
**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 TypeDescriptionExampleVerification
**Inherent**Authority derived from being the entity representedA person represents themselvesIdentity match between Representer and represented Entity
**Granted**Authority delegated by a constitutional actA verifier is authorized by constitutional appointmentConstitutional delegation record exists and is unrevoked
**Derived**Authority arising from constitutional role or positionA UCN node represents network state by virtue of being that nodeRole or position is currently valid and the representation is within scope

Authority invariants:

6.3 Verification

QuestionAnswer
**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

QuestionAnswer
**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:

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 KindURS RepresentationProfile 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:

#### 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:


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)

#InvariantApplies ToMechanical Verification
I1Every Entity has exactly one Representation Kind (entity, property, identifier, link, group).All entitiesInspect each Entity's kind field. Confirm it is one of the five declared kinds. Reject on zero or multiple.
I2Every Entity has at least one Identifier within its Representation Context.All entitiesFor each Entity, confirm at least one Identifier is declared or derivable (by position for root Entities).
I3No Identifier is duplicated within its Representation Context.IdentifiersBuild a set of all Identifiers within the Context. Confirm count equals distinct entity count.
I4Every Property belongs to exactly one Entity. A Property not attached to an Entity does not exist.PropertiesNo free-floating Properties. Every Property appears as a child of exactly one Entity.
I5A Property value that references another Entity MUST use that Entity's Identifier within the same Representation Context (or a resolvable Constitutional Identifier).Property valuesFor each Property value of type Entity reference, resolve the Identifier. Confirm it targets an Entity in the same Context (or via cross-context resolution).
I6Every Link has exactly one source Entity and exactly one target Entity. A Link without a source or target is invalid.LinksInspect every Link's source and target. Both MUST be non-null and resolve to Entities.
I7Every Link has a declared Link Type. A Link without a type has no representational meaning.LinksInspect every Link's type field. MUST be a non-empty string or a resolvable Link Type Entity reference.
I8A 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.
I9A 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.
I10No Group may contain itself, directly or transitively. Recursive containment is prohibited.All GroupsBuild the containment graph. Confirm no path exists from a Group back to itself via nested membership.
I11Every 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 representationsStarting 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)

#InvariantApplies ToMechanical Verification
I12A Constitutional Identifier MUST be cryptographically bound to its Entity. The binding is established by including the canonical representation hash in the identity declaration.Constitutional IdentifiersFor 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.
I13A Constitutional Identifier's attestation chain MUST be unbroken. Every link in the chain from trust anchor to current declaration must be verifiable.Constitutional IdentifiersWalk 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.
I14A Local Identifier MUST be resolvable within its Representation Context and MUST NOT be treated as a Constitutional Identifier.Local IdentifiersFor each Local Identifier, confirm resolution produces exactly one Entity within the Context. Confirm the Identifier type does not carry constitutional semantics.
I15An 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 entitiesFor 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)

#InvariantApplies ToMechanical Verification
I16A representation that carries a Constitutional Identifier MUST include a provenance record (Representer, Timestamp, Authority, Context).Representations with Constitutional IdentifiersConfirm provenance record exists and all four required fields are populated. Omission means the representation is structurally valid but constitutionally incomplete.
I17The 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 provenanceFor each Entity, walk the authority chain. Confirm an authority exists that covers the Entity type and representation act.
I18A Granted authority MUST be delegable only if the granting act explicitly permits delegation. Delegation is not automatic.Authority delegationsFor each delegated authority, inspect the granting act. Confirm a `may_delegate: true` Property exists.
I19Delegation depth MUST NOT exceed the constitutional policy bound (default: 5).Authority chainsWalk 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)

#InvariantApplies ToMechanical Verification
I20Every 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 representationsConfirm 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)

#InvariantApplies ToMechanical Verification
I21A representation MUST produce the same canonical form on every invocation. Canonicalization is deterministic.All representationsRun canonicalization twice on the same representation. Byte-compare the output. Any difference is a canonicalization implementation error.
I22Two representations that are structurally identical (Section 4.1, L1) MUST produce byte-identical canonical forms.Canonicalization implementationsGiven two structurally identical representations with different local identifier names, confirm their canonical forms are byte-identical.
I23A representation containing a cycle MUST be serializable deterministically. No canonical serialization may enter infinite recursion.Cyclic representationsFor 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:

PrimitiveInvariantsRole
ExistenceI1, I11Every Entity has a kind; every representation has a root
IdentityI2, I3, I12–I15Identifiers are unique, scoped, and verifiable
RelationshipI4–I7, I10Properties and Links connect entities in governed ways
ConstraintI8, I9, I17, I18, I19Groups, authority, and delegation are bounded
TransformationI5, I6, I21, I22, I23Representations reference, link, canonicalize deterministically
VerificationI12, I13, I16Representations are verifiable through attestation and provenance

8.7 Invariant Audit

All 23 invariants satisfy the four evaluation criteria:

CriterionHow 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

PropertyValue
Layer ordinal3 (Representation)
Layer nameRepresentation
Derives fromLayer 2 (Epistemology: UCE, Calculus: UCC, Mathematics: UCM)
Depended on byLayer 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 PrincipleURS Position
Constitution before architectureURS axioms (RA1–RA6) are constitutional law derived from USCP primitives through UCE/UCM/UCC
Architecture before implementationThe five Representation Kinds and 23 invariants define the architecture; DAG-JSON-LD and DAG-CBOR-LD are implementation codecs
Implementation before optimizationThis specification defines representation invariants; conforming implementations and codec specs follow
Codec independenceURS does not depend on any serialization. Codecs SHALL preserve URS invariants, not define them.
SovereigntyRepresentation 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