sign_vectors.functions¶
Functions for sets of sign vectors¶
Functions
|
Return all sign vectors or vectors that are zero on given components. |
|
Remove given components from an iterable of sign vectors |
|
Compute the lower closure of given sign vectors. |
|
Compute the orthogonal complement of given sign vectors. |
|
Plot the Hasse Diagram of sign vectors using the conformal relation. |
|
Compute the total closure of given sign vectors. |
|
Compute the upper closure of given sign vectors. |
- sign_vectors.functions.contraction(iterable: set[SignVector], indices: list[int]) set[SignVector]¶
Return all sign vectors or vectors that are zero on given components.
INPUT:
iterable– an iterable of sign vectors or vectorsindices– a list of indices.
OUTPUT:
If
keep_componentsis false, remove entries inindices. (default)If
keep_componentsis true, keep entries inindices.
EXAMPLES:
sage: from sign_vectors import * sage: W = [sign_vector("++0"), sign_vector("-00"), sign_vector("00+")] sage: W [(++0), (-00), (00+)]
We consider the contraction for different indices:
sage: contraction(W, [0]) {(0+)} sage: contraction(W, [1]) {(-0), (0+)} sage: contraction(W, [2]) {(-0), (++)}
The second sign vector has zeros at positions
1and2:sage: contraction(W, [1, 2]) {(-)}
- sign_vectors.functions.deletion(iterable: set[SignVector], indices: list[int]) set[SignVector]¶
Remove given components from an iterable of sign vectors
INPUT:
iterable– an iterable of sign vectorsindices– a list of indices
EXAMPLES:
sage: from sign_vectors import * sage: W = [sign_vector("++0"), sign_vector("00-"), sign_vector("+00")] sage: W [(++0), (00-), (+00)] sage: deletion(W, [0]) {(00), (+0), (0-)}
Duplicate sign vectors are removed if they would occur:
sage: deletion(W, [1]) {(+0), (0-)} sage: deletion(W, [1, 2]) {(0), (+)}
- sign_vectors.functions.lower_closure(iterable: set[SignVector]) set[SignVector]¶
Compute the lower closure of given sign vectors.
INPUT:
iterable– an iterable of sign vectors
OUTPUT: Return the lower closure of
iterableas a set of sign vectors.Note
The sign vector \(X\) is in the lower closure of a set of sign vectors \(W\) if there exists \(Y \in W\) with \(X \leq Y\).
EXAMPLES:
First, we consider a list consisting of only one sign vector:
sage: from sign_vectors import * sage: W = [sign_vector("+-0")] sage: W [(+-0)] sage: lower_closure(W) {(000), (+00), (0-0), (+-0)}
Now, we consider a list of three sign vectors:
sage: W = [sign_vector("++-"), sign_vector("-00"), sign_vector("0--")] sage: W [(++-), (-00), (0--)] sage: lower_closure(W) {(000), (-00), (00-), (0+0), (0+-), (+00), (+0-), (++0), (++-), (0-0), (0--)}
TESTS:
sage: lower_closure([]) set()
- sign_vectors.functions.orthogonal_complement(iterable: set[SignVector]) set[SignVector]¶
Compute the orthogonal complement of given sign vectors. INPUT:
iterable– an iterable of sign vectors
OUTPUT: Return the orthogonal complement of
iterableas a set of partial sign vectors.EXAMPLES:
We consider a list consisting of only one sign vector:
sage: from sign_vectors import * sage: W = ExtendedSignVector.from_sign_vector(sign_vector("+-0")) sage: W (+-0) sage: orthogonal_complement([W]) {(000), (---), (00+), (00-), (++0), (++-), (--0), (--+), (+++)}
Now, we consider a list of three sign vectors:
sage: W = [sign_vector("++-"), sign_vector("-00"), sign_vector("0--")] sage: W [(++-), (-00), (0--)] sage: orthogonal_complement(W) {(000)} sage: W = [sign_vector("++-0"), sign_vector("+++0"), sign_vector("++00")] sage: W [(++-0), (+++0), (++00)] sage: orthogonal_complement(W) {(0000), (-+-+), (+-00), (-+00), (-++0), (000+), (-+++), (000-), (+---), (+-0+), (-+--), (+-+0), (+-+-), (+-++), (+--0), (-+-0), (+--+), (-+0+), (-+0-), (+-0-), (-++-)}
- sign_vectors.functions.plot_sign_vectors(iterable: set[SignVector], vertex_size: int = 600, figsize: int | None = None, aspect_ratio=None)¶
Plot the Hasse Diagram of sign vectors using the conformal relation.
INPUT:
iterable– an iterable of sign vectorsvertex_size– the size of the vertices in the plot (default: 600)figsize– the size of the figure (default: None)aspect_ratio– the aspect ratio of the plot (default: None)
- sign_vectors.functions.total_closure(iterable: set[SignVector]) set[SignVector]¶
Compute the total closure of given sign vectors.
INPUT:
iterable– an iterable of sign vectors
OUTPUT: Return the total closure of
iterableas a set of sign vectors.Note
The total closure is the union of the lower and upper closure.
See also
EXAMPLES:
First, we consider a list consisting of only one sign vector:
sage: from sign_vectors import * sage: W = [sign_vector("+-0")] sage: W [(+-0)] sage: total_closure(W) {(000), (0-0), (+00), (+-0), (+--), (+-+)}
Now, we consider a list of three sign vectors:
sage: W = [sign_vector("++-"), sign_vector("-00"), sign_vector("0--")] sage: W [(++-), (-00), (0--)] sage: total_closure(W) {(000), (-00), (00-), (---), (0+-), (++-), (-+0), (0-0), (--+), (-++), (-0-), (+00), (+--), (-+-), (-0+), (--0), (0+0), (+0-), (++0), (0--)}
- sign_vectors.functions.upper_closure(iterable: set[SignVector]) set[SignVector]¶
Compute the upper closure of given sign vectors.
INPUT:
iterable– an iterable of sign vectors
OUTPUT: Return the upper closure of
iterableas a set of sign vectors.Note
The sign vector \(X\) is in the upper closure of a set of sign vectors \(W\) if there exists \(Y \in W\) with \(X \leq Y\).
EXAMPLES:
First, we consider a list consisting of only one sign vector:
sage: from sign_vectors import * sage: W = [sign_vector("+-0")] sage: W [(+-0)] sage: upper_closure(W) {(+-0), (+--), (+-+)}
Now, we consider a list of three sign vectors:
sage: W = [sign_vector("++-"), sign_vector("-00"), sign_vector("0--")] sage: W [(++-), (-00), (0--)] sage: upper_closure(W) {(-00), (---), (++-), (-+0), (--+), (-++), (--0), (0--), (-0-), (+--), (-+-), (-0+)}
TESTS:
sage: upper_closure([]) set()