A static control model
DefinitionAPFReachKernel_StaticControlapfconditional-referencereachkernel
This explicit continuation and realignment example keeps its state fixed. It supports the reference result that the displayed structural laws alone do not force movement. Its scope is those supplied structures; it is not a model of every adopted APF input.
Definition code
import Definitions.Def_APFReachKernel_ContinuationModel
import Definitions.Def_APFReachKernel_Foundation
import Definitions.Def_APFReachKernel_RealignmentModel
namespace ReachKernel.StaticControl
end ReachKernel.StaticControl
/-
ReachKernel/StaticControl.lean
An explicit static model of the displayed continuation and realignment
structures. It refutes derivability of movement from those structure laws
alone; it is not a countermodel to all adopted foundation inputs.
-/
set_option autoImplicit false
namespace ReachKernel.StaticControl
/-- Raw substrate: two preparations. Continuations: a number of idle steps.
`true` admits any number of idle steps; `false` admits only zero. So the two
profiles differ (two physical classes), yet every continuation is idle. -/
def cont : Bool → Set Nat
| true => fun _ => True
| false => fun n => n = 0
def calib : Nat → Nat := fun n => n
/-- The static continuation model: every continuation reaches exactly the
profile it started from. -/
def model (C : Nat) : ContinuationModel cont calib C where
Reaches x _ y := y = physicalClass cont x
load n := n
concat a b := a + b
reaches_descends := by
intro x x' c y hxx' hr
rw [hr, hxx']
identity := by
intro x
refine ⟨0, ?_, rfl⟩
cases x with
| true => exact trivial
| false => exact rfl
concat_mem := by
intro x c c' y hc hr ha _
subst hr
have hc' : c' ∈ cont x := ha
cases x with
| true => trivial
| false =>
have hc0 : c = 0 := hc
have hc'0 : c' = 0 := hc'
show c' + c = 0
rw [hc0, hc'0]
concat_reaches := by
intro x c c' y z _ hr _ _ hall
exact hall x hr.symm
prefix_mem := by
intro x c c' h
cases x with
| true => trivial
| false =>
have h0 : c' + c = 0 := h
show c = 0
exact Nat.eq_zero_of_add_eq_zero_left h0
/-- The static realignment model: a protocol connects an alignment only to
itself. (P1)–(P3) hold. -/
def realignment (C : Nat) (D : Set (PhysicalState cont → Bool)) :
RealignmentModel cont D calib C where
Connects _ a b := a = b
load n := n
concat a b := a + b
Admissible _ := True
zero := 0
zero_le := Nat.zero_le
identity_protocol := fun a => ⟨0, rfl, rfl⟩
concat_connects := by
intro π₁ π₂ a₁ a₂ a₃ h₁ h₂ _
exact h₁.trans h₂
cost_subadditive := by
intro π₁ π₂
show π₂ + π₁ ≤ π₁ + π₂
rw [Nat.add_comm]
exact Nat.le_refl _
end ReachKernel.StaticControl
Source
APF ReachKernel; original archive f05a126714fe8d24a4377f87a7e460777555e19227087abb6c18dbe2ffae959e, ReachKernel/StaticControl.lean; corrected compatible source manifest 2c8ccc43b416ba6e4f1b9eb02d4780b828e8dab689651eb567f7d159065cdfd2. Private conditional/reference model.