Admission and partial ledger observations evolve together
ProvedAPFObservedHistory.action_lawsRealized histories retain admission and a separate partial observation graph. Their action has exact enabledness, a unique realized target, identity, and the same sequential composition domain. Admission is prefix-closed; the observation graph need not be total or prefix-closed.
Generic mathematics under the displayed hypotheses; this does not supply a physical source or observation family.
Evidence: the papers supply the original resource and continuation meanings; existing code supplies the explicit source interfaces; independent Lean checking covers these exact exports; recursive physical-premise closure is accepted for the original-source applications only.
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.
import Definitions.Def_APFObservedHistory
set_option autoImplicit false
namespace APFObservedHistory
open APFTypedHistory
universe u v w
variable {N : Type u} {E : N → N → Type v} {V : Type w} {a b c d : N}
variable {L : Language E a} {B : Observation E V a}
theorem step_exists_iff (s : State L B b) (p : Path E b c) :
(∃t,Step s p t) ↔ s.val.1 c p := by
constructor
· rintro ⟨t,h,_⟩; exact h
· intro h; exact ⟨advance s p h,h,rfl⟩
theorem step_unique {s : State L B b} {p : Path E b c} {t t' : State L B c}
(h : Step s p t) (h' : Step s p t') : t=t' := by
apply Subtype.ext; exact h.2.trans h'.2.symm
theorem step_identity (s : State L B b) : Step s (.nil b) s := by
constructor
· obtain ⟨h,hh,hs⟩ := s.property
rw [hs]; simpa only [residual,Path.append_nil] using hh
· rfl
theorem state_prefix_closed (hp : PrefixClosed L) (s : State L B b) :
PrefixClosed s.val.1 := by
obtain ⟨h,_,hs⟩ := s.property
intro c d p q hpq
rw [hs] at hpq ⊢
exact hp c d (Path.append h p) q (by simpa only [residual,Path.append_assoc] using hpq)
theorem step_composition (hp : PrefixClosed L) (s : State L B b) (t : State L B d)
(p : Path E b c) (q : Path E c d) :
(∃m,Step s p m ∧ Step m q t) ↔ Step s (Path.append p q) t := by
constructor
· rintro ⟨m,⟨_,hm⟩,⟨hq,ht⟩⟩
constructor
· rw [hm] at hq; exact hq
· rw [ht,hm,residual_append]
· rintro ⟨hpq,ht⟩
have hp' := state_prefix_closed hp s c d p q hpq
refine ⟨advance s p hp',⟨hp',rfl⟩,hpq,?_⟩
change t.val = residual (residual s.val p) q
rw [residual_append]; exact ht
end APFObservedHistory
open APFTypedHistory APFObservedHistory
universe u v w
variable {N : Type u} {E : N → N → Type v} {V : Type w} {a : N}
theorem APFObservedHistory.action_laws (L : Language E a) (B : Observation E V a)
(hp : PrefixClosed L) : ActionLaws L B := by
sorry