{
  "vercy": "1.0-draft",
  "publication": {
    "status": "research-draft",
    "adjudicationStatus": "unreviewed",
    "publishableCanonical": false,
    "generatedAt": "2026-09-12T09:40:18Z",
    "providers": [
      "Codex"
    ],
    "breadth": "recalled by Codex without web access - no source was read",
    "missingProviders": [],
    "pass": 2,
    "cost": {
      "grok": {
        "seconds": 20.7,
        "error": "Reading additional input from stdin...\nOpenAI Codex v0.153.4\n--------\nworkdir: R:\\02_PROJECTS\\02_Meta_Models_Platforms\\Ver.cy\\current\\thing-registry-backlog\nmodel: gpt-6-astra\nprovider: openai\napproval: never\nsandbox: read-only\nreasoning effort: none\nreasoning summaries: none\nsession id: 01a094fc-2549-7b00-9473-3cc0b78b4778\n--------\nuser\nDescribe what is already known about one registered thing. Answer as JSON only, no prose around it.\n\nThing: Fenwick tree\nSense to describe: (none recorded)\nDomain code: INF.MED\nAlso known as: (none)\n\n\nContext for this batch of 1001 things:\n# Batch 043: 1001 re",
        "usd": 0.0,
        "recall": true
      },
      "codex": {
        "seconds": 71.3,
        "error": "Reading additional input from stdin...\nOpenAI Codex v0.153.4\n--------\nworkdir: R:\\02_PROJECTS\\02_Meta_Models_Platforms\\Ver.cy\\current\\thing-registry-backlog\nmodel: gpt-6-astra\nprovider: openai\napproval: never\nsandbox: read-only\nreasoning effort: none\nreasoning summaries: none\nsession id: 01a094fc-2538-79b3-b828-ed58f4cdd6ae\n--------\nuser\nYou are drafting a Vercy meta-model for one registered thing. Answer as JSON only, no prose around it.\n\nThing: Fenwick tree\nRegistry id: vr.tr.fenwick-tree\nPlane / domain: INF / INF.MED\nRegistry definition: (none recorded)\nNames folded into this entry: (none)\n"
      }
    },
    "enrichment": {
      "pass": 3,
      "engine": "claude",
      "producedAt": "2026-10-06T12:00:00Z",
      "ingestedAt": "2026-10-06T08:38:34+00:00",
      "fields": [
        "agent_conduct",
        "ethics",
        "owners"
      ]
    },
    "gate": {
      "passed": true,
      "version": "1.0",
      "at": "2026-10-07T10:10:25+00:00",
      "evidence": [
        "completeness 1.00",
        "sense: Wikidata description",
        "2 live sources",
        "review by codex: pass"
      ]
    }
  },
  "metaModel": {
    "id": "THING-Q1276370",
    "registryId": "vr.tr.fenwick-tree",
    "name": "Fenwick tree",
    "version": "0.1.0-research.1",
    "entryKind": "thing",
    "family": "Thing Registry",
    "domain": [
      "INF.MED"
    ],
    "status": "research-draft"
  },
  "canonicalUrl": "https://ver.cy/models/thing/q1276370/",
  "model": {
    "registry_id": "vr.tr.fenwick-tree",
    "name": "Fenwick tree",
    "purpose": "Enable an agent to recognise a Fenwick tree, assess whether its stored aggregates are valid, and choose updates and queries that its declared variant supports.",
    "definition": "A Fenwick tree, also called a binary indexed tree, is an array-based data structure that stores partial aggregates over index ranges determined by binary index patterns, supporting point updates and prefix-sum queries in O(log n) time for n elements.",
    "scope_statement": "This model owns the structural identity, aggregation contract, operational preconditions and observable correctness of the Fenwick tree registered as vr.tr.fenwick-tree in INF / INF.MED, including explicitly declared variants.",
    "in_scope": [
      "Implicit binary index structure and the intervals represented by stored aggregates",
      "Logical sequence, index conventions and mappings to internal storage",
      "Supported aggregation operations and their algebraic requirements",
      "Construction, updates, prefix queries and conditional derived operations",
      "Consistency, numerical limits and resource requirements"
    ],
    "out_of_scope": [
      "The business meaning and provenance of values stored in the sequence",
      "Arithmetic coding systems that consume cumulative frequencies",
      "Segment trees, balanced search trees and static prefix arrays as independent structures",
      "Programming language libraries and software package lifecycle",
      "Coordinate compression algorithms beyond their mapping contract with the tree"
    ],
    "distinguishing_features": [
      "In the conventional one-based additive form, cell i represents the interval from i - lowbit(i) + 1 through i, where lowbit(i) is the least significant set-bit value.",
      "A prefix query follows index transitions that remove the least significant set bit; a point increment follows transitions that add that bit value.",
      "Its tree relationships are implicit in indices rather than a stored left-child/right-child decomposition of every interval as in a typical segment tree.",
      "Unlike a static prefix-sum array, it stores selected partial aggregates so individual changes need not rewrite all later prefixes.",
      "Indices identify positions in an ordered sequence; the structure does not acquire binary-search-tree key insertion or balancing semantics merely because it is called a tree."
    ],
    "characteristics": [
      {
        "name": "Logical extent",
        "kind": "measurement",
        "unit_or_values": "Number of logical elements; nonnegative integer",
        "why_it_matters": "Determines valid positions, traversal bounds and expected storage."
      },
      {
        "name": "Index and interval convention",
        "kind": "category",
        "unit_or_values": "External and internal index bases; inclusive or exclusive prefix endpoint",
        "why_it_matters": "Prevents endpoint errors and invalid zero-index update loops in one-based implementations."
      },
      {
        "name": "Aggregation contract",
        "kind": "category",
        "unit_or_values": "Operator, identity, operand domain and required algebraic properties",
        "why_it_matters": "Determines whether stored partial aggregates can support the requested queries and updates."
      },
      {
        "name": "Operational variant",
        "kind": "category",
        "unit_or_values": "Point-update/prefix-query; range-update variant; multidimensional variant; explicitly described specialization",
        "why_it_matters": "Prevents capabilities of one construction from being attributed to every Fenwick tree."
      },
      {
        "name": "Update semantics",
        "kind": "category",
        "unit_or_values": "Additive delta; assignment via delta; restricted monotone update; other declared rule",
        "why_it_matters": "An assignment cannot be treated as an increment without accounting for the previous value."
      },
      {
        "name": "Aggregate consistency",
        "kind": "state",
        "unit_or_values": "Unchecked; verified against logical values; inconsistent",
        "why_it_matters": "Determines whether query results can be trusted after construction or mutation."
      },
      {
        "name": "Numeric representation",
        "kind": "category",
        "unit_or_values": "Integer width and overflow behavior, arbitrary precision, floating-point format or other domain",
        "why_it_matters": "Aggregate values can overflow or accumulate rounding error even when individual inputs appear valid."
      },
      {
        "name": "Prefix monotonicity",
        "kind": "state",
        "unit_or_values": "Established; violated; unknown; not applicable",
        "why_it_matters": "Cumulative threshold selection requires monotone prefixes, although ordinary additive prefix queries can admit negative values."
      },
      {
        "name": "Position mapping",
        "kind": "relation",
        "unit_or_values": "Mapping from source positions or ordered keys to logical indices, with mapping version",
        "why_it_matters": "A changed ordering or stale coordinate mapping can make numerically correct queries refer to the wrong data."
      }
    ],
    "affordances": [
      "Construct or rebuild the declared representation from a logical sequence.",
      "Apply a supported point change while preserving all affected partial aggregates.",
      "Read a prefix aggregate and derive interval results when the aggregation contract permits cancellation.",
      "Select a cumulative threshold position when monotonicity and target bounds are established.",
      "Validate stored cells and query results against an independent reconstruction.",
      "Assess whether a requested range update, resize or dimensional extension requires another declared construction."
    ],
    "agent_conduct": {
      "may": [
        "Implement or explain a Fenwick tree for prefix sums and point updates.",
        "Test an implementation against a naive method before use."
      ],
      "must_not": [
        "Present a Fenwick tree result as correct for operations it does not support, such as arbitrary range minimums.",
        "Ignore off-by-one indexing errors that silently corrupt aggregates.",
        "Ship an implementation that overflows on large values without warning.",
        "Copy licensed code into a project without honouring its licence."
      ],
      "requires_human": [
        "Using its output in financial or safety-critical calculations."
      ]
    },
    "ethics": {
      "considerations": [
        "Wrong aggregates can quietly distort decisions built on them.",
        "Credit is owed to the people who designed and published the method."
      ],
      "affected_parties": [
        "Users of the software",
        "Developers maintaining the code"
      ]
    },
    "owners": {
      "steward": "Nobody owns the concept; the maintainer of a codebase answers for each implementation.",
      "master_systems": []
    },
    "what_it_is_for": [
      "A Fenwick tree is used in software that needs repeated prefix-sum queries while individual numeric values change.",
      "Common applications include cumulative frequency tables, dynamic counting and range-sum calculations derived from prefix sums.",
      "Its compact array representation is useful when the index space is known and the required operations fit the chosen aggregation rule."
    ],
    "failure_modes_and_hazards": [
      "Indexing errors can return incorrect aggregates or access memory outside the allocated array.",
      "Numeric overflow or accumulated rounding error can corrupt results used by downstream decisions.",
      "Unsupported update or query operations can invalidate the stored aggregates without an obvious failure.",
      "Unsynchronized concurrent access can expose inconsistent aggregates to other software components."
    ],
    "facets_not_applicable": {
      "interfaces": "No dedicated formal standard or official classification governs the Fenwick tree data structure itself.",
      "recognition": "A Fenwick tree is an abstract data structure without an intrinsic perceptible appearance."
    }
  },
  "sources": [
    {
      "id": "wikidata",
      "title": "Wikidata item Q1276370: Fenwick tree",
      "url": "https://www.wikidata.org/wiki/Q1276370",
      "url_status": "live",
      "what_it_supports": "identity and sense of the item",
      "checked_by": "wikidata-api"
    },
    {
      "id": "wikipedia-en",
      "title": "Wikipedia: Fenwick tree",
      "url": "https://en.wikipedia.org/wiki/Fenwick_tree",
      "url_status": "live",
      "what_it_supports": "general description of the item",
      "checked_by": "wikidata-api sitelink"
    }
  ],
  "structure": {
    "bundles": [
      {
        "id": "binary-index-identity",
        "name": "Binary index identity",
        "description": "Identify the partial-aggregate decomposition that makes the structure a Fenwick tree.",
        "rationale": "Recognition must depend on index and interval behavior rather than a class name or a generic tree label.",
        "layers": [
          {
            "id": "structural-recognition",
            "name": "Structural recognition",
            "description": "Establish the defining decomposition and its relationship to the registered concept.",
            "findings": [
              {
                "id": "binary-partial-aggregates",
                "name": "Binary partial aggregates",
                "description": "Fenwick's published structure maintains cumulative frequencies using partial aggregates and index traversal based on binary representation. This supplies the identity anchor, rather than requiring a particular programming interface. [Fenwick, 1994](https://onlinelibrary.wiley.com/doi/abs/10.1002/spe.4380240306).",
                "questions": [
                  {
                    "text": "Which stored intervals and index transitions establish that this representation is a Fenwick tree?",
                    "kind": "definition",
                    "id": "binary-partial-aggregates-q01"
                  },
                  {
                    "text": "Which implementation documentation or inspected code establishes the claimed variant?",
                    "kind": "provenance",
                    "id": "binary-partial-aggregates-q02"
                  }
                ]
              }
            ]
          },
          {
            "id": "position-and-boundaries",
            "name": "Position and boundaries",
            "description": "Connect logical sequence positions to internal indices and query endpoints.",
            "findings": [
              {
                "id": "index-translation-contract",
                "name": "Index translation contract",
                "description": "Record internal and external index bases, prefix endpoint semantics, empty-prefix behavior and any ordered-key mapping.",
                "questions": [
                  {
                    "text": "How does each external position map to an internal cell, and what interval does prefix(k) include?",
                    "kind": "definition",
                    "id": "index-translation-contract-q01"
                  },
                  {
                    "text": "How are an empty sequence, an empty prefix and positions outside the logical extent handled?",
                    "kind": "boundary",
                    "id": "index-translation-contract-q02"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "id": "aggregate-and-update-contract",
        "name": "Aggregate and update contract",
        "description": "Determine which combinations and mutations preserve meaningful partial aggregates.",
        "rationale": "A Fenwick layout alone does not establish support for arbitrary operators, replacements or interval queries.",
        "layers": [
          {
            "id": "aggregation-algebra",
            "name": "Aggregation algebra",
            "description": "Specify the operator and the laws required by the actual algorithms.",
            "findings": [
              {
                "id": "operator-capabilities",
                "name": "Operator capabilities",
                "description": "Record the identity, combination order and evidence for the algebraic properties used by query, update and cancellation procedures; do not infer identical requirements for every operation.",
                "questions": [
                  {
                    "text": "What operator and identity combine values, and which algebraic properties does each supported procedure require?",
                    "kind": "definition",
                    "id": "operator-capabilities-q01"
                  },
                  {
                    "text": "Can an interval aggregate be recovered from two prefixes, and what inverse or cancellation rule justifies that operation?",
                    "kind": "boundary",
                    "id": "operator-capabilities-q02"
                  }
                ]
              }
            ]
          },
          {
            "id": "mutation-semantics",
            "name": "Mutation semantics",
            "description": "Distinguish increments, replacements and restricted updates.",
            "findings": [
              {
                "id": "admissible-value-changes",
                "name": "Admissible value changes",
                "description": "Declare the accepted change representation and any requirements to retain or recover old values, restrict update direction or coordinate multiple backing trees.",
                "questions": [
                  {
                    "text": "Does the update argument mean a delta or a replacement, and how is the old value obtained when required?",
                    "kind": "action",
                    "id": "admissible-value-changes-q01"
                  },
                  {
                    "text": "Which changes are unsupported by this variant or require rebuilding its aggregates?",
                    "kind": "boundary",
                    "id": "admissible-value-changes-q02"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "id": "query-and-selection-behavior",
        "name": "Query and selection behavior",
        "description": "Define observable answers and the conditions under which an agent may request them.",
        "rationale": "Prefix aggregation, interval aggregation and cumulative selection have different preconditions despite sharing storage.",
        "layers": [
          {
            "id": "prefix-and-interval-results",
            "name": "Prefix and interval results",
            "description": "Specify query meaning and verify it independently of traversal code.",
            "findings": [
              {
                "id": "query-result-contract",
                "name": "Query result contract",
                "description": "Bind each query to a logical interval, expected combination order and numeric comparison policy.",
                "questions": [
                  {
                    "text": "What logical interval and aggregation order does each supported query promise?",
                    "kind": "definition",
                    "id": "query-result-contract-q01"
                  },
                  {
                    "text": "Do empty, single-element and full-extent queries agree with an independent aggregation under the declared numeric tolerance?",
                    "kind": "measurement",
                    "id": "query-result-contract-q02"
                  }
                ]
              }
            ]
          },
          {
            "id": "cumulative-selection",
            "name": "Cumulative selection",
            "description": "Capture optional lookup of a position by accumulated weight.",
            "findings": [
              {
                "id": "threshold-search-preconditions",
                "name": "Threshold search preconditions",
                "description": "Treat cumulative selection as conditional on established prefix monotonicity, an exact comparison rule and explicit handling of targets outside the accumulated range.",
                "questions": [
                  {
                    "text": "What establishes monotone prefixes, and can any permitted update invalidate that property?",
                    "kind": "boundary",
                    "id": "threshold-search-preconditions-q01"
                  },
                  {
                    "text": "Does selection seek the first prefix greater than or greater than or equal to the target, and how are ties and out-of-range targets handled?",
                    "kind": "action",
                    "id": "threshold-search-preconditions-q02"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "id": "construction-integrity-and-cost",
        "name": "Construction, integrity and cost",
        "description": "Assess whether the representation is usable, remains coherent and fits the intended workload.",
        "rationale": "Correct traversal cannot compensate for stale construction, partial updates, numeric failure or incompatible size changes.",
        "layers": [
          {
            "id": "construction-and-consistency",
            "name": "Construction and consistency",
            "description": "Establish that stored aggregates represent the intended sequence at a defined observation point.",
            "findings": [
              {
                "id": "aggregate-invariant-evidence",
                "name": "Aggregate invariant evidence",
                "description": "Record initialization method, validation evidence and mutation visibility so consistency can be assessed after construction, interrupted changes or concurrent access.",
                "questions": [
                  {
                    "text": "What check establishes that each stored cell equals the aggregate of its designated logical interval?",
                    "kind": "measurement",
                    "id": "aggregate-invariant-evidence-q01"
                  },
                  {
                    "text": "How does the implementation prevent or detect queries observing only part of a multi-cell update?",
                    "kind": "action",
                    "id": "aggregate-invariant-evidence-q02"
                  }
                ]
              }
            ]
          },
          {
            "id": "resource-and-representation-limits",
            "name": "Resource and representation limits",
            "description": "Connect declared performance to the concrete variant, operand representation and extent.",
            "findings": [
              {
                "id": "operating-envelope",
                "name": "Operating envelope",
                "description": "Record storage, visited-cell counts, aggregate arithmetic cost and index limits separately; assess growth using the represented intervals rather than assuming that appending empty cells preserves validity.",
                "questions": [
                  {
                    "text": "At the intended extent, how many cells and bytes are used and visited by construction, updates and queries?",
                    "kind": "measurement",
                    "id": "operating-envelope-q01"
                  },
                  {
                    "text": "Which size changes, index arithmetic limits or aggregate overflows require rejection, wider representation or rebuilding?",
                    "kind": "action",
                    "id": "operating-envelope-q02"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "id": "evidence-and-external-alignment",
        "name": "Evidence and external alignment",
        "description": "What the world already says about this thing, gathered so the model can be checked against it.",
        "rationale": "A model that cannot be lined up against existing standards, identifiers and practice cannot be adopted by anyone who already uses them.",
        "layers": [
          {
            "id": "reported-evidence",
            "name": "Reported evidence",
            "description": "Findings from the breadth pass, kept separate from the structural claims.",
            "findings": [
              {
                "id": "evidence-confidence-notes",
                "name": "Check these first",
                "description": "Recalled without web access and unsourced; every item is a lead to verify.",
                "evidence": [
                  "The supplied domain code INF.MED should be checked against the registry taxonomy; the described sense is an algorithmic data structure.",
                  "Complexity statements assume constant-time arithmetic on stored aggregates and refer to the standard one-dimensional structure.",
                  "The listed kinds include operational variants rather than a formally standardized classification."
                ],
                "questions": [
                  {
                    "id": "evidence-confidence-notes-q01",
                    "text": "Which of these check these first hold for the sense of Fenwick tree this model covers, and on what evidence?",
                    "kind": "provenance"
                  }
                ]
              },
              {
                "id": "evidence-kinds",
                "name": "Kinds and varieties",
                "description": "Recalled without web access and unsourced; every item is a lead to verify.",
                "evidence": [
                  "Point-update, prefix-sum Fenwick tree",
                  "Range-update, point-query variant",
                  "Range-update, range-sum variant using two Fenwick trees",
                  "Multidimensional Fenwick tree"
                ],
                "questions": [
                  {
                    "id": "evidence-kinds-q01",
                    "text": "Which of these kinds and varieties hold for the sense of Fenwick tree this model covers, and on what evidence?",
                    "kind": "provenance"
                  }
                ]
              },
              {
                "id": "evidence-real-world-use",
                "name": "Real-world use",
                "description": "Recalled without web access and unsourced; every item is a lead to verify.",
                "evidence": [
                  "Maintaining cumulative symbol frequencies in arithmetic coding",
                  "Counting inversions in sequences",
                  "Maintaining dynamic frequency tables and selecting elements by cumulative frequency",
                  "Answering dynamic range-sum queries",
                  "Supporting offline geometric counting algorithms after coordinate compression"
                ],
                "questions": [
                  {
                    "id": "evidence-real-world-use-q01",
                    "text": "Which of these real-world use hold for the sense of Fenwick tree this model covers, and on what evidence?",
                    "kind": "provenance"
                  }
                ]
              },
              {
                "id": "evidence-measurements",
                "name": "Typical measurements",
                "description": "Recalled without web access and unsourced; every item is a lead to verify.",
                "evidence": [
                  {
                    "quantity": "Point-update and prefix-sum query time",
                    "typical_range": "O(log n) worst case for the standard one-dimensional implementation",
                    "unit": "constant-time arithmetic and array operations"
                  },
                  {
                    "quantity": "Storage",
                    "typical_range": "O(n), typically n or n + 1 aggregate slots",
                    "unit": "array slots"
                  },
                  {
                    "quantity": "Construction time",
                    "typical_range": "O(n) with linear construction; O(n log n) with repeated point updates",
                    "unit": "constant-time arithmetic and array operations"
                  }
                ],
                "questions": [
                  {
                    "id": "evidence-measurements-q01",
                    "text": "Which of these typical measurements hold for the sense of Fenwick tree this model covers, and on what evidence?",
                    "kind": "provenance"
                  }
                ]
              },
              {
                "id": "evidence-failure-modes-and-hazards",
                "name": "Failure modes and hazards",
                "description": "Recalled without web access and unsourced; every item is a lead to verify.",
                "evidence": [
                  "Mixing zero-based and one-based indexing causes incorrect ranges or nonterminating update loops.",
                  "Fixed-width aggregate values can overflow.",
                  "Treating an assignment as an additive update gives incorrect totals unless the previous value is accounted for.",
                  "Recovering arbitrary interval aggregates from two prefix aggregates requires an appropriate inverse operation; this does not work generically for minimum or maximum.",
                  "Selecting by cumulative frequency requires monotone prefix sums, normally ensured by nonnegative frequencies."
                ],
                "questions": [
                  {
                    "id": "evidence-failure-modes-and-hazards-q01",
                    "text": "Which of these failure modes and hazards hold for the sense of Fenwick tree this model covers, and on what evidence?",
                    "kind": "provenance"
                  }
                ]
              },
              {
                "id": "evidence-neighbours",
                "name": "Neighbouring kinds and how to tell them apart",
                "description": "Recalled without web access and unsourced; every item is a lead to verify.",
                "evidence": [
                  {
                    "name": "Prefix-sum array",
                    "difference": "Answers prefix sums in O(1) time, but changing one underlying element can require O(n) stored sums to be updated."
                  },
                  {
                    "name": "Segment tree",
                    "difference": "Stores an explicit hierarchy of intervals and supports a broader range of aggregation and update operations, generally with larger storage constants."
                  },
                  {
                    "name": "Binary search tree",
                    "difference": "Organizes keys by comparison order; a Fenwick tree organizes aggregate ranges over indexed positions."
                  },
                  {
                    "name": "Binary indexed tree",
                    "difference": "This is an alternative name for a Fenwick tree, not a separate data structure."
                  }
                ],
                "questions": [
                  {
                    "id": "evidence-neighbours-q01",
                    "text": "Which of these neighbouring kinds and how to tell them apart hold for the sense of Fenwick tree this model covers, and on what evidence?",
                    "kind": "provenance"
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "openQuestions": [
    "Does the existing Vercy catalogue already cover this concept under Fenwick tree, binary indexed tree or another equivalent entry?",
    "Should the registry model include multidimensional and multiple-tree range-update constructions as profiles, or merely link to separately justified specializations?",
    "Which non-additive aggregation profiles have sufficiently documented query and update contracts to include without overgeneralization?",
    "Which implementation sources should anchor construction methods, cumulative selection details and applicable corrections to published algorithms?",
    "What evidence and numeric tolerances should qualify a concrete instance as verified, especially for floating-point values or concurrent mutation?"
  ],
  "statistics": {
    "bundles": 5,
    "layers": 9,
    "findings": 14,
    "questions": 22
  }
}
