From relational reach to carrier-level alignment connections
DefinitionAPFReachKernel_Bridgeapfconditional-referencereachkernel
The construction turns a continuation model into a realignment model using explicit zero-price identity and subadditivity hypotheses. A connection follows the reached carrier; its definition does not preserve a specified actual held family. Canonical alignments use a separately supplied family assignment. Carrier floors and canonical-family consequences remain conditional on those inputs.
Definition code
import Definitions.Def_APFReachKernel_ContinuationModel
import Definitions.Def_APFReachKernel_Foundation
import Definitions.Def_APFReachKernel_RealignmentModel
namespace ReachKernel
end ReachKernel
/-
ReachKernel/Bridge.lean
A carrier-level construction of RealignmentModel from ContinuationModel
with explicit zero-cost identity and subadditivity hypotheses.
The constructed Connects tracks carriers, not the actual family left held
by an original process; it may relate every alignment on a reached carrier.
Admissibility of complete physical alignments and preservation of actual
holdings are separate obligations. Canonical-family conclusions below are
conditional on the supplied family assignment, not a new B01 supplier.
-/
set_option autoImplicit false
namespace ReachKernel
variable {X Q R K : Type} [Add K] [LE K]
variable {Cont : X → Set Q} {D : Set (PhysicalState Cont → Bool)}
variable {calib : R → K} {C : K}
/-- "π takes the substrate from a to b": π is available at a's carrier and
reaches b's carrier. -/
def connectsOf (M : ContinuationModel Cont calib C)
(π : Q) (a b : Alignment Cont D) : Prop :=
∃ x, physicalClass Cont x = a.carrier ∧ π ∈ Cont x ∧ M.Reaches x π b.carrier
/-- The alignment-level model derived from the raw-level one. -/
def RealignmentModel.ofContinuation (M : ContinuationModel Cont calib C)
(D : Set (PhysicalState Cont → Bool)) (zero : K) (zero_le : ∀ k : K, zero ≤ k)
(hzero : ∀ x, ∃ e, e ∈ Cont x ∧ M.Reaches x e (physicalClass Cont x) ∧ calib (M.load e) = zero)
(hP3 : ∀ π₁ π₂, calib (M.load (M.concat π₂ π₁)) ≤ calib (M.load π₁) + calib (M.load π₂)) :
RealignmentModel Cont D calib C where
Connects := connectsOf M
load := M.load
concat := M.concat
Admissible π := calib (M.load π) ≤ C
zero := zero
zero_le := zero_le
identity_protocol := by
intro a
obtain ⟨x, hx⟩ := Quotient.exists_rep a.carrier
obtain ⟨e, he, hr, hc⟩ := hzero x
exact ⟨e, ⟨x, hx, he, hx ▸ hr⟩, hc⟩
concat_connects := by
rintro π₁ π₂ a₁ a₂ a₃ ⟨x, hx, hmem, hr⟩ ⟨x', hx', hmem', hr'⟩ hadm
refine ⟨x, hx, ?_, ?_⟩
· exact M.concat_mem x π₁ π₂ a₂.carrier hmem hr (by
show availableAt Cont π₂ a₂.carrier
rw [← hx']; exact hmem') hadm
· refine M.concat_reaches x π₁ π₂ a₂.carrier a₃.carrier hmem hr ?_ hadm ?_
· show availableAt Cont π₂ a₂.carrier
rw [← hx']; exact hmem'
· intro x'' hx''
exact M.reaches_descends x' x'' π₂ a₃.carrier (hx'.trans hx''.symm) hr'
cost_subadditive := hP3
end ReachKernel
/-! ## Conditional canonical alignments and floor
A supplied family function makes canonical alignments determined by their carriers. The results use this explicit restriction; constructing the original physical family correspondence is separate. -/
namespace ReachKernel
variable {X Q R K : Type} [Add K] [LE K]
variable {Cont : X → Set Q} {D : Set (PhysicalState Cont → Bool)}
variable {calib : R → K} {C : K}
/-- The held family determined by a carrier, per a family map `held`. -/
def Canonical (held : PhysicalState Cont → Set {d : PhysicalState Cont → Bool // d ∈ D})
(a : Alignment Cont D) : Prop :=
a.carried = held a.carrier
/-- (P4) restricted to a class of alignments. -/
def RealignmentModel.FloorOn (M : RealignmentModel Cont D calib C)
(P : Alignment Cont D → Prop) (ε : K) : Prop :=
∀ π a b, P a → P b → M.Connects π a b → a ≠ b → ε ≤ M.cost π
/-- The carrier floor: moving the carrier costs at least ε. -/
def RealignmentModel.CarrierFloor (M : RealignmentModel Cont D calib C) (ε : K) : Prop :=
∀ π a b, M.Connects π a b → a.carrier ≠ b.carrier → ε ≤ M.cost π
end ReachKernel
Source
APF ReachKernel; original archive f05a126714fe8d24a4377f87a7e460777555e19227087abb6c18dbe2ffae959e, ReachKernel/Bridge.lean; corrected compatible source manifest 2c8ccc43b416ba6e4f1b9eb02d4780b828e8dab689651eb567f7d159065cdfd2. Private conditional/reference model.