Composition

Definition

Composition is the categorical backbone of the UOR transform system. It turns the collection of transforms into a category with identity morphisms and associative composition. The class Composition represents a transform formed by sequentially applying two or more transforms.

Composition Primitive

A Composition is a subclass of Transform. Its component transforms are declared via compositionComponents, and the resulting transform is given by compositionResult:

PropertyRangeDescription
compositionComponentsTransformComponent transforms
compositionResultTransformResulting transform
compositionOrderxsd:nonNegativeIntegerNumber of components

The property composesWith declares composability between transforms: the target of the first must match the source of the second.

Identity

The class Identity represents the identity transform on a type. The property identityOn declares which type the identity acts on. Composing any transform with its identity is a no-op.

Composition Laws

A CompositionLaw records how specific operations compose:

PropertyRangeDescription
lawComponentsOperationOperations being composed
lawResultOperationThe resulting operation
isAssociativexsd:booleanWhether the law is associative
isCommutativexsd:booleanWhether the law is commutative

The Critical Composition

The named individual criticalComposition encodes the operational form of the critical identity theorem:

neg compose bnot = succ

This law is non-associative and non-commutative: the order of composition matters, and the law does not extend to arbitrary triples.

morphism:criticalComposition
    a                           morphism:CompositionLaw ;
    morphism:lawComponents      op:neg, op:bnot ;
    morphism:lawResult          op:succ ;
    morphism:isAssociative      false ;
    morphism:isCommutative      false .

Structure Preservation

The property preservedInvariant records which identity a transform preserves (linking to the op:Identity that the transform commutes with). This connects composition to the certification layer: a Isometry preserves metric structure via preservesMetric.

The critical composition neg ∘ bnot = succ is the rewrite rule that drives the DihedralFactorizationResolver — see Factorization for how this law decomposes ring elements under the dihedral group action.