Repository navigation
nf.query.spja
Jeremy H. Carroll edited this page Oct 30, 2026
·
1 revision
Contract ID:
nf.query.spja| Family:query| Index Status:draft| AuthorityEffect:None
⬅ Back to Wiki Home | View SVG Diagram
Selection Projection Join Aggregate Form (SPJA) enforces structural normalization and explicit defect routing in the query regime.
| Property | Value |
|---|---|
| Canonical ID | nf.query.spja |
| Short Name | SPJA |
| Full Name | Selection Projection Join Aggregate Form |
| Family |
query (Relational & Cochain Query Evaluation Normal Forms) |
| Qualification | Extended Form Contract (Normal Form Contract) |
| Data / Math Posture | at_rest |
| Index Status | draft |
| Theory Status | proposed |
| Verification Status | executable |
| Contract Version | v0 |
| Governance Fence |
AuthorityEffect: None (certified_implies_authorized: false) |
| Stage | Carrier / Operator | Concrete State / Invariant |
|---|---|---|
| 1. Before / Candidate Input | Input Carrier (SPJA Candidate) |
Anomaly risk: implicit aggregate ; evidence, unmodeled join ; multiplicity drift, conflation ... |
| 2. Normalization / Gate | SPJA Verification Gate |
aggregate lanes expose... (certified_implies_authorized: false) |
| 3. After / Certified Output | Certified SPJA Output |
Invariant: ['relations', ; 'predicates', 'projections', ; 'joins', 'groups',... |
- ref: ../1a_bqnf_incremental_repair.md
section: 5. SPJA fragmentEvery contract in simplex-normal-forms is evaluated against the Four-Pillar Quadrilateral defined in contracts/_golden_nfs/standard.yaml:
| Pillar | Requirement | Contract Specification for nf.query.spja
|
|---|---|---|
| Pillar I: Excludes Anomaly | Name and eliminate a specific class of data or state defects. | implicit aggregate evidence, unmodeled join multiplicity drift, conflation of non-null argument counts with total row counts, or untracked group migration |
| Pillar II: Preserves Invariant | State the structural invariant and protected skeleton preserved across transitions. |
Invariant: aggregate lanes expose sufficient incremental repair statistics, including exact bag join multiplicities, SQL-standard non-null argument accounting, and before/after group key transitions Protected Skeleton: ['relations', 'predicates', 'projections', 'joins', 'groups', 'aggregate_lanes', 'join_multiplicities', 'non_null_argument_counts'] |
| Pillar III: Lossless Reconstruction | State the non-loss reconstruction operator (join, direct sum, pullback, or replay). | Lossless reconstruction under declared projection, direct sum, or pullback operators. |
| Pillar IV: Syntactic Decidability | State how conformance is decided from declared constraints without unbudgeted scans. | Decidable from declared schema and witness metadata within bounded evaluation budgets. |
- query shape alone does not certify repairability of a particular CDC event; event repair is delegated to BQNF
- does not decide general query containment or equivalence for non-monotone queries
- does not imply authority minting (AuthorityEffect: None)
- source_relations
- selected_attributes
- predicates
- join_conditions
- group_keys
- aggregate_lanes
- query_semantics: {'algebra_posture': 'bag_semantics_with_join_multiplicity', 'null_handling': 'sql_standard_null_elimination', 'avg_count_semantics': 'non_null_argument_count', 'group_mutation_tracking': 'before_after_group_keys'}
- old_new_attribute_values
- joined_partner_multiplicities
- before_after_group_membership
- non_null_argument_indicators
| Criterion ID | Name | Condition |
|---|---|---|
criterion |
Check | query parses into supported SPJ or SPJA fragment |
criterion |
Check | every aggregate lane declares sufficient statistics including join multiplicity scaling |
criterion |
Check | AVG explicitly distinguishes non-null argument count from total join row count |
criterion |
Check | group key mutations provide both before and after group partitions |
criterion |
Check | unsupported aggregate types declare typed terminal at compile time |
Every evaluation terminates in a declared local route mapped to a canonical terminal in standard.yaml:
| Local Terminal Route | Canonical Terminal |
|---|---|
Accept |
Preserve |
UnsupportedAggregate |
Refuse |
RequireAuxiliaryState |
Repair |
ConservativeInvalidate |
ConservativeInvalidate |
- symptom: AVG repaired from amount delta without explicit non-null argument COUNT, diagnosis: insufficient statistics for aggregate lane; non-null count required for exact division, terminal: ConservativeInvalidate
- symptom: join partner multiplicity omitted on joined SUM update, diagnosis: missing join multiplicity; source row change delta must scale by matching partners, terminal: ConservativeInvalidate
- symptom: aggregate operator outside supported algebra (e.g. median, non-algebraic window), diagnosis: unsupported aggregate operator lacking finite differential update statistics, terminal: UnsupportedAggregate
In accordance with the repository's epistemic claim discipline:
-
What it supports:
- Supports syntactic and operational checking of
nf.query.spja(SPJA) against its declared schema, boundary constraints, and witness obligations in this model. - Supports deterministic terminal routing (
Accept, UnsupportedAggregate, RequireAuxiliaryState, ConservativeInvalidate) when required declarations or invariants fail.
- Supports syntactic and operational checking of
-
What it does not support:
- Does not confer operational authority (
AuthorityEffect: None,certified_implies_authorized: false). - Does not claim semantic truth of undeclared external processes or unverified upstream inputs beyond the declaredprotected skeleton.
- Does not confer operational authority (
-
The narrowest defensible claim:
- Within the declared substrate
at_rest, this contract enforces thatimplicit aggregate evidence, unmodeled join multiplicity drift, conflation of non-null argument counts with total row counts, or untracked group migrationis either excluded underaggregate lanes expose sufficient incremental repair statistics, including exact bag join multiplicities, SQL-standard non-null argument accounting, and before/after group key transitionsor routed to an explicit refusal/recovery terminal.
- Within the declared substrate
-
The next test needed:
- Property-based falsification and mutation testing across boundary edge cases and composed multi-step pipelines for
nf.query.spja.
- Property-based falsification and mutation testing across boundary edge cases and composed multi-step pipelines for
Click to expand full canonical YAML contract (contracts/nf.query.spja.yaml)
schema_version: smplx.nf.contract.v0
schema_ref: ./normal_form_contract_schema.yaml
contract_kind: normal_form_contract
identity:
id: nf.query.spja
name: Selection Projection Join Aggregate Form
short_name: SPJA
version: v0
status: draft
family: query
theory_status: proposed
contract_status: draft
verification_status: executable
classification:
hierarchy_level: form
subject_kind:
- query_shape
- derived_relvar
data_posture: at_rest
mathematical_posture: operational
purpose:
excludes_anomaly: implicit aggregate evidence, unmodeled join multiplicity drift,
conflation of non-null argument counts with total row counts, or untracked group migration
preserves_invariant: aggregate lanes expose sufficient incremental repair statistics,
including exact bag join multiplicities, SQL-standard non-null argument accounting,
and before/after group key transitions
protected_skeleton:
- relations
- predicates
- projections
- joins
- groups
- aggregate_lanes
- join_multiplicities
- non_null_argument_counts
erased_structure: []
non_claims:
- query shape alone does not certify repairability of a particular CDC event; event
repair is delegated to BQNF
- does not decide general query containment or equivalence for non-monotone queries
- "does not imply authority minting (AuthorityEffect: None)"
declarations_required:
- source_relations
- selected_attributes
- predicates
- join_conditions
- group_keys
- aggregate_lanes
- query_semantics:
algebra_posture: bag_semantics_with_join_multiplicity
null_handling: sql_standard_null_elimination
avg_count_semantics: non_null_argument_count
group_mutation_tracking: before_after_group_keys
extensions:
aggregate_evidence_specifications:
SUM:
- old_value
- new_value
- group_key_before_after
- predicate_before_after
- join_multiplicity
COUNT:
- membership_before_after
- non_null_predicate
- group_key_before_after
- join_multiplicity
AVG:
- sum_statistic
- non_null_count_statistic
- join_multiplicity
MIN_MAX:
- extremum_witness_state
- second_extremum_candidate
- group_partition_witness
evidence_required:
- old_new_attribute_values
- joined_partner_multiplicities
- before_after_group_membership
- non_null_argument_indicators
validation_criteria:
- query parses into supported SPJ or SPJA fragment
- every aggregate lane declares sufficient statistics including join multiplicity scaling
- AVG explicitly distinguishes non-null argument count from total join row count
- group key mutations provide both before and after group partitions
- unsupported aggregate types declare typed terminal at compile time
proof_obligations: []
terminal_routes:
- Accept
- UnsupportedAggregate
- RequireAuxiliaryState
- ConservativeInvalidate
terminal_route_map:
Accept: Preserve
UnsupportedAggregate: Refuse
RequireAuxiliaryState: Repair
ConservativeInvalidate: ConservativeInvalidate
certification:
certificate_required: false
certificate_kind: null
obstruction_class_required: false
loss_ledger_required: false
verifier_required: true
loss_ledger_trigger_id: null
authorization:
authorized_by: null
certified_implies_authorized: false
failure_modes:
- symptom: AVG repaired from amount delta without explicit non-null argument COUNT
diagnosis: insufficient statistics for aggregate lane; non-null count required for exact division
terminal: ConservativeInvalidate
- symptom: join partner multiplicity omitted on joined SUM update
diagnosis: missing join multiplicity; source row change delta must scale by matching partners
terminal: ConservativeInvalidate
- symptom: aggregate operator outside supported algebra (e.g. median, non-algebraic window)
diagnosis: unsupported aggregate operator lacking finite differential update statistics
terminal: UnsupportedAggregate
examples:
- ref: ../1a_bqnf_incremental_repair.md
section: 5. SPJA fragment
references:
- ../1a_bqnf_incremental_repair.md
- ../1_normal_forms.md
definition:
source: coda_all_universe/mssn_sn_tower/definitions.md
formal_statement: >
An SPJA query expression satisfies the form if all aggregate lanes specify sufficient
first-order repair statistics under bag semantics. For a source change delta d and join
multiplicity m, the joined aggregate updates by m * d. The AVG lane computes sum / non_null_count,
where non_null_count tracks the cardinality of non-null arguments rather than raw join rows.
quadrilateral:
qualifies_as_true_normal_form: false
qualification_gap: reconstruction_is_incremental_view_maintenance_not_a_relational_project_join
anomaly_exclusion: implicit aggregate evidence and unmodeled multiplicity drift
lossless_join:
status: declared_reconstruction
statement: aggregate lanes expose sufficient repair statistics to reconstruct updated view values
dependency_preservation:
status: declared_with_the_invariant
statement: The preserved invariant stays on the declared query schema.
syntactic_decision:
status: declaration_decidable
statement: The check inspects declared aggregate lane definitions and multiplicity bindings.Simplex Normal Forms • 112 Canonical Contracts & SVG Diagrams • CODA_MUR Transport • certified_implies_authorized: false • AuthorityEffect: None
- Home (Master Index)
- Project Status & Evidence
- Theory & Cochain Substrate
- Observer-Relative Ontology
- Concrete Worked Examples
- Geometrodynamics & Physics
shape (17)
- 0NF (
nf.classical.0nf) - 1NF (
nf.classical.1nf) - 2NF (
nf.classical.2nf) - 3NF (
nf.classical.3nf) - 4NF (
nf.classical.4nf) - 5NF (
nf.classical.5nf) - 6NF (
nf.classical.6nf) - BCNF (
nf.classical.bcnf) - DKNF (
nf.classical.dknf) - EKNF (
nf.classical.eknf) - ETNF (
nf.classical.etnf) - NF2 (
nf.classical.nf2) - RFNF (
nf.classical.rfnf) - SKNF (
nf.classical.sknf) - DHNF (
nf.cochain.dhnf) - HCNF (
nf.ddc.hodge_canonical) - MSSNF (
nf.mssn)
change (6)
representation (5)
compilation (1)
epistemic (15)
- EQNF (
nf.coda.eqnf) - ANF (
nf.epistemic.authority) - CNF (
nf.epistemic.cnf) - EFNF (
nf.epistemic.efnf) - ENF (
nf.epistemic.enf) - FNF (
nf.epistemic.freshness) - LNF (
nf.epistemic.location) - NAR-NF (
nf.epistemic.nar_nf) - ObsNF (
nf.epistemic.observer) - ODNF (
nf.epistemic.odnf) - ONF (
nf.epistemic.onf) - PvNF (
nf.epistemic.pvnf) - RNF (
nf.epistemic.replica) - SnNF (
nf.epistemic.snnf) - StNF (
nf.epistemic.state)
authority (1)
evidence (8)
derivation (12)
- AONF (
nf.derivation.aonf) - APNF (
nf.derivation.apnf) - IGNF (
nf.derivation.ignf) - IRNF (
nf.derivation.irnf) - LSNF (
nf.derivation.lsnf) - OBNF (
nf.derivation.obnf) - PDNF (
nf.derivation.pdnf) - RPNF (
nf.derivation.rpnf) - SCNF (
nf.derivation.scnf) - SERNF (
nf.derivation.sernf) - AINF (
nf.ontology.ainf) - WDNF (
nf.wdp.wdnf)
topology (2)
physics (20)
- RBNF (
nf.physics.bianchi_regge) - BQNF-REGGE (
nf.physics.bqnf_regge) - CDT-FSIGN-NF (
nf.physics.cdt_fermion_sign) - CDT-KD-DOUBLING-NF (
nf.physics.cdt_kd_doubling) - CDT-MATTER-NF (
nf.physics.cdt_matter_coupling) - CDT-OVERLAP-NF (
nf.physics.cdt_overlap_fermions) - CDT-SPEC-NF (
nf.physics.cdt_spectral_dimension) - CDT-SUSY-WITTEN-NF (
nf.physics.cdt_susy_witten) - CDT-TOPO-CHARGE-NF (
nf.physics.cdt_topological_charge) - CDT-WMC-NF (
nf.physics.cdt_wick_mc) - CDT-ZOLOTAREV-NF (
nf.physics.cdt_zolotarev_overlap) - DFNF (
nf.physics.dfnf) - L1CCNF (
nf.physics.l1_constraint_closure) - LCNF (
nf.physics.lorentzian_cdt) - L1PSNF (
nf.physics.pachner_lp_scaling) - PWNF (
nf.physics.pwnf) - RCNF (
nf.physics.rcnf) - RPCNF (
nf.physics.rpcnf) - SIDNF (
nf.physics.schlafli_nf) - WDWNF (
nf.physics.wdwnf)