COMPO · 6.03 · FORMAT-NORMALIZATION / SCALE INVARIANCE

Format
normalization &
scale invariance.

Canonical normalization layer Topic 6: versioned CanvasNormalizationContext, isotropic short-side-normalized Euclidean space, separate axis-fraction UV placement space, dimensional normalization law and explicit common-scale invariance. Этот модуль впервые канонически поставляет shortSidePx для ранее ожидавших его 4.01 и 5.02.

ModuleCompo 6.03
Scopenormalization / invariance
CanonicalSHORT_SIDE_ISOTROPIC
UVplacement only
Topic6 · FORMAT
Next6.04

Canonical normalization owner

00 / module api

6.03 вводит единый normalization context для canvas-relative geometry и закрывает старый dependency на `shortSidePx`.

CANONICAL

SHORT_SIDE_ISOTROPIC — metric geometry.

PARALLEL

AXIS_FRACTION_UV — placement coordinates only.

FINALITY

NORMALIZATION / SCALE-INVARIANCE CONTRACT ONLY.

NORMALIZATION ≠ RESIZE. 6.03 преобразует representation и units. Он не масштабирует реальные objects и не выполняет layout adaptation.

Short-side context

01 / CanvasNormalizationContext

Контекст хранит source extent и сам scale, чтобы normalized values всегда имели проверяемую lineage.

CanvasNormalizationContext {
  contextRef,
  canvasRef,
  normalizationDomainRef,

  mode:
    SHORT_SIDE_ISOTROPIC,

  sourceUnit,

  width,
  height,
  shortSide,
  longSide,

  lengthScaleValue:
    shortSide,

  areaScaleValue:
    shortSide²,

  shortSidePx?,
  widthShortN,
  heightShortN,
  longSideShortN,
  areaShortN2,
  diagonalShortN,

  axisFractionSpaceRef,
  confidence,
  provenance
}

SHORT_SIDE_ISOTROPIC

02 / isotropic space

Обе координатные оси делятся на один и тот же scalar, поэтому геометрия остаётся подобной исходной.

S = min(W,H) Point: xN = x / S yN = y / S Vector: vN = v / S Length: LN = L / S Area: AN² = A / S²
ISOTROPIC. Углы, orientation, reflection state и shape similarity сохраняются. На длинной оси координаты совершенно нормально могут быть больше 1.

Нормализованный сам canvas

03 / normalized canvas

После short-side normalization короткая сторона всегда равна 1, длинная сохраняет elongation формата.

Canvas extents

widthShortN = W / S heightShortN = H / S longSideShortN = L / S

Area + diagonal

areaShortN2 = W×H / S² diagonalShortN = √(W²+H²) / S
NOT 0..1. Landscape 16:9 даёт `widthShortN≈1.778`, а это правильный результат, не overflow.

AXIS_FRACTION_UV

04 / axis fraction

UV полезен, когда нужно сказать «точка находится на 25% ширины и 70% высоты», но не для метрической геометрии.

u = x / W v = y / H inverse: x = uW y = vH full canvas: u,v ∈ [0,1]
USE

Placement

Anchors, relative position, responsive addressing.

DO NOT USE

Metric geometry

Distances, angles, clearance, curvature, stroke width, shape similarity.

Почему UV не metric space

05 / anisotropy firewall

На прямоугольном canvas UV применяет разные scale factors к X и Y.

UV transform matrix: [ 1/W 0 ] [ 0 1/H ] If W ≠ H: scaleX ≠ scaleY Therefore: circles → ellipses angles change Euclidean distances distort curvature changes
DO NOT COMPUTE CLEARANCE IN UV. Для Topic5 clearance сначала вычисляется в канонической Euclidean geometry, затем scalar result нормируется через ShortN.

Общий закон по размерности

06 / dimensional normalization

6.03 может нормировать не только length/area, если owner явно сообщил степень размерности длины.

Given raw quantity q with declared length exponent p: qN = q / S^p inverse: q = qN × S^p Examples: p = 1: length / S p = 2: area / S² p = 0: dimensionless unchanged p = -1: inverse-length × S
NO NAME-BASED GUESSING. 6.03 не смотрит на название `curvature`, `gap`, `weight` и не выводит размерность самостоятельно. `lengthDimensionExponent` обязан прийти от metric owner/adapter.

Что значит scale-invariant

07 / common-scale invariance

Инвариантность утверждается только для конкретного преобразования: canvas и geometry масштабируются одним k.

Common scale transform: W' = kW H' = kH p' = kp L' = kL A' = k²A k > 0 Then: pShortN' = pShortN LShortN' = LShortN AShortN2' = AShortN2 UV' = UV aspectRatio' = aspectRatio
COMMON SCALE ONLY. Если растянуть только X, поменять crop или изменить aspect ratio — это уже не тот же scale transform.

Handoff в Topic 4/5

08 / old dependencies closed

Теперь ранее внешние ссылки на short-side normalization получают канонического owner.

ConsumerCanonical input from 6.03
4.01CanvasNormalizationContext.shortSidePx для silhouette/alpha area ShortN² при PX-domain
5.02CanvasNormalizationContext.shortSidePx для maxClearanceShortN / localRadiusShortN при PX geometry
5.03boundary fractions уже dimensionless; raw lengths могут нормироваться только через owner-declared adapter
PX ONLY. `shortSidePx` существует только при `sourceUnit=PX`. CANVAS_UNIT или MM нельзя выдавать под именем px.

Когда normalized values сравнимы

09 / compatibility

Dimensionless не означает автоматически semantic-compatible.

Same context

Прямое сравнение допустимо при одинаковой metric semantics.

Different canvas

ShortN подходит для explicit format-relative comparison.

Different mode/unit

Нужен явный adapter; UV и ShortN не взаимозаменяемы.

dimensionless ≠ same evidence meaning normalization removes scale ≠ normalization removes context

Physical context не смешивается молча

10 / physical boundary

6.02 может дать миллиметровый extent, но это отдельный normalization domain.

Canvas PX context: sourceUnit = PX S = shortSidePx Physical context: sourceUnit = MM S = physicalShortSideMm They may describe the same document, but raw quantities cannot cross domains without explicit pixel↔physical mapping.

Что 6.03 не переопределяет

11 / ownership firewall

Normalization — utility owner, а не новый owner downstream metrics.

ConceptOwner
raw aspect ratio6.00
orientation behavior6.01
physical/PPI/viewing6.02
normalization context6.03
reflow/adaptation/tests6.04
visual massTopic4
free-space/clearanceTopic5
safe/bleedTopic7
grid occupancyTopic8

Visual Lab

12 / visual lab

ShortN сохраняет форму, UV заполняет unit box ценой anisotropic distortion.

A · RAW 16:9 CANVAS W=16 · H=9 · circle stays circle B · SHORT_SIDE_ISOTROPIC W=1.778N · H=1N metric geometry preserved C · UV UNIT BOX u,v ∈ 0..1 circle → ellipse placement only length exponent p: qN = q / shortSide^p common scale of canvas + geometry → ShortN and UV unchanged aspect change / crop / nonuniform scale ≠ common-scale invariance 4.01 + 5.02 now receive canonical shortSidePx from 6.03

Normalization regression

13 / deterministic tests

Проверяем round-trip, length/area powers, inverse-length rule, ShortN/UV distinction, common-scale invariance, axis swap и ownership.

Tests not run yet.

DATA FOR LAYOUT ENGINE

14 / machine contract

Machine-readable 6.03 contract.

{
  "module": "Compo 6.03",
  "name": "format_normalization_and_scale_invariance",
  "version": "1.1-audited",
  "canonical_main_title": "Format-normalization and scale invariance",
  "topic": "06_ФОРМАТ_ПОСТЕРА_И_СООТНОШЕНИЕ_СТОРОН",
  "scope": "CANVAS_NORMALIZATION_CONTEXT_ISOTROPIC_SHORT_SIDE_SPACE_AXIS_FRACTION_SPACE_AND_SCALE_BEHAVIOR",
  "consumes": [
    "Compo6.00.CanvasDescriptor",
    "Compo6.00.CanvasDomainBoundary",
    "Compo6.00.canvas.geometry.width/height/shortSide/longSide/area",
    "optional Compo6.02.PhysicalCanvasMetadata for a separately declared physical normalization domain",
    "owner-declared metric dimensional metadata"
  ],
  "provides": [
    "CanvasNormalizationContext",
    "NormalizationDomainDescriptor",
    "ShortSideNormalizedPoint",
    "AxisFractionPoint",
    "DimensionalNormalizationDescriptor",
    "ScaleBehaviorDescriptor",
    "MetricResult[canvas.normalized.widthShortN]",
    "MetricResult[canvas.normalized.heightShortN]",
    "MetricResult[canvas.normalized.longSideShortN]",
    "MetricResult[canvas.normalized.areaShortN2]",
    "MetricResult[canvas.normalized.diagonalShortN]",
    "MetricResult[canvas.normalized.confidence]",
    "normalizationContextRef for CanvasDescriptor",
    "canonical shortSidePx bridge consumed by Compo4.01 / Compo5.02 when extent unit is PX",
    "NormalizationCorrectionRequest[]"
  ],
  "owns_metrics": [
    "canvas.normalized.widthShortN",
    "canvas.normalized.heightShortN",
    "canvas.normalized.longSideShortN",
    "canvas.normalized.areaShortN2",
    "canvas.normalized.diagonalShortN",
    "canvas.normalized.confidence"
  ],
  "descriptors_only": [
    "canvas.normalized.contextRef",
    "canvas.normalized.mode",
    "canvas.normalized.sourceUnit",
    "canvas.normalized.lengthScaleValue",
    "canvas.normalized.areaScaleValue",
    "canvas.normalized.shortSidePx",
    "canvas.normalized.axisFractionSpaceRef",
    "canvas.normalized.status"
  ],
  "normalization_domain_schema": {
    "normalizationDomainRef": "stable domain/version ref",
    "canvasRef": "Compo6.00 canvas",
    "domainRef": "Compo6.00 CanvasDomainBoundary or another explicit compatible rectangular domain",
    "width": "finite >0",
    "height": "finite >0",
    "unit": "PX|CANVAS_UNIT|MM",
    "sourceOwner": "Compo6.00 for canvas geometry; Compo6.02 only for an explicitly separate physical-MM domain",
    "confidence": "0..1",
    "provenance": "object"
  },
  "canvas_normalization_context_schema": {
    "contextRef": "stable versioned ref",
    "canvasRef": "string",
    "normalizationDomainRef": "NormalizationDomainDescriptor ref",
    "mode": "SHORT_SIDE_ISOTROPIC",
    "sourceUnit": "PX|CANVAS_UNIT|MM",
    "width": "source width",
    "height": "source height",
    "shortSide": "min(width,height)",
    "longSide": "max(width,height)",
    "lengthScaleValue": "shortSide",
    "areaScaleValue": "shortSide^2",
    "shortSidePx": "shortSide only when sourceUnit=PX; otherwise null",
    "widthShortN": "width/shortSide",
    "heightShortN": "height/shortSide",
    "longSideShortN": "longSide/shortSide",
    "areaShortN2": "width*height/shortSide^2",
    "diagonalShortN": "hypot(width,height)/shortSide",
    "axisFractionSpaceRef": "parallel coordinate convenience ref, not Euclidean metric space",
    "confidence": "0..1",
    "status": "OK|N_A|INVALID",
    "provenance": "object"
  },
  "short_side_isotropic_space": {
    "point": "(xShortN,yShortN) = (x/shortSide, y/shortSide)",
    "vector": "vShortN = v/shortSide",
    "length": "LShortN = L/shortSide",
    "area": "AShortN2 = A/shortSide^2",
    "inverseLength": "for owner-declared length exponent -1: qN = q*shortSide",
    "generic": "for owner-declared length dimension exponent p: qN = q / shortSide^p",
    "inverse": "q = qN * shortSide^p",
    "properties": [
      "isotropic uniform scale",
      "preserves Euclidean angles",
      "preserves shape similarity",
      "preserves length ratios",
      "preserves orientation and reflection state",
      "normalized long-axis coordinates may exceed 1"
    ]
  },
  "axis_fraction_space": {
    "point": "u=x/width, v=y/height",
    "inverse": "x=u*width, y=v*height",
    "canonical_range": "[0,1]×[0,1] for points inside full canvas",
    "purpose": "relative placement / anchoring convenience",
    "not_metric_space": "on non-square canvas this transformation is anisotropic and does not preserve Euclidean distance, angle, curvature or clearance",
    "forbidden_uses": [
      "Euclidean length",
      "angle measurement",
      "clearance",
      "curvature",
      "shape similarity",
      "line thickness",
      "physical metric comparison"
    ]
  },
  "dimensional_normalization_schema": {
    "metricRef": "owner metric ref",
    "value": "finite raw value",
    "lengthDimensionExponent": "finite declared p; 1=length, 2=area, -1=curvature-like inverse length, 0=dimensionless",
    "normalizationContextRef": "CanvasNormalizationContext ref",
    "normalizedValue": "value / shortSide^p",
    "rule": "6.03 does not infer p from metric names; the source owner or adapter must declare dimensional semantics",
    "unit_firewall": "raw quantity unit must be compatible with context.sourceUnit"
  },
  "scale_behavior": {
    "common_scale_transform": "all source-space coordinates and canvas width/height multiplied by same k>0",
    "raw_length": "×k",
    "raw_area": "×k^2",
    "raw_inverse_length": "×k^-1",
    "dimensionless": "unchanged",
    "short_side_normalized_geometric_quantity": "unchanged when source quantity and canvas undergo the same common scale",
    "axis_fraction_point": "unchanged under same common scale",
    "aspect_ratio": "unchanged; ownership remains 6.00",
    "orientation_behavior": "unchanged under common scale; ownership remains 6.01"
  },
  "comparison_compatibility": {
    "same_context": "directly comparable when metric semantics match",
    "different_canvas_same_mode": "dimensionless ShortN values can support cross-format scale comparison when the downstream owner explicitly intends format-relative comparison",
    "different_mode": "SHORT_SIDE_ISOTROPIC and AXIS_FRACTION_UV are never interchangeable representations of metric geometry",
    "different_unit_domains": "do not mix PX/CANVAS_UNIT/MM raw values without an explicit owner-qualified unit mapping",
    "aspect_change": "common-scale invariance does not imply aspect-ratio invariance; changing W/H can change normalized coordinates and canvas-normalized extents"
  },
  "handoff_contracts": {
    "to_Compo4.01": "CanvasNormalizationContext.shortSidePx is the canonical source for visualMass.geometry *ShortN2 calculations when normalization sourceUnit=PX",
    "to_Compo5.02": "CanvasNormalizationContext.shortSidePx is the canonical source for maxClearanceShortN/localRadiusShortN when clearance is measured in PX",
    "to_Compo5.03": "dimensionless boundary fractions need no short-side normalization; raw boundary lengths may be normalized only by declared owner adapter",
    "to_Compo6.04": "contextRef/version changes become adaptation/recompute triggers",
    "to_future_geometry": "use SHORT_SIDE_ISOTROPIC for Euclidean geometric normalization; use UV only for explicit placement semantics"
  },
  "metric_policy": {
    "normalized_canvas_extents": "descriptors only",
    "dimensional_normalization": "unit-preserving dimensional transform contract, not scoring",
    "scale_invariance": "property under a declared common-scale transform, not evidence of quality",
    "direct_scoring": "FORBIDDEN in 6.03",
    "closer_to_one": "no universal preference for any normalized metric",
    "uv_center": "u=.5/v=.5 is not automatically compositionally preferred"
  },
  "hard_constraints": [
    "one metric = one owner",
    "6.03 consumes explicit canvas/domain extent and must not infer normalization scale from content bounds",
    "canonical Euclidean normalization mode is SHORT_SIDE_ISOTROPIC with one scalar scale applied to both axes",
    "shortSide must be positive finite; zero or missing extent yields N/A/INVALID rather than division by zero",
    "shortSidePx is published only when normalization sourceUnit is PX",
    "ShortN point coordinates on the long axis may exceed 1 and must not be clamped",
    "area normalization uses shortSide^2 and must not divide by shortSide only",
    "owner-declared lengthDimensionExponent is required for generic dimensional normalization; 6.03 must not infer units from metric names",
    "dimensionless values with exponent 0 remain unchanged",
    "AXIS_FRACTION_UV is a placement coordinate convenience and not an Euclidean metric space on non-square canvases",
    "UV coordinates must not be used for length, angle, clearance, curvature, stroke thickness or shape-similarity computations",
    "common-scale invariance requires canvas and compared geometry to be scaled by the same positive factor",
    "scale invariance does not imply invariance to aspect-ratio changes, crop changes, nonuniform scaling or coordinate-frame changes",
    "PX/CANVAS_UNIT/MM normalization domains must not be mixed without explicit unit mapping",
    "6.03 does not re-own 6.00 aspect ratio or 6.01 orientation behavior",
    "6.03 does not re-own 6.02 physical/viewing metrics",
    "stateful adaptation/reflow remains 6.04",
    "safe/bleed/margins remain Topic7",
    "grid occupancy remains Topic8",
    "free-space masks/regions remain Topic5",
    "visual mass raw/contextual ownership remains Topic4",
    "global balance/hierarchy/eye-flow remain future owners",
    "N/A != 0",
    "no beautyScore"
  ],
  "initial_heuristics": {
    "numeric_epsilon": {
      "value": 1e-12,
      "provenance": "IMPLEMENTATION_HEURISTIC"
    }
  },
  "correction_policy": {
    "foreign_geometry_mutation": "FORBIDDEN",
    "invalid_canvas_extent": "route to Compo6.00",
    "unit_mapping_missing": "request explicit owner-qualified unit mapping",
    "wrong_normalization_mode": "request downstream owner to choose SHORT_SIDE_ISOTROPIC vs AXIS_FRACTION_UV explicitly",
    "dimensional_exponent_missing": "request metric owner/adapter dimensional metadata",
    "physical_context_issue": "route to Compo6.02",
    "adaptation_or_reflow_issue": "route to Compo6.04"
  },
  "deferred_inputs": [
    "Compo6.04 adaptation hooks / context-version invalidation / regression",
    "Topic7 safe/bleed/margins",
    "Topic8 grids",
    "future modules consuming normalized geometry",
    "future global balance/hierarchy/eye-flow"
  ],
  "recompute_when": [
    "Compo6.00 width/height/unit/domain changes",
    "normalization domain changes",
    "normalization mode/version changes",
    "explicit unit mapping changes",
    "source metric dimensional metadata changes"
  ],
  "finality": "FORMAT_NORMALIZATION_AND_SCALE_INVARIANCE_CONTRACT_ONLY",
  "audit_note": "No semantic ownership rewrite required in Topic6 closing audit; canonical ShortN/UV split and dimensional normalization contract retained."
}
ARCHITECTURE CHECKPOINT · 6.03 OWNS CANVAS NORMALIZATION CONTEXT, SHORT_SIDE_ISOTROPIC NORMALIZED GEOMETRY, AXIS_FRACTION_UV PLACEMENT SPACE AND THE DIMENSIONAL SCALE-INVARIANCE CONTRACT. SHORTN USES ONE SCALAR SHORTSIDE AND PRESERVES EUCLIDEAN GEOMETRY; UV USES WIDTH/HEIGHT SEPARATELY AND MUST NOT BE USED FOR DISTANCE/ANGLE/CLEARANCE/CURVATURE ON NON-SQUARE FORMATS. SHORTSIDEPX EXISTS ONLY FOR PX DOMAINS. 4.01 AND 5.02 NOW HAVE A CANONICAL NORMALIZATION OWNER. 6.04 RETAINS STATEFUL ADAPTATION/REFLOW. NO BEAUTYSCORE.
VISITS / ...