Logical tickets for persistent compressed indices #
Physical index owners are drawn from the reusable generic bank. A second, ghost-only ticket
ledger gives every live physical owner a distinct element of Fin (6 * |input|). Keeping the
association in a function, rather than in ScheduleIndex, lets the scheduler change physical
owners without changing the finite machine alphabet or the block-layout API.
The important distinction is that the ticket ledger is inductive: allocation extends the association at one fresh physical owner and demands a genuinely fresh logical ticket. Thus the cardinality bound below cannot be manufactured merely by assuming a scalar inequality.
The logical ticket carrier. Primary productive tickets occupy the first 2|input|-1
values, shadow tickets the next 2|input|-1, the next two values are emergency scratch and
transient tickets, and the upper 2|input| values form an outside-window parking bank.
The parking bank is as large as the complete physical owner pool. Consequently a live core
ticket and the global 6|input| index bound certify that some parking ticket is absent, even
while parking tickets belonging to nested protected calls remain live.
Equations
- IndexedGrammar.Aho.IndexTicket input = Fin (6 * input.length)
Instances For
The one-step emergency logical scratch ticket.
Instances For
The distinguished last logical transient ticket.
Instances For
One logical parking ticket. Parking tickets lie above both productive semantic banks.
Instances For
The complete finite parking bank.
Equations
- IndexedGrammar.Aho.IndexTicket.parkingRange input = List.ofFn fun (slot : Fin (2 * input.length)) => IndexedGrammar.Aho.IndexTicket.parking slot
Instances For
A ticket is nonparking when it is distinct from every member of the upper parking bank.
Equations
- ticket.Nonparking = ∀ (slot : Fin (2 * input.length)), ticket ≠ IndexedGrammar.Aho.IndexTicket.parking slot
Instances For
Every core ticket lies strictly below, and hence outside, the parking bank.
The reserved scratch ticket is nonparking.
The distinguished transient ticket is nonparking.
Interpret a logical ticket in the semantic-owner carrier. All ticket values, including the complete parking bank, are retained by the embedding.
Equations
- ticket.semanticOwner = ⟨↑ticket, ⋯⟩
Instances For
The semantic interpretation of logical tickets is injective.
Turn a semantic productive owner into its corresponding logical ticket.
Equations
- IndexedGrammar.Aho.IndexTicket.ofProductiveOwner owner hprimary = ⟨↑owner, ⋯⟩
Instances For
Any semantic primary-or-shadow owner below the two temporary slots is a logical ticket.
Equations
- IndexedGrammar.Aho.IndexTicket.ofSemanticOwner owner hbank = ⟨↑owner, ⋯⟩
Instances For
Every primary productive-owner ticket is nonparking.
Every primary-or-shadow semantic-owner ticket is nonparking.
The logical ticket of the child depth-one event exposed by a unary push.
Equations
- window.pushChildEventTicketOne hone = IndexedGrammar.Aho.IndexTicket.ofProductiveOwner (window.pushChild.eventOwner 1 hone) ⋯
Instances For
The child depth-one productive-event ticket lies below the parking bank.
The logical shadow ticket attached to one productive event.
Equations
- window.shadowEventTicket d hd = IndexedGrammar.Aho.IndexTicket.ofSemanticOwner (window.shadowEventOwner d hd) ⋯
Instances For
Every shadow-event ticket lies below the parking bank.
The canonical parking slot of a productive window is its root-relative base.
Equations
- window.parkingSlot = ⟨window.base, ⋯⟩
Instances For
The canonical logical parking ticket associated with a productive window.
Equations
- window.parkingTicket = IndexedGrammar.Aho.IndexTicket.parking window.parkingSlot
Instances For
Logical tickets currently present on the work tape, read through an owner-to-ticket association.
Equations
- cursor.indexTickets ticketOf = List.map ticketOf cursor.indexOwners
Instances For
Ghost-only semantic projection #
Replace only the owner annotation of a compressed index. This local copy deliberately
does not import the later physical-owner relabelling module, so ticket resources remain usable
by Scheduler.Resources.RunResources without an import cycle.
Equations
Instances For
Relabel index and matching frame annotations for the semantic ticket view.
Equations
- IndexedGrammar.Aho.ScheduleAtom.relabelTicketOwner f (IndexedGrammar.Aho.ScheduleAtom.index idx) = IndexedGrammar.Aho.ScheduleAtom.index (idx.withTicketOwner (f idx.owner))
- IndexedGrammar.Aho.ScheduleAtom.relabelTicketOwner f (IndexedGrammar.Aho.ScheduleAtom.close owner) = IndexedGrammar.Aho.ScheduleAtom.close (f owner)
- IndexedGrammar.Aho.ScheduleAtom.relabelTicketOwner f x✝ = x✝
Instances For
A virtual cursor whose owner annotations are the semantic images of logical tickets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
An injective logical-ticket assignment for all persistent physical owners in a cursor.
- ticketOf : Fin (10 * input.length) → IndexTicket input
- tickets_nodup : (cursor.indexTickets self.ticketOf).Nodup
- scratch_fresh (hinput : 0 < input.length) : IndexTicket.scratch hinput ∉ cursor.indexTickets self.ticketOf
Instances For
Apply one logical-ticket transposition to every persistent index. This is a ghost-only operation: injectivity is preserved by the permutation, and the explicit side conditions say that the reserved scratch ticket is fixed.
Equations
- ledger.swapTickets left right hleft hright = { ticketOf := fun (owner : Fin (10 * input.length)) => (Equiv.swap left right) (ledger.ticketOf owner), tickets_nodup := ⋯, scratch_fresh := ⋯ }
Instances For
Every live parking ticket has a slot strictly below the active productive-window base.
Equations
- ledger.ParkingBelow window = ∀ (slot : Fin (2 * input.length)), IndexedGrammar.Aho.IndexTicket.parking slot ∈ cursor.indexTickets ledger.ticketOf → ↑slot < window.base
Instances For
Every live parking ticket has a slot at or below the active productive-window base.
Equations
- ledger.ParkingAtOrBelow window = ∀ (slot : Fin (2 * input.length)), IndexedGrammar.Aho.IndexTicket.parking slot ∈ cursor.indexTickets ledger.ticketOf → ↑slot ≤ window.base
Instances For
A strict parking bound also supplies the corresponding non-strict bound.
The canonical window-base parking ticket is fresh under a strict parking bound.
Increasing the productive-window base preserves a strict parking bound.
Increasing the productive-window base preserves a non-strict parking bound.
A strict increase of the productive-window base turns AtOrBelow back into Below.
The unique useful ticket state for an owner-free cursor. The association away from live owners is deliberately arbitrary; choosing the transient ticket makes the root construction uniform.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The owner-free ledger satisfies every strict window-relative parking bound.
Live physical owners inherit injectivity from the duplicate-free ticket image.
Interpret one physical owner through the ledger's logical ticket.
Equations
- ledger.semanticOwnerOf owner = (ledger.ticketOf owner).semanticOwner
Instances For
The virtual cursor on which the existing productive-owner ledger can be reused unchanged. Both compressed indices and their matching frame closes are projected.
Equations
- ledger.semanticCursor = cursor.relabelTicketOwners ledger.semanticOwnerOf
Instances For
Membership in the virtual semantic cursor is exactly membership of the corresponding logical ticket in the physical cursor.
Negative form used directly after an existing productive-owner freshness theorem.
Map an aligned physical-owner list into its productive-owner ticket view.
Equations
- ledger.semanticOwners owners = List.map ledger.semanticOwnerOf owners
Instances For
Reuse the existing event-owned block layout on the semantic ticket projection.
Equations
- IndexedGrammar.Aho.IndexTicketLedger.EventTicketLayout parse window ledger blocks owners = IndexedGrammar.Aho.EventOwnedLayout parse window blocks (ledger.semanticOwners owners)
Instances For
Reuse the existing shadow-start layout on the semantic ticket projection.
Equations
- IndexedGrammar.Aho.IndexTicketLedger.ShadowTicketLayout parse window ledger blocks owners = IndexedGrammar.Aho.ShadowStartLayout parse window blocks (ledger.semanticOwners owners)
Instances For
Reuse the complete cursor-level productive-owner ledger on the semantic ticket cursor.
Equations
- IndexedGrammar.Aho.IndexTicketLedger.SemanticScheduleOwnerLedger parse window ledger = IndexedGrammar.Aho.ScheduleOwnerLedger parse window ledger.semanticCursor
Instances For
Reuse the complete cursor-level shadow ledger on the semantic ticket cursor.
Equations
- IndexedGrammar.Aho.IndexTicketLedger.SemanticShadowOwnerLedger parse window ledger = IndexedGrammar.Aho.ShadowOwnerLedger parse window ledger.semanticCursor
Instances For
The owner-to-ticket association used after allocating one physical owner.
Equations
Instances For
Allocate a fresh physical owner and attach a fresh logical ticket to it.
Equations
- ledger.allocate owner ticket hownerFresh hticketFresh hticketNotScratch hindices = { ticketOf := ledger.insertTicket owner ticket, tickets_nodup := ⋯, scratch_fresh := ⋯ }
Instances For
If a ticket absent from the old cursor appears after one fresh-owner allocation, it must be the ticket assigned to the new owner.
Allocating a different ticket preserves freshness of every ticket absent from the old cursor.
Transport tickets across a cursor change which preserves physical owners up to permutation.
Equations
Instances For
Releasing one physical owner preserves injectivity on the remaining owners.
Equations
Instances For
Reticket one live physical owner by swapping its old logical ticket with a fresh target. Because live tickets are duplicate-free and the target is absent, only that owner changes on the projected cursor; applying the same map to frame closes keeps owner matching coherent.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Reticketing one live owner leaves every other live owner association unchanged.
After reticketing to a fresh target, the old ticket is absent from the live cursor.
Preservation of window-relative parking bounds #
Swapping two nonparking tickets preserves a strict parking bound.
Swapping two nonparking tickets preserves a non-strict parking bound.
Transport across a physical-owner permutation preserves strict parking bounds.
Transport across a physical-owner permutation preserves non-strict parking bounds.
Transport followed by a weak base increase preserves a strict parking bound.
Transport followed by a weak base increase preserves a non-strict parking bound.
A strict base increase after transport restores a strict bound from AtOrBelow.
Releasing one physical owner preserves strict parking bounds.
Releasing one physical owner preserves non-strict parking bounds.
Allocating a nonparking ticket preserves a strict parking bound.
Allocating a nonparking ticket preserves a non-strict parking bound.
Allocating a core ticket preserves a strict parking bound.
Allocating a core ticket preserves a non-strict parking bound.
Reticketing one owner to a fresh nonparking target preserves a strict parking bound.
Reticketing one owner to a fresh nonparking target preserves a non-strict bound.
Reticketing one owner to a fresh core target preserves a strict parking bound.
Reticketing one owner to a fresh core target preserves a non-strict parking bound.
Parking one owner at the canonical window-base ticket weakens Below only to
AtOrBelow.
Logical ticket injectivity bounds physical persistent indices by the complete
6|input| logical carrier.
The permanently reserved scratch ticket leaves strict room in the complete logical carrier. This is deliberately not a bound for the smaller physical owner pool.
An explicit strict physical-capacity bound implies that the physical owner pool is nonempty. Logical-ticket cardinality alone does not imply this after adding parking tickets.
Semantic-owner images of live tickets are also duplicate-free.