@@ -2518,22 +2518,23 @@ def face_lattice(self):
2518
2518
Note that if ``cone`` is a face of ``supercone``, then the face
2519
2519
lattice of ``cone`` consists of (appropriate) faces of ``supercone``::
2520
2520
2521
+ sage: # needs sage.combinat sage.graphs
2521
2522
sage: supercone = Cone([(1,2,3,4), (5,6,7,8),
2522
2523
....: (1,2,4,8), (1,3,9,7)])
2523
- sage: supercone.face_lattice() # needs sage.combinat sage.graphs
2524
+ sage: supercone.face_lattice()
2524
2525
Finite lattice containing 16 elements with distinguished linear extension
2525
- sage: supercone.face_lattice().top() # needs sage.combinat sage.graphs
2526
+ sage: supercone.face_lattice().top()
2526
2527
4-d cone in 4-d lattice N
2527
- sage: cone = supercone.facets()[0] # needs sage.combinat sage.graphs
2528
- sage: cone # needs sage.combinat sage.graphs
2528
+ sage: cone = supercone.facets()[0]
2529
+ sage: cone
2529
2530
3-d face of 4-d cone in 4-d lattice N
2530
- sage: cone.face_lattice() # needs sage.combinat sage.graphs
2531
+ sage: cone.face_lattice()
2531
2532
Finite poset containing 8 elements with distinguished linear extension
2532
- sage: cone.face_lattice().bottom() # needs sage.combinat sage.graphs
2533
+ sage: cone.face_lattice().bottom()
2533
2534
0-d face of 4-d cone in 4-d lattice N
2534
- sage: cone.face_lattice().top() # needs sage.combinat sage.graphs
2535
+ sage: cone.face_lattice().top()
2535
2536
3-d face of 4-d cone in 4-d lattice N
2536
- sage: cone.face_lattice().top() == cone # needs sage.combinat sage.graphs
2537
+ sage: cone.face_lattice().top() == cone
2537
2538
True
2538
2539
2539
2540
TESTS::
@@ -2721,16 +2722,17 @@ def faces(self, dim=None, codim=None):
2721
2722
In the case of non-strictly convex cones even faces of small
2722
2723
non-negative dimension may be missing::
2723
2724
2725
+ sage: # needs sage.graphs
2724
2726
sage: halfplane = Cone([(1,0), (0,1), (-1,0)])
2725
- sage: halfplane.faces(0) # needs sage.graphs
2727
+ sage: halfplane.faces(0)
2726
2728
()
2727
- sage: halfplane.faces() # needs sage.graphs
2729
+ sage: halfplane.faces()
2728
2730
((1-d face of 2-d cone in 2-d lattice N,),
2729
2731
(2-d cone in 2-d lattice N,))
2730
2732
sage: plane = Cone([(1,0), (0,1), (-1,-1)])
2731
- sage: plane.faces(1) # needs sage.graphs
2733
+ sage: plane.faces(1)
2732
2734
()
2733
- sage: plane.faces() # needs sage.graphs
2735
+ sage: plane.faces()
2734
2736
((2-d cone in 2-d lattice N,),)
2735
2737
2736
2738
TESTS:
@@ -2908,19 +2910,20 @@ def facet_of(self):
2908
2910
2909
2911
EXAMPLES::
2910
2912
2913
+ sage: # needs sage.graphs
2911
2914
sage: octant = Cone([(1,0,0), (0,1,0), (0,0,1)])
2912
- sage: octant.facet_of() # needs sage.graphs
2915
+ sage: octant.facet_of()
2913
2916
()
2914
- sage: one_face = octant.faces(1)[0] # needs sage.graphs
2915
- sage: len(one_face.facet_of()) # needs sage.graphs
2917
+ sage: one_face = octant.faces(1)[0]
2918
+ sage: len(one_face.facet_of())
2916
2919
2
2917
- sage: one_face.facet_of()[1] # needs sage.graphs
2920
+ sage: one_face.facet_of()[1]
2918
2921
2-d face of 3-d cone in 3-d lattice N
2919
2922
2920
2923
While fan is the top element of its own cone lattice, which is a
2921
2924
variant of a face lattice, we do not refer to cones as its facets::
2922
2925
2923
- sage: fan = Fan([octant])
2926
+ sage: fan = Fan([octant]) # needs sage.graphs
2924
2927
sage: fan.generating_cone(0).facet_of() # needs sage.graphs
2925
2928
()
2926
2929
@@ -3923,17 +3926,18 @@ def sublattice_quotient(self, *args, **kwds):
3923
3926
3924
3927
EXAMPLES::
3925
3928
3929
+ sage: # needs sage.graphs
3926
3930
sage: C2_Z2 = Cone([(1,0), (1,2)]) # C^2/Z_2
3927
- sage: c1, c2 = C2_Z2.facets() # needs sage.graphs
3928
- sage: c2.sublattice_quotient() # needs sage.graphs
3931
+ sage: c1, c2 = C2_Z2.facets()
3932
+ sage: c2.sublattice_quotient()
3929
3933
1-d lattice, quotient of 2-d lattice N by Sublattice <N(1, 2)>
3930
3934
sage: N = C2_Z2.lattice()
3931
3935
sage: n = N(1,1)
3932
- sage: n_bar = c2.sublattice_quotient(n); n_bar # needs sage.graphs
3936
+ sage: n_bar = c2.sublattice_quotient(n); n_bar
3933
3937
N[1, 1]
3934
- sage: n_bar.lift() # needs sage.graphs
3938
+ sage: n_bar.lift()
3935
3939
N(1, 1)
3936
- sage: vector(n_bar) # needs sage.graphs
3940
+ sage: vector(n_bar)
3937
3941
(-1)
3938
3942
"""
3939
3943
if "_sublattice_quotient" not in self .__dict__ :
@@ -4205,30 +4209,32 @@ def relative_orthogonal_quotient(self, supercone):
4205
4209
4206
4210
EXAMPLES::
4207
4211
4212
+ sage: # needs sage.graphs
4208
4213
sage: rho = Cone([(1,1,1,3), (1,-1,1,3), (-1,-1,1,3), (-1,1,1,3)])
4209
4214
sage: rho.orthogonal_sublattice()
4210
4215
Sublattice <M(0, 0, 3, -1)>
4211
- sage: sigma = rho.facets()[1] # needs sage.graphs
4212
- sage: sigma.orthogonal_sublattice() # needs sage.graphs
4216
+ sage: sigma = rho.facets()[1]
4217
+ sage: sigma.orthogonal_sublattice()
4213
4218
Sublattice <M(0, 1, 1, 0), M(0, 0, 3, -1)>
4214
- sage: sigma.is_face_of(rho) # needs sage.graphs
4219
+ sage: sigma.is_face_of(rho)
4215
4220
True
4216
- sage: Q = sigma.relative_orthogonal_quotient(rho); Q # needs sage.graphs
4221
+ sage: Q = sigma.relative_orthogonal_quotient(rho); Q
4217
4222
1-d lattice, quotient
4218
4223
of Sublattice <M(0, 1, 1, 0), M(0, 0, 3, -1)>
4219
4224
by Sublattice <M(0, 0, 3, -1)>
4220
- sage: Q.gens() # needs sage.graphs
4225
+ sage: Q.gens()
4221
4226
(M[0, 1, 1, 0],)
4222
4227
4223
4228
Different codimension::
4224
4229
4230
+ sage: # needs sage.graphs
4225
4231
sage: rho = Cone([[1,-1,1,3],[-1,-1,1,3]])
4226
- sage: sigma = rho.facets()[0] # needs sage.graphs
4227
- sage: sigma.orthogonal_sublattice() # needs sage.graphs
4232
+ sage: sigma = rho.facets()[0]
4233
+ sage: sigma.orthogonal_sublattice()
4228
4234
Sublattice <M(1, 0, 2, -1), M(0, 1, 1, 0), M(0, 0, 3, -1)>
4229
- sage: rho.orthogonal_sublattice() # needs sage.graphs
4235
+ sage: rho.orthogonal_sublattice()
4230
4236
Sublattice <M(0, 1, 1, 0), M(0, 0, 3, -1)>
4231
- sage: sigma.relative_orthogonal_quotient(rho).gens() # needs sage.graphs
4237
+ sage: sigma.relative_orthogonal_quotient(rho).gens()
4232
4238
(M[-1, 0, -2, 1],)
4233
4239
4234
4240
Sign choice in the codimension one case::
@@ -5741,19 +5747,20 @@ def positive_operators_gens(self, K2=None):
5741
5747
The positive operators on a permuted cone can be obtained by
5742
5748
conjugation::
5743
5749
5750
+ sage: # needs sage.groups
5744
5751
sage: K = random_cone(max_ambient_dim=3)
5745
5752
sage: L = ToricLattice(K.lattice_dim()**2)
5746
- sage: p = SymmetricGroup(K.lattice_dim()).random_element().matrix() # needs sage.groups
5747
- sage: pK = Cone((p*k for k in K), K.lattice(), check=False) # needs sage.groups
5748
- sage: pi_gens = pK.positive_operators_gens() # needs sage.groups
5749
- sage: actual = Cone((g.list() for g in pi_gens), # needs sage.groups
5753
+ sage: p = SymmetricGroup(K.lattice_dim()).random_element().matrix()
5754
+ sage: pK = Cone((p*k for k in K), K.lattice(), check=False)
5755
+ sage: pi_gens = pK.positive_operators_gens()
5756
+ sage: actual = Cone((g.list() for g in pi_gens),
5750
5757
....: lattice=L,
5751
5758
....: check=False)
5752
5759
sage: pi_gens = K.positive_operators_gens()
5753
- sage: expected = Cone(((p*g*p.inverse()).list() for g in pi_gens), # needs sage.groups
5760
+ sage: expected = Cone(((p*g*p.inverse()).list() for g in pi_gens),
5754
5761
....: lattice=L,
5755
5762
....: check=False)
5756
- sage: actual.is_equivalent(expected) # needs sage.groups
5763
+ sage: actual.is_equivalent(expected)
5757
5764
True
5758
5765
5759
5766
An operator is positive from one cone to another if and only if
0 commit comments