Q2: coarse observations of deterministic fine dynamics
DefinitionAPFReachKernel_Coarseningapfconditional-referencereachkernel
A deterministic fine transition and an onto observation map induce a coarse typed use relation. Congruence means that one operation sends every representative of a coarse state into the same coarse state. Lifted readouts additionally use supplied inhabited process data, represented by a process value. The interface also supplies spin examples with different observation maps. Physical affordability and the impossibility of refining the observation are not derived. Full injective resolution is distinct from an arbitrary partial refinement.
Definition code
import Definitions.Def_APFReachKernel_Foundation
import Definitions.Def_APFReachKernel_SpinControl
import Definitions.Def_APFReachKernel_Typed
import Definitions.Def_APFReachKernel_TypedDoors
namespace ReachKernel.Coarsening
end ReachKernel.Coarsening
namespace ReachKernel.Coarsening.Spin
end ReachKernel.Coarsening.Spin
/-
ReachKernel/Coarsening.lean
Q2: a supplied deterministic fine dynamics and coarse surjection induce
a coarse use relation. Surjectivity and inhabited process data are explicit.
The proofs characterize readout agreement by fibre constancy and single
valuedness by congruence. register_iff is outcome agreement, not physical
record construction. definite_of_injective says an injective map is a
congruence; it does not prove every partial refinement monotonically removes
indefiniteness. Spin controls use supplied maps/dynamics. No affordability,
physical resolution supplier or quantum conclusion is derived.
-/
set_option autoImplicit false
namespace ReachKernel.Coarsening
open Typed TypedDoors
section General
variable {F S P : Type} (next : F → P → F) (π : F → S)
abbrev Qc (S P : Type) := S × P
def T (S P : Type) : Typing Unit (fun _ => Qc S P) := ⟨fun _ _ => ()⟩
/-- The induced coarse use relation: from s, running p, end at t iff some
fine representative of s is carried into t. Computed, not stipulated. -/
def Uc : UseRelation (Raw := fun _ => S) (T S P) :=
fun _ c s t => c.1 = s ∧ ∃ x, π x = s ∧ π (next x c.2) = t
variable (hπ : ∀ s, ∃ x, π x = s) (p₀ : P)
include hπ p₀
/-- Coarse classes are the coarse states. -/
theorem ucont_inj (s s' : S) (h : UCont (T S P) (Uc next π) () s = UCont (T S P) (Uc next π) () s') :
s = s' := by
obtain ⟨x, hx⟩ := hπ s
have hs : ((s, p₀) : Qc S P) ∈ UCont (T S P) (Uc next π) () s := ⟨π (next x p₀), rfl, x, hx, rfl⟩
rw [h] at hs
obtain ⟨_, h1, _⟩ := hs
exact h1
/-- A coarse readout, lifted to classes. -/
def lift (f : S → Bool) : UDist (T S P) (Uc next π) := fun _ =>
Quotient.lift f (fun a b (h : UCont (T S P) (Uc next π) () a = UCont (T S P) (Uc next π) () b) => by
rw [ucont_inj next π hπ p₀ a b h])
/-- π is a congruence for `p`: fibres go to fibres. -/
def Congruent (p : P) : Prop := ∀ x x', π x = π x' → π (next x p) = π (next x' p)
end General
/-! ### The spin control under rotations only -/
namespace Spin
open _root_.ReachKernel.SpinControl (Ax)
open _root_.ReachKernel.SpinControl.Ax
inductive Rot | Rx | Ry | Rz
deriving DecidableEq, Repr
open Rot
/-- Deterministic quarter turns (SpinControl's table restricted to rotations). -/
def rot : Ax → Rot → Ax
| yp, Rx => zp | zp, Rx => ym | ym, Rx => zm | zm, Rx => yp | a, Rx => a
| zp, Ry => xp | xp, Ry => zm | zm, Ry => xm | xm, Ry => zp | a, Ry => a
| xp, Rz => yp | yp, Rz => xm | xm, Rz => ym | ym, Rz => xp | a, Rz => a
/-- One supplied Boolean coarse map; affordability is not proved. -/
def π1 (a : Ax) : Bool := decide (a = zp)
/-- Two: on the z axis? positive? -/
def π2 (a : Ax) : Bool × Bool := (decide (a = zp ∨ a = zm), decide (a = zp ∨ a = xp ∨ a = yp))
/-- Three bits separating all six axes. -/
def π3 (a : Ax) : Bool × Bool × Bool :=
(decide (a = zp ∨ a = zm), decide (a = xp ∨ a = xm), decide (a = zp ∨ a = xp ∨ a = yp))
end Spin
end ReachKernel.Coarsening
Source
APF ReachKernel; original archive f05a126714fe8d24a4377f87a7e460777555e19227087abb6c18dbe2ffae959e, ReachKernel/Coarsening.lean; corrected compatible source manifest 2c8ccc43b416ba6e4f1b9eb02d4780b828e8dab689651eb567f7d159065cdfd2. Private conditional/reference model.