Documentation

CsdLean4.RecordLayer.DrivenTwoTime

RecordLayer/DrivenTwoTime: measure, DRIVE, measure — the two-time law with a flow between the readouts #

Category: 7-SigmaLayer (the record layer — Q25's two-stage arena with a sector flow inserted between the two measurements, and the first measurement in an arbitrary orthonormal basis; the record-layer engine TH5d consumes, specs/BACKLOG.md ▶ OPEN QUEUE #4).

What was missing #

RecordLayer/TwoTimeLuders.lean composes two measurements on one arena, but nothing happens to the system BETWEEN them: the second apparatus reads the relocated state [eᵢ] as it was left. Every "measure, evolve, measure" statement — a two-point-measurement protocol, a Ramsey sequence, an echo — needs a flow in the gap. This module inserts one, and lets the first measurement read an arbitrary orthonormal basis (the two-stage arena's first context was the computational basis), with a MIXED preparation.

The construction #

driveStage Φ moves the system coordinate by Φ : Xsel → Xsel and touches nothing else; drivenTwoStage idx₁ Φ idx₂ = stageTwo idx₂ ∘ driveStage Φ ∘ stageOne idx₁. The first register and bank ride through the drive (driveStage_register₁, driveStage_bank₁), so the t₁ record still persists structurally.

★ The reindexing identity (drivenJointRecordSector_eq): the joint record sector of the driven propagator is the joint record sector of the UNDRIVEN propagator at the reindexed second context idx₂ ∘ Φ. The second register's reading depends on the system only through idx₂, and the system it sees is Φ of the relocated one (swapEvolve_register_comp). So the drive is, at the level of records, a change of the second context — and Q25's generic engine two_stage_joint applies verbatim.

Main results #

⚠️ Honest scope #

References #

specs/BACKLOG.md (▶ OPEN QUEUE #4 = TH5d, the consumer; Q25); specs/two-time-luders-scoping.md; RecordLayer/TwoTimeLuders.lean (stageOne, stageTwo, regroup, two_stage_joint, two_stage_first_record); RecordLayer/SwapWitness.lean (swapEvolve_fwd, swapG_register); RecordLayer/RotatedSwap.lean (basisPoint, sector_born_ctx, prep_outcome_pos_ctx); RecordLayer/RotatedContext.lean (basisContext, basisContext_rate_mk); RecordLayer/MixedLuders.lean (mixedReadyPrep, mixed_outcome_pos); RecordLayer/MixedSwap.lean (eigRay, spectral_born_eq_traceForm); LF4/KahlerInstance.lean (instSMulKSigma); specs/future-work.md.

The drive between the two measurements #

def CSD.RecordLayer.driveStage {Xsel : Type u_1} {K : ℕ} (Φ : Xsel → Xsel) (x : TwoStageArena Xsel K) :

The drive: move the system coordinate by Φ; both registers and both banks ride.

Equations
Instances For
    theorem CSD.RecordLayer.driveStage_register₁ {Xsel : Type u_1} {K : ℕ} (Φ : Xsel → Xsel) (x : TwoStageArena Xsel K) :
    (driveStage Φ x).1.1.2 = x.1.1.2
    theorem CSD.RecordLayer.driveStage_bank₁ {Xsel : Type u_1} {K : ℕ} (Φ : Xsel → Xsel) (x : TwoStageArena Xsel K) :
    (driveStage Φ x).1.2 = x.1.2
    theorem CSD.RecordLayer.measurable_driveStage {Xsel : Type u_1} [MeasurableSpace Xsel] {K : ℕ} {Φ : Xsel → Xsel} (hΦ : Measurable Φ) :
    noncomputable def CSD.RecordLayer.drivenTwoStage {Xsel : Type u_1} {K : ℕ} (idx₁ : Xsel → Fin K) (Φ : Xsel → Xsel) (idx₂ : Xsel → Fin K) :
    TwoStageArena Xsel K → TwoStageArena Xsel K

    The driven two-time propagator: stage 1, the drive, stage 2.

    Equations
    Instances For
      theorem CSD.RecordLayer.measurable_drivenTwoStage {Xsel : Type u_1} [MeasurableSpace Xsel] {K : ℕ} (idx₁ : Xsel → Fin K) {Φ : Xsel → Xsel} (idx₂ : Xsel → Fin K) (h₁ : Measurable idx₁) (hΦ : Measurable Φ) (h₂ : Measurable idx₂) :
      Measurable (drivenTwoStage idx₁ Φ idx₂)
      def CSD.RecordLayer.drivenJointRecordSector {Xsel : Type u_1} {K : ℕ} (idx₁ : Xsel → Fin K) (Φ : Xsel → Xsel) (idx₂ : Xsel → Fin K) (i j : Fin K) :

      The driven joint record sector: the initial states destined to display record i at t₁ and, after the drive, record j at t₂.

      Equations
      Instances For

        ★ The drive is a reindexing of the second context #

        theorem CSD.RecordLayer.swapEvolve_register_comp {Xsel : Type u_1} {K : ℕ} (idx : Xsel → Fin K) (Φ : Xsel → Xsel) (x : SwapArena Xsel K) :
        (swapEvolve idx 0 1 ((Φ x.1.1, x.1.2), x.2)).1.2 = (swapEvolve (idx ∘ Φ) 0 1 x).1.2

        The register after the crossing depends on the system only through the index: driving the system by Φ before a swap protocol at idx reads as the swap protocol at idx ∘ Φ.

        theorem CSD.RecordLayer.stageTwo_driveStage_register₂ {Xsel : Type u_1} {K : ℕ} (idx₂ : Xsel → Fin K) (Φ : Xsel → Xsel) (y : TwoStageArena Xsel K) :
        (stageTwo idx₂ (driveStage Φ y)).2.1 = (stageTwo (idx₂ ∘ Φ) y).2.1

        The second register after the driven stage 2 is the second register after the undriven stage 2 at the reindexed context.

        theorem CSD.RecordLayer.drivenJointRecordSector_eq {Xsel : Type u_1} {K : ℕ} (idx₁ idx₂ : Xsel → Fin K) (Φ : Xsel → Xsel) (i j : Fin K) :
        drivenJointRecordSector idx₁ Φ idx₂ i j = jointRecordSector idx₁ (idx₂ ∘ Φ) i j

        ★ The drive is a reindexing of the second context, at the level of record sectors: the driven joint sector at (idx₁, Φ, idx₂) IS the undriven joint sector at (idx₁, idx₂ ∘ Φ). The first record never sees the drive; the second register's reading depends on the system only through the index, and the system it reads is Φ of the relocated one.

        theorem CSD.RecordLayer.drivenTwoStage_preimage_recordOne {Xsel : Type u_1} {K : ℕ} (idx₁ idx₂ : Xsel → Fin K) (Φ : Xsel → Xsel) (i : Fin K) :
        drivenTwoStage idx₁ Φ idx₂ ⁻¹' recordOneEvent i = twoStage idx₁ (idx₂ ∘ Φ) ⁻¹' recordOneEvent i

        The drive does not move the first-record event.

        theorem CSD.RecordLayer.driven_two_stage_joint {Xsel : Type u_1} [MeasurableSpace Xsel] {K : ℕ} (idx₁ idx₂ : Xsel → Fin K) {Φ : Xsel → Xsel} (h₁ : Measurable idx₁) (hΦ : Measurable Φ) (h₂ : Measurable idx₂) (μ12 : MeasureTheory.Measure (Xsel × LF4.KTorus)) [MeasureTheory.IsProbabilityMeasure μ12] (ν₁ : Fin K → MeasureTheory.Measure Xsel) [∀ (j : Fin K), MeasureTheory.IsProbabilityMeasure (ν₁ j)] (μR₂ : MeasureTheory.Measure LF4.KTorus) [MeasureTheory.IsProbabilityMeasure μR₂] (ν₂ : Fin K → MeasureTheory.Measure Xsel) [∀ (j : Fin K), MeasureTheory.IsProbabilityMeasure (ν₂ j)] (i j : Fin K) (hpos : μ12 ((shearProtocol idx₁ h₁).outcomeSector i) ≠ 0) :
        (twoStagePrep μ12 ν₁ μR₂ ν₂) (drivenJointRecordSector idx₁ Φ idx₂ i j) = (μ12.prod (MeasureTheory.Measure.pi ν₁)) ((swapProtocol idx₁ h₁).outcomeSector i) * (((ν₁ i).prod μR₂).prod (MeasureTheory.Measure.pi ν₂)) ((swapProtocol (idx₂ ∘ Φ) ⋯).outcomeSector j)

        ★★ The generic driven two-stage composition: the joint two-record probability with a drive Φ between the readouts factors as (stage-1 sector measure) × (stage-2 sector measure at the relocated state, for the reindexed context idx₂ ∘ Φ). two_stage_joint through the reindexing identity.

        The sector flow of a base map, and the pulled-back context #

        A base map lifted to the sector: the ontic base point moves, the pointer fibre rides.

        Equations
        Instances For
          @[simp]
          theorem CSD.RecordLayer.baseLift_apply {N : ℕ} (Φ' : LF4.CPN N → LF4.CPN N) (x : LF4.KSigma N) :
          baseLift Φ' x = (Φ' x.1, x.2)
          theorem CSD.RecordLayer.baseLift_unitary_smul {N : ℕ} (U : ↥(Matrix.unitaryGroup (Fin N) ℂ)) :
          (baseLift fun (p : LF4.CPN N) => U • p) = fun (x : LF4.KSigma N) => U • x

          For a unitary, the lifted base action IS the corpus's U(N) action on Σ (LF4/KahlerInstance.lean, instSMulKSigma).

          noncomputable def CSD.RecordLayer.ContextField.pullback {N : ℕ} (c : ContextField N) (Φ' : LF4.CPN N → LF4.CPN N) (hΦ' : Measurable Φ') :

          The pulled-back context: the apparatus c read AFTER the base flow Φ' — its rate at p is c's rate at Φ' p.

          Equations
          Instances For
            @[simp]
            theorem CSD.RecordLayer.ContextField.pullback_rate {N : ℕ} (c : ContextField N) (Φ' : LF4.CPN N → LF4.CPN N) (hΦ' : Measurable Φ') (p : LF4.CPN N) (i : Fin N) :
            (c.pullback Φ' hΦ').rate p i = c.rate (Φ' p) i
            theorem CSD.RecordLayer.globalBasin_pullback {N : ℕ} (c : ContextField N) (Φ' : LF4.CPN N → LF4.CPN N) (hΦ' : Measurable Φ') (i : Fin N) :

            The basins of the pulled-back context are the pulled-back basins.

            theorem CSD.RecordLayer.basinIndex_pullback {N : ℕ} [NeZero N] (c : ContextField N) (Φ' : LF4.CPN N → LF4.CPN N) (hΦ' : Measurable Φ') :

            ★ The pulled-back selector is the selector after the flow: reading the basin index of c after moving the base by Φ' is reading the basin index of c.pullback Φ'.

            The mixed preparation under an arbitrary context and bank #

            The mixed preparation's sector weight, for any context and any bank: the eigenvalue mixture of the context's rates at the spectral eigenrays.

            theorem CSD.RecordLayer.mixed_outcome_pos_ctx {N : ℕ} [NeZero N] (ρ : LF2.DensityOperator N) (c : ContextField N) (i : Fin N) (hpos : ∑ j : Fin N, ⋯.eigenvalues j * c.rate (eigRay ρ j) i ≠ 0) :

            Positivity licenses the conditioning, for any context: a nonzero mixed rate gives the outcome sector nonzero mixed measure. mixed_outcome_pos at a general context field.

            ★ The spectral bridge in an arbitrary orthonormal basis: the eigenvalue mixture of the basis-b rates at the eigenrays is the density-operator Born probability Tr(ρ ∣bᵢ⟩⟨bᵢ∣). spectral_born_eq_traceForm with the standard basis replaced by b.

            ★★ The two-time law with a drive, for a mixed preparation in a rotated basis #

            The two-stage preparation of a mixed system whose first readout is in the orthonormal basis b: mixedReadyPrep ρ with the bank calibrated to the rotated vertices [bₖ] (rotatedBank b), and a fresh ready register with the vertex-calibrated bank for the second apparatus.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              ★★ Measure, drive, measure — the two-time law with a flow between the readouts. For a density operator ρ, a first readout in the orthonormal basis b, a measurable base map Φ' applied between the readouts, and an ARBITRARY second context c₂:

              P(record i at t₁ ∧ record j at t₂) = Tr(ρ ∣bᵢ⟩⟨bᵢ∣) · c₂.rate (Φ' [bᵢ]) j.

              This conditional helper uses a nonzero first-outcome weight to invoke the conditioned law. The first factor is the Born weight in basis b; the second is the supplied context rate at Φ' [bᵢ]. For a basis context the latter is a Born weight. The final theorem driven_mixed_two_time_born also covers zero first-outcome weight.

              No retro-action: neither the drive nor the second apparatus disturbs the first record's mixed Born law in the basis b.

              The driven joint law for every first outcome, including zero-probability outcomes. The first bank is calibrated to the basis rays and both apparatus are independently prepared. The second factor is the supplied context rate; for a basis context it is a Born weight.