Ticket #15703: test_rootsystems.sage

File test_rootsystems.sage, 976 bytes (added by jipilab, 7 years ago)
Line 
1import pdb
2UCF.<E>=CyclotomicField(2*5*6)
3g=DynkinDiagram()
4g.add_vertices([1,2,3,4])
5g.add_edge(1,2,2)
6g.add_edge(2,1,2)
7g.add_edge(1,4,(E^6+~E^6)) #  E(10)+~E(10) (for Universal)
8g.add_edge(4,1,(E^6+~E^6))
9g.add_edge(2,3,(E^5+~E^5)) # E(12)+~E(12) (for Universal)
10g.add_edge(3,2,(E^5+~E^5))
11g.add_edge(3,4,2.2)
12g.add_edge(4,3,2.2)
13
14g.is_affine = ConstantFunction(False)
15g.is_finite = ConstantFunction(False)
16L=RootSystem(g).root_space(UCF)
17W=L.weyl_group()
18s=W.simple_reflections()
19alpha=L.simple_roots()
20w=W.an_element()
21roots = w.inversions(inversion_type="roots")
22OF=W.weak_order_ideal(predicate=lambda x: True)
23
24def compute_roots(lengths):
25    L_elmts=[]
26    for lg in lengths:
27        L_elmts+=list(OF.elements_of_depth_iterator(lg))
28    S_rt=Set(flatten([el.inversions(inversion_type="roots") for el in L_elmts]))
29    return S_rt
30
31root_set=compute_roots([1,2,3,4,5,6,7,8])
32dessin=L.plot_roots(list(root_set),projection="transversal")
33