Documentation

CsdLean4.RecordLayer.HandClock

The drift pointer as an autonomous hand clock #

Category: 7-SigmaLayer (the record layer). BACKLOG #201 (out of #39; the author's third operational-geometry brief, §2: make the reference clock internally driven).

#185's record clock writes its ticks by a schedule: slot n is written on the window [nT, (n+1)T] of t_Σ. Here the clock is #194's activated write read differently. One carrier (message 1, prepared at A) and one pointer (at B, prepared in the first half-arc) are the whole device; the carrier shuttles between the sites on its own, the pointer turns at the rate −(2g/ħ) f'(θ₂) n_B only while the carrier is at B, and its lifted displacement after time t is D(t) = κ (ωt − sin ωt cos ωt)/(2ω) with κ = −(2g/ħ) f'(θ₂)(J/Ω)², ω = Ω/ħ: a staircase of mean slope κ/2 whose steps are the carrier's visits. Read in K equal arcs, the pointer is a hand and each arc crossing is a tick written by the carrier itself. The smallest finite clock whose internal state activates its tick writes: one carrier, one pointer, K arcs, against #185's K slot tori.

Honest scope #

References: specs/BACKLOG.md #201, #194, #195, #185, #202, #39; RecordLayer/ActivatedWrite.lean (activeFlow, pointerDrift, driftRate, pointerDrift_lower, pointerDrift_upper, pointerAmount_add), RecordLayer/ActivatedHamiltonian.lean (hamiltonianFlow_activeFlow), RecordLayer/RecordClock.lean (the scheduled clock this replaces), RecordLayer/RecordOccurrence.lean.

The hand read in K arcs #

noncomputable def CSD.RecordLayer.handCount (K : ℕ) (q : LF4.KTorus) :

The tick count: the arc index of the pointer's representative among K equal arcs (n/K, (n+1)/K].

Equations
Instances For
    noncomputable def CSD.RecordLayer.handReading (K : ℕ) (τ : ℝ) (q : LF4.KTorus) :

    The clock reading: the tick count times the calibration.

    Equations
    Instances For

      The arc displaying count n.

      Equations
      Instances For
        theorem CSD.RecordLayer.handArc_disjoint (K : ℕ) {n m : ℕ} (h : n ≠ m) :
        theorem CSD.RecordLayer.handCount_eq_iff {K : ℕ} (hK : 0 < K) (q : LF4.KTorus) (n : ℕ) :
        handCount K q = n ↔ rep q.1 ∈ Set.Ioc (↑n / ↑K) ((↑n + 1) / ↑K)

        ★ The arcs are intervals: handCount q = n iff rep q ∈ (n/K, (n+1)/K].

        The hand's preparation: the first half-arc.

        Equations
        Instances For

          The hand's motion #

          noncomputable def CSD.RecordLayer.handRate {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (q : LF4.KTorus) :

          The hand's mean rate κ = −(2g/ħ) f'(θ₂) (J/Ω)².

          Equations
          Instances For
            noncomputable def CSD.RecordLayer.handFreq {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (q : LF4.KTorus) :

            The hand's Rabi rate ω = Ω/ħ.

            Equations
            Instances For
              noncomputable def CSD.RecordLayer.hand {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (t : ℝ) (q : LF4.KTorus) :

              The hand: the pointer of #194's activated write with the carrier prepared as message 1.

              Equations
              Instances For
                theorem CSD.RecordLayer.handFreq_pos {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) (q : LF4.KTorus) :
                0 < handFreq J ħ g hf q
                theorem CSD.RecordLayer.hand_eq {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) (t : ℝ) (q : LF4.KTorus) :
                hand J ħ g hf t q = pshift (pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t) q

                The hand's motion in closed form: the drift κ (ωt − sin ωt cos ωt)/(2ω).

                theorem CSD.RecordLayer.hand_zero {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (q : LF4.KTorus) :
                hand J ħ g hf 0 q = q
                theorem CSD.RecordLayer.rateAt_pos_of_handRate_pos {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) {q : LF4.KTorus} (hκ : 0 < handRate J ħ g hf q) :
                0 < rateAt g ħ hf q.2

                The pointer's own rate is positive when the mean rate is.

                theorem CSD.RecordLayer.pointerDrift_mono {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {q : LF4.KTorus} (hκ : 0 < handRate J ħ g hf q) {s t : ℝ} (hst : s ≤ t) :
                pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) s ≤ pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t

                ★ The hand never turns back: the drift is non-decreasing, by the group law of the accumulated occupancy.

                theorem CSD.RecordLayer.rep_hand_of_le {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {q : LF4.KTorus} (hq0 : 0 < rep q.1) {t : ℝ} (hD : 0 ≤ pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t) (h : rep q.1 + pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t ≤ 1) :
                rep (hand J ħ g hf t q).1 = rep q.1 + pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t

                No wrap: below one turn the representative of the hand is the prepared representative plus the drift.

                Calibration and horizon #

                noncomputable def CSD.RecordLayer.tickTime (K : ℕ) (κ : ℝ) :

                The derived calibration: the time τ_tick = 2/(Kκ) in which the mean slope κ/2 crosses one arc 1/K.

                Equations
                Instances For
                  noncomputable def CSD.RecordLayer.handHorizon (K : ℕ) (κ ω : ℝ) :

                  The horizon: one turn, (2/κ)(1 − 1/K) − 1/(2ω).

                  Equations
                  Instances For
                    theorem CSD.RecordLayer.tickTime_pos {K : ℕ} (hK : 0 < K) {κ : ℝ} (hκ : 0 < κ) :
                    0 < tickTime K κ
                    theorem CSD.RecordLayer.mul_tickTime {K : ℕ} (hK : 0 < K) {κ : ℝ} (hκ : 0 < κ) :
                    ↑K * κ * tickTime K κ = 2
                    theorem CSD.RecordLayer.handHorizon_pos {K : ℕ} (hK : 2 ≤ K) {κ ω : ℝ} (hκ : 0 < κ) (hω : 0 < ω) (hslow : κ ≤ ω) :
                    0 < handHorizon K κ ω

                    A hand slower than its Rabi rate has a positive horizon once K ≥ 2.

                    theorem CSD.RecordLayer.band_at_handHorizon {K : ℕ} {κ ω : ℝ} (hκ : 0 < κ) (hω : 0 < ω) :
                    κ * (handHorizon K κ ω / 2 + 1 / (4 * ω)) = 1 - 1 / ↑K

                    At the horizon the upper band reaches 1 − 1/K.

                    theorem CSD.RecordLayer.pointerDrift_tickTime {K : ℕ} (hK : 0 < K) {κ ω : ℝ} (hκ : 0 < κ) (hω : 0 < ω) (n : ℕ) :
                    ↑n / ↑K - κ / (4 * ω) ≤ pointerDrift κ ω (↑n * tickTime K κ) ∧ pointerDrift κ ω (↑n * tickTime K κ) ≤ ↑n / ↑K + κ / (4 * ω)

                    ★ The calibration is derived: after n tick times the hand has crossed n arcs, up to the band κ/(4ω).

                    Persistence and resolution #

                    theorem CSD.RecordLayer.rep_hand {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) {t : ℝ} (ht0 : 0 ≤ t) (ht : t ≤ handHorizon K (handRate J ħ g hf q) (handFreq J ħ g hf q)) :
                    rep (hand J ħ g hf t q).1 = rep q.1 + pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t

                    Over the horizon the hand has not wrapped.

                    theorem CSD.RecordLayer.handCount_mono {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) {s t : ℝ} (hs : 0 ≤ s) (hst : s ≤ t) (ht : t ≤ handHorizon K (handRate J ħ g hf q) (handFreq J ħ g hf q)) :
                    handCount K (hand J ħ g hf s q) ≤ handCount K (hand J ħ g hf t q)

                    ★★ Ticks persist: over the horizon the count never decreases.

                    theorem CSD.RecordLayer.abs_handCount_sub_le {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) {t : ℝ} (ht0 : 0 ≤ t) (ht : t ≤ handHorizon K (handRate J ħ g hf q) (handFreq J ħ g hf q)) :
                    |↑(handCount K (hand J ħ g hf t q)) - ↑K * pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t| ≤ 1

                    The count is within one of K times the drift (the preparation lies in the first half-arc).

                    theorem CSD.RecordLayer.abs_handReading_sub_le {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) {t : ℝ} (ht0 : 0 ≤ t) (ht : t ≤ handHorizon K (handRate J ħ g hf q) (handFreq J ħ g hf q)) :
                    |handReading K (tickTime K (handRate J ħ g hf q)) (hand J ħ g hf t q) - t| ≤ tickTime K (handRate J ħ g hf q) + 1 / (2 * handFreq J ħ g hf q)

                    ★★ The resolution bound: calibrated with τ_tick = 2/(Kκ), the hand reads within τ_tick + 1/(2ω) of t over the horizon — one arc of count uncertainty plus the staircase's band about its mean.

                    Each tick as a write #

                    noncomputable def CSD.RecordLayer.tickStart (K : ℕ) (κ : ℝ) (n : ℕ) :

                    Tick n cannot have been written before (2n − 1)/(2Kκ).

                    Equations
                    Instances For
                      noncomputable def CSD.RecordLayer.tickEnd (K : ℕ) (κ ω : ℝ) (n : ℕ) :

                      Tick n is written by n τ_tick + 1/(2ω).

                      Equations
                      Instances For
                        noncomputable def CSD.RecordLayer.tickWindow (K : ℕ) (κ ω : ℝ) :

                        The window on which tick n displays: τ_tick/2 − 1/ω.

                        Equations
                        Instances For
                          theorem CSD.RecordLayer.tickEnd_succ (K : ℕ) (κ ω : ℝ) (n : ℕ) :
                          tickEnd K κ ω (n + 1) = tickEnd K κ ω n + tickTime K κ
                          theorem CSD.RecordLayer.tickStart_nonneg {K : ℕ} (hK : 0 < K) {κ : ℝ} (hκ : 0 < κ) {n : ℕ} (hn : 1 ≤ n) :
                          0 ≤ tickStart K κ n
                          theorem CSD.RecordLayer.tickStart_le_tickEnd {K : ℕ} (hK : 0 < K) {κ ω : ℝ} (hκ : 0 < κ) (hω : 0 < ω) (n : ℕ) :
                          tickStart K κ n ≤ tickEnd K κ ω n
                          theorem CSD.RecordLayer.tickWindow_nonneg {K : ℕ} (hK : 0 < K) {κ ω : ℝ} (hκ : 0 < κ) (hslow : ↑K * κ ≤ ω) :
                          0 ≤ tickWindow K κ ω

                          The window is a window exactly when the hand gains at most one arc per Rabi radian: Kκ ≤ ω.

                          theorem CSD.RecordLayer.band_at_tickEnd {K : ℕ} (hK : 0 < K) {κ ω : ℝ} (hκ : 0 < κ) (hω : 0 < ω) (n : ℕ) :
                          κ * (tickEnd K κ ω n / 2 - 1 / (4 * ω)) = ↑n / ↑K
                          theorem CSD.RecordLayer.band_at_tickWindow_end {K : ℕ} (hK : 0 < K) {κ ω : ℝ} (hκ : 0 < κ) (hω : 0 < ω) (n : ℕ) :
                          κ * ((tickEnd K κ ω n + tickWindow K κ ω) / 2 + 1 / (4 * ω)) = ↑n / ↑K + 1 / (2 * ↑K)
                          theorem CSD.RecordLayer.hand_before_tick {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) {n : ℕ} (hn1 : 1 ≤ n) (hnK : n + 1 ≤ K) {t : ℝ} (ht0 : 0 ≤ t) (ht : t < tickStart K (handRate J ħ g hf q) n) :
                          handCount K (hand J ħ g hf t q) < n

                          ★★ Before its start, tick n has not been written: the count is below n.

                          theorem CSD.RecordLayer.hand_at_tick {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) {n : ℕ} (hnK : n + 1 ≤ K) {t : ℝ} (ht₁ : tickEnd K (handRate J ħ g hf q) (handFreq J ħ g hf q) n ≤ t) (ht₂ : t ≤ tickEnd K (handRate J ħ g hf q) (handFreq J ħ g hf q) n + tickWindow K (handRate J ħ g hf q) (handFreq J ħ g hf q)) :
                          handCount K (hand J ħ g hf t q) = n

                          ★★ Through its window, tick n displays: the count is exactly n.

                          noncomputable def CSD.RecordLayer.tickWrite {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) (hf1 : ContDiff ℝ 1 f) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) (hslow : ↑K * handRate J ħ g hf q ≤ handFreq J ħ g hf q) {n : ℕ} (hn1 : 1 ≤ n) (hnK : n + 1 ≤ K) :

                          ★★★ Tick n as an actual occurrence (#191): the hand at B (site {1}), history from 0, value n, write interval [(2n−1)/(2Kκ), n τ_tick + 1/(2ω)], window τ_tick/2 − 1/ω. The hypotheses: the hand prepared in the first half-arc, a positive mean rate, the slowness Kκ ≤ ω, and 1 ≤ n ≤ K − 1.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            theorem CSD.RecordLayer.tickWrite_value_ne {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) (hf1 : ContDiff ℝ 1 f) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) (hslow : ↑K * handRate J ħ g hf q ≤ handFreq J ħ g hf q) {n : ℕ} (hn1 : 1 ≤ n) (hnK : n + 2 ≤ K) :
                            (tickWrite J ħ g hf hJ hħ hf1 hK hq hκ hslow hn1 ⋯).value ≠ (tickWrite J ħ g hf hJ hħ hf1 hK hq hκ hslow ⋯ hnK).value

                            Successive ticks are distinguishable: their values differ, so their arcs are disjoint.

                            theorem CSD.RecordLayer.handTick_persists {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) (hslow : ↑K * handRate J ħ g hf q ≤ handFreq J ħ g hf q) {n : ℕ} (hnK : n + 1 ≤ K) {t : ℝ} (ht₁ : tickEnd K (handRate J ħ g hf q) (handFreq J ħ g hf q) n ≤ t) (ht : t ≤ handHorizon K (handRate J ħ g hf q) (handFreq J ħ g hf q)) :
                            n ≤ handCount K (hand J ħ g hf t q)

                            ★ Once written, a tick persists: from the completion of tick n to the horizon the count is at least n.

                            theorem CSD.RecordLayer.handClock_generated {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hc : ContDiff ℝ (↑⊤) f) (t : ℝ) (q : LF4.KTorus) :

                            ★ Generation inherited from #195, no new geometry: the hand clock's dynamics is the flow of the activated energy on the arena, read at the clock's preparation.

                            theorem CSD.RecordLayer.hand_clock {f : ℝ → ℝ} (J ħ g : ℝ) (hf : Function.Periodic f 1) (hJ : 0 < J) (hħ : 0 < ħ) (hf1 : ContDiff ℝ 1 f) {K : ℕ} (hK : 0 < K) {q : LF4.KTorus} (hq : q ∈ handReady K) (hκ : 0 < handRate J ħ g hf q) (hslow : ↑K * handRate J ħ g hf q ≤ handFreq J ħ g hf q) :
                            (∀ (t : ℝ), hand J ħ g hf t q = pshift (pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t) q) ∧ (∀ (s t : ℝ), s ≤ t → pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) s ≤ pointerDrift (handRate J ħ g hf q) (handFreq J ħ g hf q) t) ∧ (∀ (s t : ℝ), 0 ≤ s → s ≤ t → t ≤ handHorizon K (handRate J ħ g hf q) (handFreq J ħ g hf q) → handCount K (hand J ħ g hf s q) ≤ handCount K (hand J ħ g hf t q)) ∧ (∀ (t : ℝ), 0 ≤ t → t ≤ handHorizon K (handRate J ħ g hf q) (handFreq J ħ g hf q) → |handReading K (tickTime K (handRate J ħ g hf q)) (hand J ħ g hf t q) - t| ≤ tickTime K (handRate J ħ g hf q) + 1 / (2 * handFreq J ħ g hf q)) ∧ (∀ (n : ℕ) (hn1 : 1 ≤ n) (hnK : n + 1 ≤ K), (tickWrite J ħ g hf hJ hħ hf1 hK hq hκ hslow hn1 hnK).site = {1} ∧ (tickWrite J ħ g hf hJ hħ hf1 hK hq hκ hslow hn1 hnK).prep = (CV.msgPoint 1, q) ∧ (tickWrite J ħ g hf hJ hħ hf1 hK hq hκ hslow hn1 hnK).value = n ∧ (tickWrite J ħ g hf hJ hħ hf1 hK hq hκ hslow hn1 hnK).writeEnd = tickEnd K (handRate J ħ g hf q) (handFreq J ħ g hf q) n) ∧ (∀ (n : ℕ), tickEnd K (handRate J ħ g hf q) (handFreq J ħ g hf q) (n + 1) = tickEnd K (handRate J ħ g hf q) (handFreq J ħ g hf q) n + tickTime K (handRate J ħ g hf q)) ∧ ∀ (n : ℕ), n + 1 ≤ K → ∀ (t : ℝ), tickEnd K (handRate J ħ g hf q) (handFreq J ħ g hf q) n ≤ t → t ≤ handHorizon K (handRate J ħ g hf q) (handFreq J ħ g hf q) → n ≤ handCount K (hand J ħ g hf t q)

                            ★★★ The hand clock. One carrier and one pointer, read in K arcs, with the mean rate κ and the Rabi rate ω of the preparation: the hand is #194's pointer; it never turns back; its count never decreases over the horizon; calibrated with τ_tick = 2/(Kκ) it reads within τ_tick + 1/(2ω) of t; each tick n with 1 ≤ n ≤ K − 1 is an ActualOccurrence at site {B} from the start 0 with value n, successive ticks spaced by τ_tick, and once written a tick persists to the horizon.