# Time Ordering

Several entwined Twine chains are called a Tapestry. The Tapestry is a [DAG](https://en.wikipedia.org/wiki/Directed_acyclic_graph) and therefore has a partial ordering. If a pulse "A" contains the CID (hash) of another pulse "B", then pulse "B", must have been produced *after* pulse "A" because a hash value can not be known prior to creation. By traversing the graph one can answer the question "did pulse A come before pulse B?". The answer may be "yes", "no", or "unknown".

To see why this is, consider the tapestry presented in [this interactive demo](https://tutorials.twine.world//#/embed/TimeBoundingGrid). In this demo time flows from left to right and you can drag each pulse to see the flexibility in its ordering. Each pulse is labeled with the time it was actually emitted.

The pulses may declare whatever timestamp they want, but the ordering is bound by the connections between the pulses.

[Now consider this demonstration](https://tutorials.twine.world//#/embed/TimeBoundingGrid?expanded=3\&expanded=12\&isFixed=gold). Suppose you control the yellow chain, and you know for certain when each pulse was created but you want to deduce. This means the yellow pulses are fixed in place representing our certainty about the timing. Suppose you want to compare a pulse on the red chain to a pulse on your yellow chain. Try dragging the other pulses to see if you can modify the timing to make it seem like the red pulse came before the yellow one. You should see that this isn't possible because of the configuration.

In general, if a path can be found between two pulses then their ordering is unambiguous and one can be proved to have happened before another.

However, comparing two other pulses you can see that, at least [in this example](https://tutorials.twine.world/#/embed/TimeBoundingGrid?expanded=2\&expanded=12\&isFixed=gold), there is ambiguity about the ordering.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.twine.world/twine-protocol-documentation/concepts/time-ordering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
