Exact comparison of enriched histories
DefinitionAPFObservedComparisonapfnative-ledger-history
Ordinary contextual comparison, supported words and comparison-law interface retaining both admission and observation values. Ordinary supporting definition; no separate theorem credit.
This is the native whole-ledger component of history comparison at the stated source and input. It does not establish all-input or full physical-profile equivalence, universal accounting of composites, observed readout, physical transport completion, or quantum structure.
Definition code
import Definitions.Def_APFObservedHistory
set_option autoImplicit false
namespace APFObservedProcess
open APFTypedHistory APFObservedHistory
universe u v w
variable {N : Type u} {E : N → N → Type v} {V : Type w} {a b c d : N}
def ContextEq (L : Language E a) (B : Observation E V a) (p q : Path E b c) : Prop :=
∀ (h : Path E a b) (d : N) (r : Path E c d),
(L d (Path.append (Path.append h p) r) ↔ L d (Path.append (Path.append h q) r)) ∧
(∀ t, B d (Path.append (Path.append h p) r) t ↔ B d (Path.append (Path.append h q) r) t)
def Action (L : Language E a) (B : Observation E V a) (p : Path E b c) :
APFObservedHistory.State L B b → APFObservedHistory.State L B c → Prop := fun s t => APFObservedHistory.Step s p t
def Supported (L : Language E a) (B : Observation E V a) (p : Path E b c) : Prop := ∃s t, Action L B p s t
abbrev SupportedWord (L : Language E a) (B : Observation E V a) (b c : N) := {p : Path E b c // Supported L B p}
def contextSetoid (L : Language E a) (B : Observation E V a) (b c : N) : Setoid (SupportedWord L B b c) where
r p q := ContextEq L B p.val q.val
iseqv := ⟨fun _ _ _ _ => ⟨Iff.rfl,fun _ => Iff.rfl⟩,
fun h p d r => ⟨(h p d r).1.symm,fun t => ((h p d r).2 t).symm⟩,
fun h k p d r => ⟨(h p d r).1.trans (k p d r).1,
fun t => ((h p d r).2 t).trans ((k p d r).2 t)⟩⟩
def ComparisonLaws (L : Language E a) (B : Observation E V a) : Prop :=
(∀ b c (p q : Path E b c), ContextEq L B p q ↔ Action L B p = Action L B q) ∧
(∀ b c d e (p q : Path E b c) (l : Path E d b) (r : Path E c e),
ContextEq L B p q → ContextEq L B (Path.append (Path.append l p) r) (Path.append (Path.append l q) r)) ∧
(∀ b c (p : Path E b c), Supported L B p ↔ ∃ h : Path E a b, L c (Path.append h p)) ∧
(∀ b c (p q : Path E b c), ContextEq L B p q → (Supported L B p ↔ Supported L B q)) ∧
(∀ b c d (p p' : Path E b c) (q q' : Path E c d),
ContextEq L B p p' → ContextEq L B q q' →
ContextEq L B (Path.append p q) (Path.append p' q') ∧
(Supported L B (Path.append p q) ↔ Supported L B (Path.append p' q')))
end APFObservedProcess
Source
APF Paper 1 Supplement v9.27; exact native-ledger/history C1-C4 formal/source acceptance, 21 September 2026. Fixed original source and basis2026-09-14.1 retained.