dontopaper

The Bitemporal Sheaf: cohomology of contested knowledge over valid-time and transaction-time

donto papers · original research · 2026-06-13 · working draft v1

Abstract. Cellular sheaves give a knowledge graph a computable notion of consistency: a vector space (stalk) on every node, a restriction map on every edge, and a cohomology whose zeroth group H⁰ is the space of globally consistent states and whose first group measures — and localizes — the obstruction to consistency. Bitemporal databases give a knowledge base two orthogonal time axes: valid-time (when a fact was true in the world) and transaction-time (when the system believed it). These two ideas have, to our knowledge, never been combined. We define the bitemporal sheaf: a cellular sheaf whose stalks and restriction maps are themselves indexed by a bitemporal base, so that cohomology becomes a function of timeH¹(t_v, t_x). This makes three things that donto asserts philosophically into computable objects: (1) a contradiction can be real at one valid-time and resolved at another without either belief being deleted; (2) "re-ranking by reality over time" becomes a concrete flow that reduces transaction-time as evidence arrives, leaving valid-time (genuine historical disagreement) intact; and (3) the difference between the world was inconsistent and we were inconsistent about the world is exactly the difference between non-zero along the valid axis versus the transaction axis. We give the construction, two worked genealogical examples, a mapping onto donto's existing bitemporal tables, and an honest list of what is proven, what is conjectured, and what is merely defined.


1. Why neither ingredient alone is enough

Standard knowledge graphs collapse contradiction: on conflict they dedup, pick a winner, or invalidate. Sheaf theory was the first tool we found that holds contradiction as a first-class, measurable quantity (H¹ ≠ 0) rather than resolving it — which is precisely donto's paraconsistent stance. But a plain (atemporal) sheaf has a blind spot that matters enormously for contested knowledge: it cannot tell a contradiction that reflects the world from a contradiction that reflects our changing beliefs about the world.

Two examples that an atemporal sheaf treats identically but that are epistemically opposite:

  • A person's stated city of residence is Cairns in a 2019 session and Brisbane in a 2023 session. There is no contradiction — the fact changed; both are true at their valid-times. (This is the LongMemEval "knowledge-update" category, where donto already scores 0.923.)
  • One genealogical source records a birthplace of Coen, another of McIvor, for the same person at the same time. There is a contradiction — two beliefs about one valid-time state, at most one of which is true.

An atemporal sheaf sees (1,0) vs (0,1) in both and reports H¹ ≠ 0 for both. The bitemporal sheaf separates them: the first is consistent along the valid axis (different facts at different valid-times) and only looks contradictory when you forget time; the second is a genuine valid-time obstruction. The two time axes are exactly the two axes of disagreement, and you need both stalk-indices to keep them apart.

Bitemporal databases, conversely, have the two time axes but no operator that measures consistency across a graph of related facts — they store the timelines; they don't compute the obstruction. The bitemporal sheaf supplies that operator.


2. The construction

2.1 Setup

Let G = (V, E) be donto's claim graph: nodes are claims/entities, edges are typed relations (donto_argument, donto_identity_edge, context co-occurrence). donto already stamps every statement with two intervals:

  • valid-time [v⁻, v⁺) — a daterange (donto_statement.valid_time): when the fact holds in the world.
  • transaction-time [x⁻, x⁺) — a tstzrange (donto_statement.tx_time): when the store believed it; an open x⁺ means currently believed.

The base of our sheaf is the product of these two ordered time-lines, T = T_valid × T_tx. We are building a sheaf over a graph whose stalk data varies over T.

2.2 Bitemporal stalks

A node v carries not a single stalk but a stalk presheaf over time: for each bitemporal point t = (v-time, x-time) ∈ T, a vector space F_t(v) holding v's local representation as it was valid then and as it was believed then. Concretely in donto, F_t(v) is the bge-small embedding (donto_claim_embedding, 384-dim, or a learned low-d projection) of the version of claim v whose valid_time ∋ v-time and whose tx_time ∋ x-time. Because donto never deletes (invariant I3 — supersede, never overwrite), every historical version is still on disk, so F_t(v) is always defined from real stored rows — this is the property that makes the construction possible at all. An ordinary mutable KB could not build it; donto can, for free, because it already keeps the whole bitemporal history.

2.3 Bitemporal restriction maps

For each incident node–edge pair v ⊴ e, a restriction map R_{v⊴e}(t) : F_t(v) → F_t(e) carries v's time-t view into the edge's shared discourse space. The map itself is time-dependent: an alignment occupation ↔ currentJob that was uncertain in 2021 and confirmed in 2024 is a weak map at early transaction-times and a near-identity map later. donto seeds these from the alignment fabric (donto_predicate_closure, donto_match_aligned) evaluated as of a transaction-time — high-confidence folds → near-identity, weak/contested links → small maps — so the restriction maps inherit a transaction-time history with no extra bookkeeping.

2.4 Bitemporal cohomology

Fix a bitemporal point t. Restricting every stalk and map to t yields an ordinary cellular sheaf F_t, with coboundary δ_t, sheaf Laplacian L_t = δ_tᵀ δ_t, and cohomology H⁰(F_t), H¹(F_t). Letting t vary turns these into time-indexed invariants:

H¹ : T_valid × T_tx → ℝ≥0 ,      H¹(v-time, x-time) = dim/​mass of the obstruction in F_{(v-time,x-time)}

The two partial behaviours are the whole point:

  • Valid-time slice (fix x-time = now, vary v-time): H¹(·, now) is the currently-believed history of contradiction. Non-zero here = the world, as we now understand it, was genuinely contested at that valid-time. This is the residue you must never delete.
  • Transaction-time slice (fix v-time, vary x-time): H¹(v-time, ·) is our belief converging (or not). A contradiction that appears at early x-time and vanishes at later x-time is us getting it right over time — evidence arrived, the restriction maps sharpened, the obstruction dissolved. This is "re-rank by reality" made literal.

3. Reality re-ranking is a flow that reduces transaction-

donto's canon says: don't delete on conflict; re-rank by reality over time. In the bitemporal sheaf this is not a slogan but a dynamical statement. Define sheaf diffusion at a fixed valid-time, evolving in transaction-time:

∂x/∂x-time  =  − L_{(v-time, x-time)} · x

As new evidence updates the restriction maps (sharpening confident alignments, down-weighting refuted sources), the Laplacian's spectrum changes and the flow carries the believed state toward H⁰the consistent-where-consistent statewithout touching the valid-time axis. The claim that donto "converges on truth over transaction-time while preserving genuine historical disagreement" becomes the precise statement:

Conjecture (reality convergence). Under monotone evidence accrual (restriction-map confidence non-decreasing in transaction-time for corroborated edges), transaction-time H¹(v-time, x-time) is non-increasing in x-time, while valid-time H¹(·, now) is invariant under the flow.

We do not yet have a proof; §6 states what would be needed (and where it can fail — e.g. an adversarial source that raises confidence on a wrong alignment, which is exactly the discourse-sheaf deception case). But it is now a falsifiable statement about a computable quantity, which is the contribution: donto's central temporal claim has been turned from philosophy into a spectral-flow hypothesis we can test on the corpus.


4. Two worked examples

Example A — knowledge-update is consistency, not contradiction. Residence Cairns@2019, Brisbane@2023. Build the 2-node sheaf (user, residence) at valid-time = 2019: the only believed value is Cairns, H¹ = 0. At valid-time = 2023: only Brisbane, H¹ = 0. There is no valid-time slice at which both compete, so H¹(·, now) ≡ 0 — correctly, no contradiction. An atemporal sheaf that pools both values into one residence stalk reports a spurious √2 obstruction; the bitemporal sheaf does not. This is why donto handles knowledge-update at 0.923 in the representation (the dated ingest) rather than via re-ranking — the bitemporal sheaf explains the empirical result.

Example B — contested birthplace is a valid-time residue that survives reality re-ranking. Birthplace Coen (source s₁) vs McIvor (source s₂), same person, same valid-time. At every valid-time slice both compete: H¹(·, now) = ‖(1,0) − (0,1)‖ = √2 ≠ 0 — a genuine obstruction. Now suppose at transaction-time x₂ a parish register corroborates McIvor: the restriction map from s₂ sharpens, the believed (H⁰) state shifts toward McIvor, and transaction-time drops (we are now more confident) — but the valid-time stays √2, because the historical fact that two sources disagreed is permanent and true. donto returns the McIvor answer with a "contested — sources disagree, McIvor corroborated 2024" residue, never deleting the Coen attestation. One operator produces both the answer and the honest caveat.


5. What donto already has that makes this buildable

This is assembly, not green-field — the bitemporal substrate is the precondition the construction needs:

construction object donto provides it as
stalk over time F_t(v) every historical version of a claim is retained (I3); donto_claim_embedding gives the vector
the two base axes T_valid × T_tx donto_statement.valid_time (daterange) + tx_time (tstzrange) — already on every row
restriction map history donto_predicate_closure / donto_match_aligned evaluated as of a transaction-time
edges of G donto_argument, donto_identity_edge, context co-occurrence
"as-of" queries to slice F_t bitemporal point queries the substrate already supports

The one thing that does not exist yet is the operator: building δ_t/L_t over a recalled subgraph and reading as a function of the time slice. That is the Stage-0 analytic specified in the sheaf implementation PRD — the bitemporal sheaf is its temporal generalization, and the natural v2 once the atemporal Stage-0 is proven.


6. Status: proven / conjectured / defined

In the spirit of honest research notes:

  • Defined (solid). The bitemporal sheaf object; time-indexed H⁰/; the valid-vs-transaction slice distinction; the two worked examples. These follow directly from composing cellular-sheaf cohomology with a bitemporal base and are internally consistent.
  • Conjectured (open). The reality-convergence statement of §3 (transaction- monotone non-increasing under monotone evidence). Needs: a precise monotonicity condition on restriction-map updates, and a counterexample characterization (adversarial/deceptive sources). Likely provable for the orthogonal/connection-map family where the Laplacian's dependence on confidence is well-behaved; likely false in general without a trust model on sources — which is itself an interesting result (it would say you cannot converge on truth without weighting sources, formalizing donto's standing kernel as a necessary condition).
  • Speculative (flagged). That the valid-time profile of a corpus is a useful historiographic signal — e.g. that peaks in H¹(·, now) over historical valid-time localize the genuinely contested episodes (frontier-violence dates, disputed lineages). Worth measuring on the genealogy corpus once Stage-0 exists; no claim yet.

7. Why this is donto's to write

Nobody else can build the bitemporal sheaf, because nobody else keeps the data it needs. It requires a store that (a) never deletes, so every historical stalk is reconstructable; (b) carries both time axes on every fact; and (c) holds contradictions rather than resolving them, so has anything to measure. That is the exact intersection of I3 (no destructive overwrite), bitemporality, and paraconsistency — donto's three foundational invariants. The bitemporal sheaf is what those three invariants are, expressed as time-indexed cohomology: a knowledge base whose disagreements have a shape, and whose shape moves as reality reports back.


See also: the literature grounding in sheaf neural networks for donto; the empirical companion Answer-Shaping; the full program in the donto research agenda.