What does Provenance and Fidelity of Derivatives conclude, in numbers, about “Provenance Hashes: Pinning Facts Down as Atoms that Compare Byte for Byte”?

Answer: Chapter 2 writes facts as four-field atoms compared through canonical SHA-256 hashes, long enough prefixes and Merkle roots.

Scope of the numbers: Parameters are illustrative and costs are accounting points, not prices; all calculations are generated by the book's programs. It is not individual legal or business advice; its "copyright chain" means only provenance and permission records for the author's own works, and publishing any derivative needs sign-off by the person in charge.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python only

master canonical hash 02104f49279d
variant raw-hash same canon-hash same
same atom02104f49279d yes02104f49279d yes
extra spaces b711e77fbb8d NO02104f49279d yes
upper case6d8d65b116f4 NO02104f49279d yes
full-width0675e345c1ba NO02104f49279d yes
trailing 0f58ef862d922 NO02104f49279d yes
roundedc16c144cc6f0 NOc16c144cc6f0 NO
digit slip39ef52e68f43 NO39ef52e68f43 NO
unit swap267939d9f614 NO267939d9f614 NO
Show the full program
# Chapter 2. p21: hash a canonical fact atom, not the raw sentence.
# An atom is "subject | relation | value | unit". Canonical form: NFKC
# (full-width digits become ASCII), lower case, single spaces, and the
# value written as a normalised decimal (0.30 and 0.3 are one value).
# SHA-256 of the canonical form is the atom's provenance hash; the
# first 12 hex digits are shown. Example atoms are illustrative and the
# hashes are computed in memory only; nothing is read from disk.
import hashlib
import unicodedata
from decimal import Decimal


def canon(subject, relation, value, unit):
    parts = []
    for s in (subject, relation, unit):
        s = unicodedata.normalize("NFKC", s).lower()
        parts.append(" ".join(s.split()))
    v = unicodedata.normalize("NFKC", value).strip()
    v = format(Decimal(v).normalize(), "f")
    return "%s|%s|%s|%s" % (parts[0], parts[1], v, parts[2])


def h(text):
    return hashlib.sha256(text.encode("utf-8")).hexdigest()[:12]


MASTER = ("serial recall", "share kept after 3 layers", "0.8574",
          "fraction")
VARIANTS = [
    ("same atom", MASTER),
    ("extra spaces", ("serial  recall ", "share kept after 3 layers",
                      "0.8574", "fraction")),
    ("upper case", ("Serial Recall", "Share kept after 3 layers",
                    "0.8574", "Fraction")),
    ("full-width", ("serial recall", "share kept after 3 layers",
                    "\uff10.\uff18\uff15\uff17\uff14", "fraction")),
    ("trailing 0", ("serial recall", "share kept after 3 layers",
                    "0.85740", "fraction")),
    ("rounded", ("serial recall", "share kept after 3 layers",
                 "0.86", "fraction")),
    ("digit slip", ("serial recall", "share kept after 3 layers",
                    "0.8547", "fraction")),
    ("unit swap", ("serial recall", "share kept after 3 layers",
                   "0.8574", "percent")),
]
raw0 = h("|".join(MASTER))
can0 = h(canon(*MASTER))
print("master canonical hash %s" % can0)
print("%-12s %-12s %-4s %-12s %-4s" % ("variant", "raw-hash", "same",
                                        "canon-hash", "same"))
for name, atom in VARIANTS:
    r = h("|".join(atom))
    c = h(canon(*atom))
    print("%-12s %-12s %-4s %-12s %-4s" % (
        name, r, "yes" if r == raw0 else "NO", c,
        "yes" if c == can0 else "NO"))

Single source and citation

Fan, Y. (2026). Multimodal Derivative Compilation and Provenance Chains: A Structure-Preserving Pipeline from One Monograph to Podcasts, Slides and Quiz Banks (Version 1.0.0), Chapter 2: Provenance Hashes: Pinning Facts Down as Atoms that Compare Byte for Byte. 5D Library. DOI pending

DOI pending · monograph page goes live after publication · 5DL-B-268 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026268,
  author    = {Fan, Yafu},
  title     = {Multimodal Derivative Compilation and Provenance Chains: A Structure-Preserving Pipeline from One Monograph to Podcasts, Slides and Quiz Banks},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  note      = {DOI pending}
}

Other chapter answers in this book