Encoding the moment-coordinate catalogue
Lax263307.NativeCatalog · concepts/Lax263307/NativeCatalog.lean · lax-263307
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
The moment-coordinate catalogue lists subsets of the vertex set in the order used by the relaxation. Each subset is represented by its binary membership mask; is the resulting list of masks.
Concept map
Lean source view on GitHub
| 1 | import Lax263307.CoordinateCatalog |
| 2 | import Lax808846.Ram |
| 3 | import Mathlib.Combinatorics.Colex |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Encoding the moment-coordinate catalogue |
| 8 | type: definition |
| 9 | --- |
| 10 | The moment-coordinate catalogue lists subsets of the vertex set in the |
| 11 | order used by the relaxation. Each subset is represented by its binary |
| 12 | membership mask; `words` is the resulting list of masks. |
| 13 | |
| 14 | # Formalization notes |
| 15 | |
| 16 | Masks encode subsets of `Fin n`. The catalogue contains only the subsets |
| 17 | needed by the relaxation, rather than an array indexed by all masks. |
| 18 | -/ |
| 19 | |
| 20 | namespace Lax263307.NativeCatalog |
| 21 | |
| 22 | open CoordinateCatalog (catalog) |
| 23 | def subsetMask {n : ℕ} (I : Finset (Fin n)) : ℕ := |
| 24 | Finset.equivBitIndices.symm (I.image Fin.val) |
| 25 | |
| 26 | def words (n r : ℕ) : List ℕ := |
| 27 | (catalog n r).map (fun A => subsetMask A.val) |
| 28 | |
| 29 | end Lax263307.NativeCatalog |
| 30 |
Formalization notes
Masks encode subsets of . The catalogue contains only the subsets needed by the relaxation, rather than an array indexed by all masks.
Used by
none
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments