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

Precedence constraints and time lags

Lax434175.Precedence · concepts/Lax434175/Precedence.lean · lax-434175

proven

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

    Theorem

    With precedence constraints an instance carries a relation on the jobs, given by its arcs, and a time lag lijl_{ij} for every pair of jobs. Whenever ii precedes jj, job jj may not start before the completion of job ii plus the lag: Ci+lij≤SjC_i + l_{ij} \le S_j. A lag may be negative.

    A value of the field consists of a class of relations and a kind of lags.

    The classes are, with ≺\prec the transitive closure of the arcs:

    • none: no relation, read as the empty relation;
    • chains: every job has at most one successor and at most one predecessor;
    • intree: every job has at most one successor;
    • outtree: every job has at most one predecessor;
    • tree: the relation is an intree or an outtree;
    • opposing forest: the jobs split into two parts without arcs between them, one an intree and the other an outtree;
    • series-parallel: ≺\prec contains no four jobs a,b,c,da, b, c, d whose only relations are a≺ca \prec c, b≺cb \prec c, b≺db \prec d;
    • divide-and-conquer graph: a single job is one; and for two further jobs ss and tt and at least one divide-and-conquer graph on disjoint sets of jobs, so is their union with ss, tt and all arcs from ss to the jobs of the graphs and from these to tt;
    • interval order: a≺ba \prec b and c≺dc \prec d imply a≺da \prec d or c≺bc \prec b;
    • over-interval order: no five different jobs 1,…,51, \dots, 5 are related exactly by 1≺21 \prec 2, 3≺43 \prec 4, 3≺53 \prec 5, and none exactly by the reverse relations 2≺12 \prec 1, 4≺34 \prec 3, 5≺35 \prec 3 (the structures of type I and II of Chardon and Moukrim, 2005);
    • quasi-interval order: an over-interval order in which, moreover, no five different jobs are related exactly by 1≺21 \prec 2, 1≺41 \prec 4, 3≺5≺43 \prec 5 \prec 4 and hence 3≺43 \prec 4 (Moukrim 1999, Definition 2: the structures of type I, in either orientation, and of type II);
    • AmA_m-order, for the number mm of machines of the instance: for any two sets AA and BB of at most mm pairwise unrelated jobs, at most mm jobs of A∪BA \cup B have a predecessor in A∪BA \cup B, and at most mm have a successor in A∪BA \cup B (the property QmQ_m of Moukrim and Quilliot, 1997);
    • level order: every job of level l+1l + 1 precedes every job of level ll, where the level of a job is the length of the longest path of arcs starting from it;
    • bounded height: an arbitrary relation; the value records that the length of its longest path is regarded as a constant;
    • dimension two: the jobs can be placed in the plane such that, for different jobs, i≺ji \prec j exactly if both coordinates of ii are at most those of jj;
    • bounded dimension: the same in a space of some dimension;
    • prec: an arbitrary relation.

    The class none is a special case of every class except divide-and-conquer graphs, which have a single first and a single last job; interval orders of quasi-interval orders, of over-interval orders and of AmA_m-orders; quasi-interval orders of over-interval orders; chains of intree and outtree; these of tree; tree of opposing forest; dimension two of bounded dimension; chains, the trees and opposing forests of series-parallel orders, since every job of an intree has its successors on a chain and every job of an outtree its predecessors; series-parallel orders of dimension two and of bounded dimension, by the classical theorem that an order without such four jobs has dimension at most two; and every class of prec.

    The kinds of lags are: zero; unit, lij=1l_{ij} = 1; constant, lij=ll_{ij} = l, also restricted to l≤0l \le 0 or to l>0l > 0; and arbitrary, also restricted to lij≤0l_{ij} \le 0 or to lij>0l_{ij} > 0. A kind is a special case of another if its lags are among the other's.

    On a single machine, as in batching, every order is an A1A_1-order, so the value says nothing there. The field of one machine leaves it out: the value AmA_m admits no instance and is a special case of no other value.

    Theorem. Over every kernel, the field of precedence constraints with time lags is sound, and so is the field of one machine.

    Concept map
    3 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on ADescendants are omitted for concepts with more than 10 descendants.
    Evidence

    This concept declares 2 statements. Each proof establishes one of them relative to its assumptions.

    1 oneMachine_sound proven

    Lean source view on GitHub

    1import Mathlib.Logic.Relation
    2import Mathlib.Data.Finset.Lattice.Basic
    3import Mathlib.Data.Fintype.Basic
    4import Mathlib.Data.Finset.Card
    5import Mathlib.Algebra.Order.Field.Rat
    6import Mathlib.Data.NNRat.Defs
    7import Lax434175.Modules
    8
    9/-!
    10---
    11title: Precedence constraints and time lags
    12type: theorem
    13---
    14With precedence constraints an instance carries a relation on the jobs,
    15given by its arcs, and a time lag lijl_{ij} for every pair of jobs. Whenever
    16ii precedes jj, job jj may not start before the completion of job ii
    17plus the lag: Ci+lij≤SjC_i + l_{ij} \le S_j. A lag may be negative.
    18
    19A value of the field consists of a class of relations and a kind of lags.
    20
    21The classes are, with ≺\prec the transitive closure of the arcs:
    22
    23- none: no relation, read as the empty relation;
    24- chains: every job has at most one successor and at most one predecessor;
    25- intree: every job has at most one successor;
    26- outtree: every job has at most one predecessor;
    27- tree: the relation is an intree or an outtree;
    28- opposing forest: the jobs split into two parts without arcs between them,
    29 one an intree and the other an outtree;
    30- series-parallel: ≺\prec contains no four jobs a,b,c,da, b, c, d whose only
    31 relations are a≺ca \prec c, b≺cb \prec c, b≺db \prec d;
    32- divide-and-conquer graph: a single job is one; and for two further jobs
    33 ss and tt and at least one divide-and-conquer graph on disjoint sets of
    34 jobs, so is their union with ss, tt and all arcs from ss to the jobs of
    35 the graphs and from these to tt;
    36- interval order: a≺ba \prec b and c≺dc \prec d imply a≺da \prec d or
    37 c≺bc \prec b;
    38- over-interval order: no five different jobs 1,…,51, \dots, 5 are related
    39 exactly by 1≺21 \prec 2, 3≺43 \prec 4, 3≺53 \prec 5, and none exactly by the
    40 reverse relations 2≺12 \prec 1, 4≺34 \prec 3, 5≺35 \prec 3 (the structures of type
    41 I and II of Chardon and Moukrim, 2005);
    42- quasi-interval order: an over-interval order in which, moreover, no five
    43 different jobs are related exactly by 1≺21 \prec 2, 1≺41 \prec 4,
    44 3≺5≺43 \prec 5 \prec 4 and hence 3≺43 \prec 4 (Moukrim 1999, Definition 2: the
    45 structures of type I, in either orientation, and of type II);
    46- AmA_m-order, for the number mm of machines of the instance: for any two
    47 sets AA and BB of at most mm pairwise unrelated jobs, at most mm jobs
    48 of A∪BA \cup B have a predecessor in A∪BA \cup B, and at most mm have a
    49 successor in A∪BA \cup B (the property QmQ_m of Moukrim and Quilliot, 1997);
    50- level order: every job of level l+1l + 1 precedes every job of level ll,
    51 where the level of a job is the length of the longest path of arcs
    52 starting from it;
    53- bounded height: an arbitrary relation; the value records that the length
    54 of its longest path is regarded as a constant;
    55- dimension two: the jobs can be placed in the plane such that, for
    56 different jobs, i≺ji \prec j exactly if both coordinates of ii are at most
    57 those of jj;
    58- bounded dimension: the same in a space of some dimension;
    59- prec: an arbitrary relation.
    60
    61The class none is a special case of every class except
    62divide-and-conquer graphs, which have a single first and a single last job; interval orders of quasi-interval orders,
    63of over-interval orders and of AmA_m-orders; quasi-interval orders of over-interval orders; chains of intree
    64and outtree; these of tree; tree of opposing forest; dimension two of
    65bounded dimension; chains, the trees and opposing forests of series-parallel
    66orders, since every job of an intree has its successors on a chain and every job
    67of an outtree its predecessors; series-parallel orders of dimension two and of bounded
    68dimension, by the classical theorem that an order without such four jobs has
    69dimension at most two; and every class of prec.
    70
    71The kinds of lags are: zero; unit, lij=1l_{ij} = 1; constant, lij=ll_{ij} = l, also
    72restricted to l≤0l \le 0 or to l>0l > 0; and arbitrary, also restricted to
    73lij≤0l_{ij} \le 0 or to lij>0l_{ij} > 0. A kind is a special case of another if
    74its lags are among the other's.
    75
    76On a single machine, as in batching, every order is an A1A_1-order, so the
    77value says nothing there. The field of one machine leaves it out: the value
    78AmA_m admits no instance and is a special case of no other value.
    79
    80**Theorem.** Over every kernel, the field of precedence constraints with
    81time lags is sound, and so is the field of one machine.
    82-/
    83
    84namespace Lax434175.Precedence
    85open Lax434175.Kernels Lax434175.Modules
    86
    87inductive Order
    88 | none
    89 | chains
    90 | intree
    91 | outtree
    92 | tree
    93 | opposingForest
    94 | seriesParallel
    95 | divideAndConquer
    96 | intervalOrder
    97 | quasiInterval
    98 | overInterval
    99 | aOrder
    100 | levelOrder
    101 | boundedHeight
    102 | dimensionTwo
    103 | boundedDimension
    104 | prec
    105 deriving DecidableEq
    106
    107/-- No data without precedence constraints; a relation on the jobs with them. -/
    108def Order.Data (n : ℕ) : Order → Type
    109 | .none => Unit
    110 | _ => Fin n → Fin n → Prop
    111
    112/-- The precedence relation; empty when the class is none. -/
    113def Order.view {n : ℕ} : (v : Order) → v.Data n → Fin n → Fin n → Prop
    114 | .none, _ => fun _ _ => False
    115 | .chains, r | .intree, r | .outtree, r | .tree, r | .opposingForest, r
    116 | .seriesParallel, r | .divideAndConquer, r | .intervalOrder, r | .levelOrder, r | .boundedHeight, r
    117 | .quasiInterval, r | .overInterval, r | .aOrder, r
    118 | .dimensionTwo, r
    119 | .boundedDimension, r | .prec, r => r
    120
    121/-- Every job has at most one successor. -/
    122def AtMostOneSuccessor {n : ℕ} (r : Fin n → Fin n → Prop) : Prop :=
    123 ∀ i j k, r i j → r i k → j = k
    124
    125/-- Every job has at most one predecessor. -/
    126def AtMostOnePredecessor {n : ℕ} (r : Fin n → Fin n → Prop) : Prop :=
    127 ∀ i j k, r j i → r k i → j = k
    128
    129/-- The jobs split into an intree part and an outtree part without arcs
    130between them. -/
    131def OpposingForest {n : ℕ} (r : Fin n → Fin n → Prop) : Prop :=
    132 ∃ inPart : Fin n → Prop, (∀ i j, r i j → (inPart i ↔ inPart j)) ∧
    133 (∀ i j k, inPart i → r i j → r i k → j = k) ∧
    134 (∀ i j k, ¬ inPart i → r j i → r k i → j = k)
    135
    136/-- No four jobs are related exactly by `a ≺ c`, `b ≺ c`, `b ≺ d`. -/
    137def SeriesParallel {n : ℕ} (r : Fin n → Fin n → Prop) : Prop :=
    138 ∀ a b c d, Relation.TransGen r a c → Relation.TransGen r b c → Relation.TransGen r b d →
    139 Relation.TransGen r a d ∨ Relation.TransGen r a b ∨ Relation.TransGen r b a ∨
    140 Relation.TransGen r c d ∨ Relation.TransGen r d c
    141
    142/-- The arcs among a set of jobs form a divide-and-conquer graph. -/
    143inductive DivideAndConquer {n : ℕ} (r : Fin n → Fin n → Prop) : Finset (Fin n) → Prop
    144 | single (v : Fin n) : ¬ r v v → DivideAndConquer r {v}
    145 | compose (s t : Fin n) (parts : List (Finset (Fin n))) :
    146 s ≠ t → parts ≠ [] → (∀ P ∈ parts, s ∉ P ∧ t ∉ P) → parts.Pairwise Disjoint →
    147 (∀ P ∈ parts, DivideAndConquer r P) →
    148 (∀ a b, (a = s ∨ a = t ∨ ∃ P ∈ parts, a ∈ P) → (b = s ∨ b = t ∨ ∃ P ∈ parts, b ∈ P) →
    149 (r a b ↔ (∃ P ∈ parts, a ∈ P ∧ b ∈ P ∧ r a b) ∨ (a = s ∧ ∃ P ∈ parts, b ∈ P) ∨
    150 (b = t ∧ ∃ P ∈ parts, a ∈ P))) →
    151 DivideAndConquer r (parts.foldr (· ∪ ·) {s, t})
    152
    153/-- `a ≺ b` and `c ≺ d` imply `a ≺ d` or `c ≺ b`. -/
    154def IntervalOrder {n : ℕ} (r : Fin n → Fin n → Prop) : Prop :=
    155 ∀ a b c d, Relation.TransGen r a b → Relation.TransGen r c d →
    156 Relation.TransGen r a d ∨ Relation.TransGen r c b
    157
    158/-- Five different jobs are related exactly by the pairs of a pattern. -/
    159def Contains {n : ℕ} (r : Fin n → Fin n → Prop) (pattern : List (Fin 5 × Fin 5)) : Prop :=
    160 ∃ f : Fin 5 → Fin n, Function.Injective f ∧
    161 ∀ a b, Relation.TransGen r (f a) (f b) ↔ (a, b) ∈ pattern
    162/-- Two unrelated pairs, the first job of one having a further successor. -/
    163def patternOut : List (Fin 5 × Fin 5) := [(0, 1), (2, 3), (2, 4)]
    164/-- The reverse of `patternOut`. -/
    165def patternIn : List (Fin 5 × Fin 5) := [(1, 0), (3, 2), (4, 2)]
    166/-- The third pattern forbidden in a quasi-interval order. -/
    167def patternThird : List (Fin 5 × Fin 5) := [(0, 1), (0, 3), (2, 3), (2, 4), (4, 3)]
    168/-- Neither `patternOut` nor its reverse occurs. -/
    169def OverInterval {n : ℕ} (r : Fin n → Fin n → Prop) : Prop :=
    170 ¬ Contains r patternOut ∧ ¬ Contains r patternIn
    171/-- An over-interval order in which `patternThird` does not occur. -/
    172def QuasiInterval {n : ℕ} (r : Fin n → Fin n → Prop) : Prop :=
    173 OverInterval r ∧ ¬ Contains r patternThird
    174/-- Moukrim and Quilliot's property `Q_m`: for two sets of at most `m` pairwise
    175unrelated jobs, at most `m` jobs of their union have a predecessor in the union,
    176and at most `m` have a successor in the union. -/
    177def AOrder {n : ℕ} (m : ℕ) (r : Fin n → Fin n → Prop) : Prop :=
    178 ∀ A B : Finset (Fin n), (∀ x ∈ A, ∀ y ∈ A, ¬ Relation.TransGen r x y) →
    179 (∀ x ∈ B, ∀ y ∈ B, ¬ Relation.TransGen r x y) → A.card ≤ m → B.card ≤ m →
    180 ∀ U ⊆ A ∪ B,
    181 ((∀ x ∈ U, ∃ y ∈ A ∪ B, Relation.TransGen r y x) → U.card ≤ m) ∧
    182 ((∀ x ∈ U, ∃ y ∈ A ∪ B, Relation.TransGen r x y) → U.card ≤ m)
    183/-- A path of `l` arcs starts from the job. -/
    184def HasPath {n : ℕ} (r : Fin n → Fin n → Prop) : ℕ → Fin n → Prop
    185 | 0, _ => True
    186 | l + 1, v => ∃ w, r v w ∧ HasPath r l w
    187
    188/-- The longest path of arcs starting from the job has `l` arcs. -/
    189def HasLevel {n : ℕ} (r : Fin n → Fin n → Prop) (v : Fin n) (l : ℕ) : Prop :=
    190 HasPath r l v ∧ ¬ HasPath r (l + 1) v
    191
    192/-- Every job of level `l + 1` precedes every job of level `l`. -/
    193def LevelOrder {n : ℕ} (r : Fin n → Fin n → Prop) : Prop :=
    194 ∀ u v l, HasLevel r u (l + 1) → HasLevel r v l → Relation.TransGen r u v
    195
    196/-- The jobs can be placed in `k`-dimensional space such that, for different
    197jobs, `i ≺ j` exactly if every coordinate of `i` is at most that of `j`. -/
    198def HasDimension {n : ℕ} (k : ℕ) (r : Fin n → Fin n → Prop) : Prop :=
    199 ∃ f : Fin n → Fin k → ℚ, ∀ i j, i ≠ j → (Relation.TransGen r i j ↔ ∀ c, f i c ≤ f j c)
    200
    201/-- The relations of a class, for a number `m` of machines. -/
    202def Order.InClass {n : ℕ} (m : ℕ) : Order → (Fin n → Fin n → Prop) → Prop
    203 | .none, r => ∀ i j, ¬ r i j
    204 | .chains, r => AtMostOneSuccessor r ∧ AtMostOnePredecessor r
    205 | .intree, r => AtMostOneSuccessor r
    206 | .outtree, r => AtMostOnePredecessor r
    207 | .tree, r => AtMostOneSuccessor r ∨ AtMostOnePredecessor r
    208 | .opposingForest, r => OpposingForest r
    209 | .seriesParallel, r => SeriesParallel r
    210 | .divideAndConquer, r => DivideAndConquer r Finset.univ
    211 | .intervalOrder, r => IntervalOrder r
    212 | .quasiInterval, r => QuasiInterval r
    213 | .overInterval, r => OverInterval r
    214 | .aOrder, r => AOrder m r
    215 | .levelOrder, r => LevelOrder r
    216 | .boundedHeight, _ => True
    217 | .dimensionTwo, r => HasDimension 2 r
    218 | .boundedDimension, r => ∃ k, HasDimension k r
    219 | .prec, _ => True
    220
    221def Order.le : Order → Order → Bool
    222 | _, .prec => true
    223 | .none, .divideAndConquer => false
    224 | .none, _ => true
    225 | .chains, .chains | .chains, .intree | .chains, .outtree | .chains, .tree
    226 | .chains, .opposingForest => true
    227 | .intree, .intree | .intree, .tree | .intree, .opposingForest => true
    228 | .outtree, .outtree | .outtree, .tree | .outtree, .opposingForest => true
    229 | .tree, .tree | .tree, .opposingForest => true
    230 | .chains, .seriesParallel | .intree, .seriesParallel | .outtree, .seriesParallel
    231 | .tree, .seriesParallel | .opposingForest, .seriesParallel => true
    232 | .chains, .dimensionTwo | .intree, .dimensionTwo | .outtree, .dimensionTwo
    233 | .tree, .dimensionTwo | .opposingForest, .dimensionTwo => true
    234 | .chains, .boundedDimension | .intree, .boundedDimension | .outtree, .boundedDimension
    235 | .tree, .boundedDimension | .opposingForest, .boundedDimension => true
    236 | .dimensionTwo, .boundedDimension => true
    237 | .intervalOrder, .quasiInterval | .intervalOrder, .overInterval | .intervalOrder, .aOrder
    238 | .quasiInterval, .overInterval => true
    239 | .seriesParallel, .dimensionTwo | .seriesParallel, .boundedDimension => true
    240 | v, w => decide (v = w)
    241
    242def Order.embed {n : ℕ} : {v w : Order} → Order.le v w = true → v.Data n → w.Data n
    243 | _, .none, _, _ => ()
    244 | v, .chains, _, d | v, .intree, _, d | v, .outtree, _, d | v, .tree, _, d
    245 | v, .opposingForest, _, d | v, .seriesParallel, _, d | v, .divideAndConquer, _, d
    246 | v, .intervalOrder, _, d | v, .quasiInterval, _, d | v, .overInterval, _, d | v, .aOrder, _, d
    247 | v, .levelOrder, _, d
    248 | v, .boundedHeight, _, d | v, .dimensionTwo, _, d | v, .boundedDimension, _, d
    249 | v, .prec, _, d => v.view d
    250
    251inductive Lags
    252 | zero
    253 | unit
    254 | constant
    255 | constantNonpositive
    256 | constantPositive
    257 | arbitrary
    258 | arbitraryNonpositive
    259 | arbitraryPositive
    260 deriving DecidableEq
    261
    262/-- The data of a kind of lags. -/
    263def Lags.Data (n : ℕ) : Lags → Type
    264 | .zero | .unit => Unit
    265 | .constant | .constantNonpositive | .constantPositive => ℤ
    266 | .arbitrary | .arbitraryNonpositive | .arbitraryPositive => Fin n → Fin n → ℤ
    267
    268/-- The lag between two jobs. -/
    269def Lags.view {n : ℕ} : (v : Lags) → v.Data n → Fin n → Fin n → ℤ
    270 | .zero, _ => fun _ _ => 0
    271 | .unit, _ => fun _ _ => 1
    272 | .constant, l | .constantNonpositive, l | .constantPositive, l => fun _ _ => l
    273 | .arbitrary, l | .arbitraryNonpositive, l | .arbitraryPositive, l => l
    274
    275/-- The sign condition of a kind of lags. -/
    276def Lags.Admits {n : ℕ} : Lags → (Fin n → Fin n → ℤ) → Prop
    277 | .constantNonpositive, l | .arbitraryNonpositive, l => ∀ i j, l i j ≤ 0
    278 | .constantPositive, l | .arbitraryPositive, l => ∀ i j, 0 < l i j
    279 | _, _ => True
    280
    281def Lags.le : Lags → Lags → Bool
    282 | .zero, .zero | .zero, .constant | .zero, .constantNonpositive | .zero, .arbitrary
    283 | .zero, .arbitraryNonpositive => true
    284 | .unit, .unit | .unit, .constant | .unit, .constantPositive | .unit, .arbitrary
    285 | .unit, .arbitraryPositive => true
    286 | .constant, .constant | .constant, .arbitrary => true
    287 | .constantNonpositive, .constantNonpositive | .constantNonpositive, .constant
    288 | .constantNonpositive, .arbitraryNonpositive | .constantNonpositive, .arbitrary => true
    289 | .constantPositive, .constantPositive | .constantPositive, .constant
    290 | .constantPositive, .arbitraryPositive | .constantPositive, .arbitrary => true
    291 | .arbitrary, .arbitrary => true
    292 | .arbitraryNonpositive, .arbitraryNonpositive | .arbitraryNonpositive, .arbitrary => true
    293 | .arbitraryPositive, .arbitraryPositive | .arbitraryPositive, .arbitrary => true
    294 | _, _ => false
    295
    296def Lags.embed {n : ℕ} : {v w : Lags} → Lags.le v w = true → v.Data n → w.Data n
    297 | _, .zero, _, _ | _, .unit, _, _ => ()
    298 | .constant, .constant, _, l | .constantNonpositive, .constant, _, l
    299 | .constantPositive, .constant, _, l
    300 | .constantNonpositive, .constantNonpositive, _, l
    301 | .constantPositive, .constantPositive, _, l => l
    302 | .zero, .constant, _, _ | .zero, .constantNonpositive, _, _ => (0 : ℤ)
    303 | .unit, .constant, _, _ | .unit, .constantPositive, _, _ => (1 : ℤ)
    304 | v, .arbitrary, _, d | v, .arbitraryNonpositive, _, d | v, .arbitraryPositive, _, d =>
    305 v.view d
    306 | .zero, .constantPositive, h, _ | .unit, .constantNonpositive, h, _
    307 | .constant, .constantNonpositive, h, _ | .constant, .constantPositive, h, _
    308 | .constantNonpositive, .constantPositive, h, _
    309 | .constantPositive, .constantNonpositive, h, _
    310 | .arbitrary, .constant, h, _ | .arbitrary, .constantNonpositive, h, _
    311 | .arbitrary, .constantPositive, h, _ | .arbitraryNonpositive, .constant, h, _
    312 | .arbitraryNonpositive, .constantNonpositive, h, _
    313 | .arbitraryNonpositive, .constantPositive, h, _ | .arbitraryPositive, .constant, h, _
    314 | .arbitraryPositive, .constantNonpositive, h, _
    315 | .arbitraryPositive, .constantPositive, h, _ => absurd h Bool.false_ne_true
    316
    317/-- A value of the field: a class of relations and a kind of lags. -/
    318structure Value where
    319 order : Order
    320 lags : Lags := .zero
    321
    322/-- No precedence constraints. -/
    323def Value.none : Value := ⟨.none, .zero⟩
    324
    325/-- The field of precedence constraints with time lags over a kernel with a
    326number of machines. -/
    327def module (K : Kernel) (machines : K.Inst → ℕ) : Module K where
    328 Value := Value
    329 Data v x := v.order.Data (K.jobs x) × v.lags.Data (K.jobs x)
    330 admits v x d := v.order.InClass (machines x) (v.order.view d.1) ∧ v.lags.Admits (v.lags.view d.2)
    331 constraint v x d σ := ∀ i j, v.order.view d.1 i j →
    332 (K.completion x σ i : ℚ) + (v.lags.view d.2 i j : ℚ) ≤ (K.start x σ j : ℚ)
    333 le v w := Order.le v.order w.order && Lags.le v.lags w.lags
    334 embed {v w} h _ d :=
    335 (Order.embed (v := v.order) (w := w.order) (Bool.and_eq_true_iff.mp h).1 d.1,
    336 Lags.embed (v := v.lags) (w := w.lags) (Bool.and_eq_true_iff.mp h).2 d.2)
    337
    338axiom sound (K : Kernel) (machines : K.Inst → ℕ) : (module K machines).Sound
    339
    340/-- The field of precedence constraints on one machine, without `A_m`-orders:
    341the value `A_m` admits no instance and lies below no other value. -/
    342def oneMachine (K : Kernel) : Module K where
    343 Value := Value
    344 Data := (module K fun _ => 1).Data
    345 admits v x d := v.order ≠ .aOrder ∧ (module K fun _ => 1).admits v x d
    346 constraint := (module K fun _ => 1).constraint
    347 le v w := (module K fun _ => 1).le v w && (w.order != .aOrder || v.order == .aOrder)
    348 embed {v w} h x d := (module K fun _ => 1).embed (v := v) (w := w)
    349 (Bool.and_eq_true_iff.mp h).1 x d
    350
    351axiom oneMachine_sound (K : Kernel) : (oneMachine K).Sound
    352
    353end Lax434175.Precedence
    354
    Show ProofShow Proof

    Discussion

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

    Loading discussion…