Profiles, physical-state classes and availability
DefinitionAPFReachKernel_Foundationapfconditional-referencereachkernel
A continuation profile assigns a set of admitted responses to each raw configuration. Two configurations belong to the same model state when their complete profiles agree. This interface defines the quotient, its class map and the availability predicate descended to that quotient. The local predicate-valued Set is a Lean-core implementation; physical completeness of a supplied profile is a separate assumption.
Definition code
namespace ReachKernel
end ReachKernel
/-
ReachKernel/Foundation.lean
Core-only profile quotient, class map and descended availability predicate.
The local Set is a monomorphic predicate type. This package's use of these
objects does not certify every physical interpretation of a model instance.
-/
set_option autoImplicit false
namespace ReachKernel
/-- Minimal stand-in for Mathlib's `Set`, extensionally identical (`α → Prop`). -/
def Set (α : Type) : Type := α → Prop
instance {α : Type} : Membership α (Set α) := ⟨fun s a => s a⟩
def continuationSetoid {X Q : Type} (profile : X → Set Q) : Setoid X where
r x y := profile x = profile y
iseqv := ⟨fun _ => rfl, fun h => h.symm, fun h k => h.trans k⟩
def PhysicalState {X Q : Type} (profile : X → Set Q) : Type :=
Quotient (continuationSetoid profile)
def physicalClass {X Q : Type} (profile : X → Set Q) (x : X) :
PhysicalState profile := Quotient.mk _ x
/-- B01 descent of the availability predicate `c ∈ Cont x` (this is exactly
`APFOriginalProcess.quotientDomain`): availability of a continuation depends
only on the profile, because the profile IS the set of available continuations. -/
def availableAt {X Q : Type} (Cont : X → Set Q) (c : Q) :
PhysicalState Cont → Prop :=
Quotient.lift (fun x : X => c ∈ Cont x)
(fun x y (h : Cont x = Cont y) => by
show (c ∈ Cont x) = (c ∈ Cont y)
rw [h])
theorem availableAt_mk {X Q : Type} (Cont : X → Set Q) (c : Q) (x : X) :
availableAt Cont c (physicalClass Cont x) ↔ c ∈ Cont x := Iff.rfl
theorem physicalClass_eq_iff {X Q : Type} (Cont : X → Set Q) (x y : X) :
physicalClass Cont x = physicalClass Cont y ↔ Cont x = Cont y :=
⟨fun h => Quotient.exact h, fun h => Quotient.sound h⟩
end ReachKernel
Source
APF ReachKernel; original archive f05a126714fe8d24a4377f87a7e460777555e19227087abb6c18dbe2ffae959e, ReachKernel/Foundation.lean; corrected compatible source manifest 2c8ccc43b416ba6e4f1b9eb02d4780b828e8dab689651eb567f7d159065cdfd2. Private conditional/reference model.