Skip to content

Commit bfb76f6

Browse files
author
Anton Leykin
committed
Added a symmetry test for maximal cones of trop(CM2)
(currently fails for n=5)
1 parent 465d416 commit bfb76f6

File tree

2 files changed

+47
-6
lines changed

2 files changed

+47
-6
lines changed

Rigidity/CayleyMenger-tests.m2

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,35 @@ maximalCones = apply(maximalPairs,
99
p->apply(raysOfTreePairCone(p_0,p_1),v->v_GIndices));
1010
assert(toString max maximalPairs == "{x_1*x_2*x_3*x_4+x_1*x_2*x_3+x_1*x_2, x_1*x_2*x_3*x_4+x_1*x_3+x_2*x_4}")
1111
///
12+
13+
TEST ///
14+
permutationOfDoubleIndices = (p,G) -> apply(G, l->position(G,l' -> sort p_l' == l))
15+
checkInvariance = perm -> (
16+
n := #perm;
17+
G := subsets(1..n,2);
18+
GIndices := edgeListToIndices(G,n);
19+
maximalPairs := maximalTreePairs(n);
20+
maximalCones = apply(maximalPairs,
21+
p->apply(raysOfTreePairCone(p_0,p_1),v->v_GIndices));
22+
lookupSet = maximalCones/toCompare//set;
23+
p := permutationOfDoubleIndices(perm,apply(G,p->p-{1,1})); -- need to decrease indices by 1
24+
wrong := select(#maximalCones, i->(
25+
c := maximalCones#i;
26+
c' := c/(r->r_p);
27+
not member(toCompare c', lookupSet)
28+
));
29+
wrong
30+
)
31+
32+
perm = {3,0,1,2}
33+
toCompare = set; -- comparison as sets holds for n=4
34+
wrong = checkInvariance perm
35+
assert isEmpty wrong
36+
37+
-* FAILS!!!
38+
perm = {4,0,1,2,3}
39+
toCompare = c -> mingens image transpose matrix(QQ,c);
40+
wrong = checkInvariance perm
41+
assert isEmpty wrong
42+
*-
43+
///

Rigidity/Examples/tropCM2-examples.m2

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1-
1+
-----------------------------
2+
-- maximal cones
3+
-----------------------------
24
n=5;
35
G={{1,2},{2,3},{3,4},{1,4},{1,5},{2,5},{3,5},{4,5}};
46

5-
--n=7;
6-
--G={{1,5},{1,6},{1,7},{2,5},{2,6},{2,7},{3,5},{3,6},{3,7},{4,5},{4,6},{4,7}};
7+
-* ... one may pick one of these ...
8+
n=6;
9+
G=subsets(1..n,2) -- takes long time
10+
11+
n=7;
12+
G={{1,5},{1,6},{1,7},{2,5},{2,6},{2,7},{3,5},{3,6},{3,7},{4,5},{4,6},{4,7}};
13+
*-
714

815
GIndices=edgeListToIndices(G,n);
9-
maximalPairs = maximalTreePairs(n);
10-
maximalCones = apply(maximalPairs,
16+
time maximalPairs = maximalTreePairs(n);
17+
time maximalCones = apply(maximalPairs,
1118
p->apply(raysOfTreePairCone(p_0,p_1),v->v_GIndices));
1219

13-
20+
----------------------------
21+
-- cones to complete
22+
----------------------------
1423
n=4;
1524
G={{1,2},{2,3},{3,4},{1,4}};
1625
GIndices=edgeListToIndices(G,n);

0 commit comments

Comments
 (0)