While this submission is a draft, it cannot be used by other submissions.

Blockers, probes, and precedence

Lax833301.Schedules · concepts/Lax833301/Schedules.lean · lax-833301

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    A template has 7 types of blockers and probes. Each blocker is active between its opening and its closing. A probe succeeds when every blocker of its type is inactive. For discrete time we count a blocker from its opening up to, but excluding, its closing. Orders are strict on arcs. Unrelated events at a common time can be serialized with endpoints before probes, which preserves every probe's test.

    Concept map
    1 concept
    100%
    DefinitionThis conceptDescendants are omitted for concepts with more than 10 descendants.

    In the paper

    • page 2 of this submission's paper

    Lean source view on GitHub

    1import Mathlib.Data.Fintype.BigOperators
    2import Mathlib.Data.Fintype.Sum
    3import Mathlib.Data.Finset.Card
    4
    5/-!
    6---
    7title: Blockers, probes, and precedence
    8type: definition
    9---
    10A template has 7 types of blockers and probes. Each blocker is active between
    11its opening and its closing. A probe succeeds when every blocker of its type
    12is inactive. For discrete time we count a blocker from its opening up to,
    13but excluding, its closing. Orders are strict on arcs. Unrelated events at a
    14common time can be serialized with endpoints before probes, which preserves
    15every probe's test.
    16-/
    17
    18namespace Lax833301.Schedules
    19
    20abbrev Kind := Fin 7
    21
    22structure Template where
    23 Fixed : Type
    24 Probe : Type
    25 Blocker : Type
    26 [fixedFinite : Fintype Fixed]
    27 [probeFinite : Fintype Probe]
    28 [blockerFinite : Fintype Blocker]
    29 entry : Fixed
    30 exit : Fixed
    31 collector : Fixed
    32 opening : Blocker → Fixed
    33 closing : Blocker → Fixed
    34 color : Blocker → Kind
    35 test : Probe → Kind
    36 arc : Fixed ⊕ Probe → Fixed ⊕ Probe → Prop
    37
    38attribute [instance] Template.fixedFinite Template.probeFinite Template.blockerFinite
    39
    40abbrev Template.Event (T : Template) := T.Fixed ⊕ T.Probe
    41
    42def Template.Respects (T : Template) (time : T.Event → ℕ) : Prop :=
    43 ∀ u v, T.arc u v → time u < time v
    44
    45def Template.Active (T : Template) (f : T.Fixed → ℕ) (i : T.Blocker) (z : ℕ) : Prop :=
    46 f (T.opening i) ≤ z ∧ z < f (T.closing i)
    47
    48noncomputable def Template.count (T : Template) (f : T.Fixed → ℕ) (z : ℕ)
    49 (keep : T.Blocker → Prop) : ℕ := by
    50 classical
    51 exact (Finset.univ.filter (fun i => T.Active f i z ∧ keep i)).card
    52
    53def Template.Succeeds (T : Template) (time : T.Event → ℕ) : Prop :=
    54 ∀ p i, T.color i = T.test p → ¬ T.Active (time ∘ Sum.inl) i (time (.inr p))
    55
    56noncomputable def Template.frontier (T : Template) (time : T.Event → ℕ) (z : ℕ) : ℕ := by
    57 classical
    58 exact (Finset.univ.filter (fun u => time u ≤ z ∧
    59 ∃ v, z < time v ∧ v ≠ Sum.inl T.collector ∧ T.arc u v)).card
    60
    61structure Template.Good (T : Template) (B : ℕ) (time : T.Event → ℕ) : Prop where
    62 respects : T.Respects time
    63 injective : Function.Injective time
    64 spanned : ∀ e, time (.inl T.entry) ≤ time e ∧ time e ≤ time (.inl T.exit)
    65 succeeds : T.Succeeds time
    66 load : ∀ z, T.count (time ∘ Sum.inl) z (fun _ => True) ≤ 11
    67 boundary : ∀ z, T.frontier time z ≤ B
    68
    69end Lax833301.Schedules
    70

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…