Reversing precedence constraints
Lax434175.PrecedenceReversal · concepts/Lax434175/PrecedenceReversal.lean · lax-434175
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Reversing a relation turns every arc into . Reversal maps intrees to outtrees and outtrees to intrees, and every other class of the precedence field except quasi-interval orders, divide-and-conquer graphs and level orders to itself; these three are called not reversible here. Reversing the data of a value of the precedence field reverses the relation and transposes arbitrary lags, ; other lags are kept.
Theorem. For a reversible class, the reverse of a relation of the class belongs to the reversed class; reversed lags satisfy the same sign condition.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax434175.Precedence |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Reversing precedence constraints |
| 6 | type: theorem |
| 7 | --- |
| 8 | Reversing a relation turns every arc into . Reversal maps |
| 9 | intrees to outtrees and outtrees to intrees, and every other class of the |
| 10 | precedence field except quasi-interval orders, divide-and-conquer graphs and |
| 11 | level orders to itself; these three are called not reversible here. |
| 12 | Reversing the data of a value of the precedence field reverses the relation |
| 13 | and transposes arbitrary lags, ; other lags are kept. |
| 14 | |
| 15 | **Theorem.** For a reversible class, the reverse of a relation of the class |
| 16 | belongs to the reversed class; reversed lags satisfy the same sign |
| 17 | condition. |
| 18 | -/ |
| 19 | |
| 20 | namespace Lax434175.PrecedenceReversal |
| 21 | open Lax434175.Precedence |
| 22 | |
| 23 | /-- The class of the reverses of the relations of a class. -/ |
| 24 | def reverse : Order → Order |
| 25 | | .intree => .outtree |
| 26 | | .outtree => .intree |
| 27 | | o => o |
| 28 | |
| 29 | /-- The classes whose reverses are shown to stay in a class. -/ |
| 30 | def reversible : Order → Bool |
| 31 | | .quasiInterval | .divideAndConquer | .levelOrder => false |
| 32 | | _ => true |
| 33 | |
| 34 | /-- The reversed relation of a value. -/ |
| 35 | def reverseData {n : ℕ} : (o : Order) → o.Data n → (reverse o).Data n |
| 36 | | .none, _ => () |
| 37 | | .chains, r | .intree, r | .outtree, r | .tree, r | .opposingForest, r |
| 38 | | .seriesParallel, r | .divideAndConquer, r | .intervalOrder, r | .quasiInterval, r |
| 39 | | .overInterval, r | .aOrder, r | .levelOrder, r | .boundedHeight, r | .dimensionTwo, r |
| 40 | | .boundedDimension, r | .prec, r => fun i j => r j i |
| 41 | |
| 42 | /-- The transposed lags of a value. -/ |
| 43 | def lagsReverseData {n : ℕ} : (l : Lags) → l.Data n → l.Data n |
| 44 | | .arbitrary, d | .arbitraryNonpositive, d | .arbitraryPositive, d => fun i j => d j i |
| 45 | | .zero, d | .unit, d | .constant, d | .constantNonpositive, d | .constantPositive, d => d |
| 46 | |
| 47 | axiom view_reverse {n : ℕ} (o : Order) (d : o.Data n) (i j : Fin n) : |
| 48 | (reverse o).view (reverseData o d) i j ↔ o.view d j i |
| 49 | |
| 50 | axiom lags_view_reverse {n : ℕ} (l : Lags) (d : l.Data n) (i j : Fin n) : |
| 51 | l.view (lagsReverseData l d) i j = l.view d j i |
| 52 | |
| 53 | axiom inClass_reverse {n : ℕ} (m : ℕ) (o : Order) (h : reversible o = true) |
| 54 | (r : Fin n → Fin n → Prop) : o.InClass m r → (reverse o).InClass m (fun i j => r j i) |
| 55 | |
| 56 | axiom lags_admits_reverse {n : ℕ} (l : Lags) (d : l.Data n) : |
| 57 | l.Admits (l.view d) → l.Admits (l.view (lagsReverseData l d)) |
| 58 | |
| 59 | end Lax434175.PrecedenceReversal |
| 60 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments