MindFormal v1.0.0One Mind

MindFormal.Run.FiniteClockFlow

@[reducible, inline]
abbrev MindFormal.FiniteClocks.Histories (K : Type u_2) (N : K → ℕ) :
Type u_2

Valid chronological records, one for each clock in a finite family.

Equations
Instances For
    structure MindFormal.FiniteClocks.Flow (K : Type u_2) (H : ℝ) (N : K → ℕ) (E : Type u_3) [TopologicalSpace E] :
    Type (max u_2 u_3)

    02.12: the response to prescribed finite records, before native coupling. The physical constructor below supplies this from the original equations. Strict-past agreement implies agreement of continuous states through the read time; this is a causal fixed-input property, not coupled existence.

    Instances For
      noncomputable def MindFormal.FiniteClocks.Flow.schedule {K : Type u_1} {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] (F : Flow K H N E) (h : Histories K N) (c : K) :
      NativeSchedule (fun (t : ℝ) => (F.guard c) ((ContinuousMap.IccExtend ⋯ (F.path h)) t)) (fun (t : ℝ) => F.score c ((ContinuousMap.IccExtend ⋯ (F.path h)) t)) H (F.pause c)

      02.12: native schedules observed on the given-record response path.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        structure MindFormal.FiniteClocks.Prefix {K : Type u_1} {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] (F : Flow K H N E) :
        Type u_1

        02.12: accepted record prefixes of one physical response, with a common cursor. The first unaccepted hit is no earlier than the cursor. After the initial resolution and every subsequent step it is strictly later.

        Instances For
          noncomputable def MindFormal.FiniteClocks.Prefix.nextValue {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) :

          Earliest native hit across all clocks, capped by the horizon. Expirations are already part of the prescribed-history response and need no new record.

          Equations
          Instances For
            theorem MindFormal.FiniteClocks.finite_next_bounds {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) :

            The common next switch is within the horizon and cannot precede the accepted cursor, including clocks whose first event occurs at zero.

            noncomputable def MindFormal.FiniteClocks.Prefix.nextTime {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) :

            02.12: the selected merged switch lies in the compact horizon.

            Equations
            Instances For
              theorem MindFormal.FiniteClocks.finite_next_le_hit {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (c : K) :

              02.12: the merged switch precedes every clock's next hit. The minimum includes the horizon, so a clock need not fire at that switch. This is deterministic.

              theorem MindFormal.FiniteClocks.finite_schedule_transfer {K : Type u_1} {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] (F : Flow K H N E) (h k : Histories K N) (a : ↑(HorizonTime H)) (he : ∀ t ≤ a, (F.path h) t = (F.path k) t) (c : K) (n : ℕ) (t : ℝ) (i : Fin (N c)) :
              ((F.schedule h c).search n).event = some (t, i) → t ≤ ↑a → ((F.schedule k c).search n).event = some (t, i)

              02.12: agreement of two response paths through a transfers any native event through a, with the same clock and positive pause. Finite labels, a in the common horizon and continuous qualification observations are built into Flow. Ranking observations are arbitrary; equality at the hit suffices.

              noncomputable def MindFormal.FiniteClocks.Prefix.stepCount {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (c : K) :

              02.12: counts after resolving all clocks at the one merged switch.

              Equations
              Instances For
                noncomputable def MindFormal.FiniteClocks.Prefix.stepHistory {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) :

                02.12: all updated histories come from the same already determined continuous path at the switch. No recomputation between simultaneous labels occurs.

                Equations
                Instances For
                  theorem MindFormal.FiniteClocks.finite_step_old_occupied {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (c : K) (k : ℕ) :
                  k < P.stepCount c → ∃ (p : ℝ × Fin (N c)), ((F.schedule P.history c).search k).event = some p

                  02.12: every accepted slot of the update is an actual event of the old response. The old prefix is occupied, and a count is increased only by its actual next event at the switch. This is the finite-record step of coupling.

                  theorem MindFormal.FiniteClocks.finite_step_old_times {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (c : K) (k : ℕ) :
                  k < P.stepCount c → ∀ (t : ℝ) (i : Fin (N c)), ((F.schedule P.history c).search k).event = some (t, i) → t ≤ P.nextValue

                  02.12: every accepted old-response event is at or before the chosen switch. Earlier records are bounded by the old cursor and the newly accepted ones occur at the switch itself; no advance-time inequality is a premise.

                  theorem MindFormal.FiniteClocks.finite_step_paths {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (t : ↑(HorizonTime H)) :
                  t ≤ P.nextTime → (F.path P.history) t = (F.path P.stepHistory) t

                  02.12: the new prescribed-record solution agrees with the old solution through the switch. CoupledFlow supplies the independently proved strict-past causality of the fixed-input solver. The simultaneous actual native insertions preserve that past, so no path-matching or coupled compatibility conclusion is assumed.

                  theorem MindFormal.FiniteClocks.finite_step_prefix {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (c : K) :

                  02.12: each updated finite record is precisely a prefix of the NEW solution's own native schedule. This follows from strict-past path agreement and native event locality, not a premise that the recomputed solution preserves records. All clocks and simultaneous fixed-priority selections are included.

                  theorem MindFormal.FiniteClocks.finite_step_next_strict {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (c : K) (t : ℝ) (i : Fin (N c)) :

                  02.12: after resolving a merged switch, the next native hit of any clock is strictly later. New physical paths agree through the switch, a clock which fired is refractory, and a clock which did not fire had no hit there. Thus simultaneous resolution creates no repeated zero-time event.

                  noncomputable def MindFormal.FiniteClocks.Prefix.step {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) :

                  02.12: one complete merged step. The old path supplies every search, the native updates supply the histories, and the fixed-input solver supplies the continuation. All accepted-prefix invariants are proved below.

                  Equations
                  Instances For
                    noncomputable def MindFormal.FiniteClocks.Prefix.budget {K : Type u_1} [Fintype K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) :

                    Remaining record slots, summed over the finite clocks. Refractoriness supplies the cap separately for every clock; there is no shared pause.

                    Equations
                    Instances For
                      theorem MindFormal.FiniteClocks.finite_count_bound {K : Type u_1} {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (c : K) :
                      P.count c ≤ ⌊H / F.pause c⌋₊ + 1

                      Every occupied prefix obeys its own refractory count bound.

                      theorem MindFormal.FiniteClocks.finite_step_hit {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (hH : P.nextValue < H) :
                      ∃ (c : K) (i : Fin (N c)), ((F.schedule P.history c).search (P.count c)).event = some (P.nextValue, i)

                      A nonterminal merged switch accepts at least one actual native hit.

                      theorem MindFormal.FiniteClocks.finite_budget_decreases {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) (hH : P.nextValue < H) :

                      The count budget strictly decreases at every nonterminal switch, even if different minds' clocks have arbitrarily close release times.

                      theorem MindFormal.FiniteClocks.finite_termination {K : Type u_1} [Fintype K] [Nonempty K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] {F : Flow K H N E} (P : Prefix F) :
                      ∃ (n : ℕ), 0 < n ∧ n ≤ P.budget + 1 ∧ have Q := Prefix.step^[n] P; ↑Q.time = H ∧ ∀ (c : K), ((F.schedule Q.history c).search (Q.count c)).event = none

                      The finite-clock assembly terminates without a supplied joint history.

                      def MindFormal.FiniteClocks.Flow.initial {K : Type u_1} {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] (F : Flow K H N E) :

                      Empty histories supply a valid starting prefix even when native guards already qualify at time zero. The first step resolves all ties.

                      Equations
                      Instances For
                        theorem MindFormal.FiniteClocks.finite_assembly {K : Type u_1} [Nonempty K] [Finite K] {H : ℝ} {N : K → ℕ} {E : Type u_2} [TopologicalSpace E] (F : Flow K H N E) :
                        ∃ (h : Histories K N), ∀ (c : K), ↑(h c) = nativeActionHistory (F.schedule h c)

                        The full native histories of arbitrarily many refractory clocks are constructed from the causal prescribed-history solver. Neither a fixed point nor its terminating event list is an assumption.