@@ -70,13 +70,13 @@ def Q6():
70
70
EXAMPLES::
71
71
72
72
sage: from sage.matroids.advanced import setprint
73
- sage: M = matroids.named_matroids.Q6(); M # optional - sage.rings.finite_rings
73
+ sage: M = matroids.named_matroids.Q6(); M # needs sage.rings.finite_rings
74
74
Q6: Quaternary matroid of rank 3 on 6 elements
75
- sage: setprint(M.hyperplanes()) # optional - sage.rings.finite_rings
75
+ sage: setprint(M.hyperplanes()) # needs sage.rings.finite_rings
76
76
[{'a', 'b', 'd'}, {'a', 'c'}, {'a', 'e'}, {'a', 'f'}, {'b', 'c', 'e'},
77
77
{'b', 'f'}, {'c', 'd'}, {'c', 'f'}, {'d', 'e'}, {'d', 'f'},
78
78
{'e', 'f'}]
79
- sage: M.nonspanning_circuits() == M.noncospanning_cocircuits() # optional - sage.rings.finite_rings
79
+ sage: M.nonspanning_circuits() == M.noncospanning_cocircuits() # needs sage.rings.finite_rings
80
80
False
81
81
"""
82
82
F = GF (4 , 'x' )
@@ -109,7 +109,7 @@ def P6():
109
109
{2: {{'a', 'b', 'c'}}, 3: {{'a', 'b', 'c', 'd', 'e', 'f'}}}
110
110
sage: len(set(M.nonspanning_circuits()).difference(M.nonbases())) == 0
111
111
True
112
- sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, # optional - sage.rings.finite_rings
112
+ sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, # needs sage.rings.finite_rings
113
113
....: nrows=5)).has_minor(M)
114
114
False
115
115
sage: M.is_valid()
@@ -310,7 +310,7 @@ def AG32prime():
310
310
{'b', 'c', 'd', 'g'}, {'b', 'c', 'e', 'f'}, {'b', 'd', 'f', 'h'},
311
311
{'b', 'e', 'g', 'h'}, {'c', 'd', 'e', 'h'}, {'c', 'f', 'g', 'h'},
312
312
{'d', 'e', 'f', 'g'}]
313
- sage: M.is_valid() # long time # optional - sage.rings.finite_rings
313
+ sage: M.is_valid() # long time, needs sage.rings.finite_rings
314
314
True
315
315
"""
316
316
E = 'abcdefgh'
@@ -381,7 +381,7 @@ def F8():
381
381
[...True...]
382
382
sage: [N.is_isomorphic(matroids.named_matroids.NonFano()) for N in D]
383
383
[...True...]
384
- sage: M.is_valid() # long time # optional - sage.rings.finite_rings
384
+ sage: M.is_valid() # long time, needs sage.rings.finite_rings
385
385
True
386
386
"""
387
387
E = 'abcdefgh'
@@ -626,7 +626,7 @@ def P8():
626
626
P8: Ternary matroid of rank 4 on 8 elements, type 2+
627
627
sage: M.is_isomorphic(M.dual())
628
628
True
629
- sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, # optional - sage.rings.finite_rings
629
+ sage: Matroid(matrix=random_matrix(GF(4, 'a'), ncols=5, # needs sage.rings.finite_rings
630
630
....: nrows=5)).has_minor(M)
631
631
False
632
632
sage: M.bicycle_dimension()
@@ -693,12 +693,12 @@ def K33dual():
693
693
694
694
EXAMPLES::
695
695
696
- sage: M = matroids.named_matroids.K33dual(); M # optional - sage.graphs
696
+ sage: M = matroids.named_matroids.K33dual(); M # needs sage.graphs
697
697
M*(K3, 3): Regular matroid of rank 4 on 9 elements with 81 bases
698
- sage: any(N.is_3connected() # optional - sage.graphs
698
+ sage: any(N.is_3connected() # needs sage.graphs
699
699
....: for N in M.linear_extensions(simple=True))
700
700
False
701
- sage: M.is_valid() # long time # optional - sage.graphs
701
+ sage: M.is_valid() # long time, needs sage.graphs
702
702
True
703
703
"""
704
704
E = 'abcdefghi'
@@ -759,16 +759,16 @@ def CompleteGraphic(n):
759
759
EXAMPLES::
760
760
761
761
sage: from sage.matroids.advanced import setprint
762
- sage: M = matroids.CompleteGraphic(5); M # optional - sage.graphs
762
+ sage: M = matroids.CompleteGraphic(5); M # needs sage.graphs
763
763
M(K5): Graphic matroid of rank 4 on 10 elements
764
- sage: M.has_minor(matroids.Uniform(2, 4)) # optional - sage.graphs
764
+ sage: M.has_minor(matroids.Uniform(2, 4)) # needs sage.graphs
765
765
False
766
- sage: simplify(M.contract(randrange(0, # optional - sage.graphs
766
+ sage: simplify(M.contract(randrange(0, # needs sage.graphs
767
767
....: 10))).is_isomorphic(matroids.CompleteGraphic(4))
768
768
True
769
- sage: setprint(M.closure([0, 2, 4, 5])) # optional - sage.graphs
769
+ sage: setprint(M.closure([0, 2, 4, 5])) # needs sage.graphs
770
770
{0, 1, 2, 4, 5, 7}
771
- sage: M.is_valid() # optional - sage.graphs
771
+ sage: M.is_valid() # needs sage.graphs
772
772
True
773
773
"""
774
774
M = Matroid (groundset = list (range ((n * (n - 1 )) // 2 )),
@@ -805,7 +805,7 @@ def Wheel(n, field=None, ring=None):
805
805
sage: M.is_valid()
806
806
True
807
807
sage: M = matroids.Wheel(3)
808
- sage: M.is_isomorphic(matroids.CompleteGraphic(4)) # optional - sage.graphs
808
+ sage: M.is_isomorphic(matroids.CompleteGraphic(4)) # needs sage.graphs
809
809
True
810
810
sage: M.is_isomorphic(matroids.Wheel(3, field=GF(3)))
811
811
True
@@ -966,7 +966,7 @@ def PG(n, q, x=None):
966
966
sage: M = matroids.PG(2, 2)
967
967
sage: M.is_isomorphic(matroids.named_matroids.Fano())
968
968
True
969
- sage: matroids.PG(5, 4, 'z').size() == (4^6 - 1) / (4 - 1) # optional - sage.rings.finite_rings
969
+ sage: matroids.PG(5, 4, 'z').size() == (4^6 - 1) / (4 - 1) # needs sage.rings.finite_rings
970
970
True
971
971
sage: M = matroids.PG(4, 7); M
972
972
PG(4, 7): Linear matroid of rank 5 on 2801 elements represented over
@@ -1009,7 +1009,7 @@ def AG(n, q, x=None):
1009
1009
sage: M = matroids.AG(2, 3) \ 8
1010
1010
sage: M.is_isomorphic(matroids.named_matroids.AG23minus())
1011
1011
True
1012
- sage: matroids.AG(5, 4, 'z').size() == ((4 ^ 6 - 1) / (4 - 1) - # optional - sage.rings.finite_rings
1012
+ sage: matroids.AG(5, 4, 'z').size() == ((4 ^ 6 - 1) / (4 - 1) - # needs sage.rings.finite_rings
1013
1013
....: (4 ^ 5 - 1)/(4 - 1))
1014
1014
True
1015
1015
sage: M = matroids.AG(4, 2); M
@@ -1048,7 +1048,7 @@ def R10():
1048
1048
{4, 6}
1049
1049
sage: M.equals(M.dual())
1050
1050
False
1051
- sage: M.is_isomorphic(M.dual()) # optional - sage.graphs
1051
+ sage: M.is_isomorphic(M.dual()) # needs sage.graphs
1052
1052
True
1053
1053
sage: M.is_valid()
1054
1054
True
@@ -1086,7 +1086,7 @@ def R12():
1086
1086
R12: Regular matroid of rank 6 on 12 elements with 441 bases
1087
1087
sage: M.equals(M.dual())
1088
1088
False
1089
- sage: M.is_isomorphic(M.dual()) # optional - sage.graphs
1089
+ sage: M.is_isomorphic(M.dual()) # needs sage.graphs
1090
1090
True
1091
1091
sage: M.is_valid()
1092
1092
True
@@ -1246,10 +1246,10 @@ def Q10():
1246
1246
1247
1247
EXAMPLES::
1248
1248
1249
- sage: M = matroids.named_matroids.Q10() # optional - sage.rings.finite_rings
1250
- sage: M.is_isomorphic(M.dual()) # optional - sage.rings.finite_rings
1249
+ sage: M = matroids.named_matroids.Q10() # needs sage.rings.finite_rings
1250
+ sage: M.is_isomorphic(M.dual()) # needs sage.rings.finite_rings
1251
1251
True
1252
- sage: M.is_valid() # optional - sage.rings.finite_rings
1252
+ sage: M.is_valid() # needs sage.rings.finite_rings
1253
1253
True
1254
1254
1255
1255
Check the splitter property. By Seymour's Theorem, and using self-duality,
@@ -1258,8 +1258,8 @@ def Q10():
1258
1258
are quaternary are `U_{2, 5}, U_{3, 5}, F_7, F_7^*`. As it happens, it
1259
1259
suffices to check for `U_{2, 5}`:
1260
1260
1261
- sage: S = matroids.named_matroids.Q10().linear_extensions(simple=True) # optional - sage.rings.finite_rings
1262
- sage: [M for M in S if not M.has_line_minor(5)] # long time # optional - sage.rings.finite_rings
1261
+ sage: S = matroids.named_matroids.Q10().linear_extensions(simple=True) # needs sage.rings.finite_rings
1262
+ sage: [M for M in S if not M.has_line_minor(5)] # long time, needs sage.rings.finite_rings
1263
1263
[]
1264
1264
"""
1265
1265
F = GF (4 , 'x' )
@@ -1369,8 +1369,8 @@ def Block_9_4():
1369
1369
sage: M = matroids.named_matroids.Block_9_4()
1370
1370
sage: M.is_valid() # long time
1371
1371
True
1372
- sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits())
1373
- sage: BD.is_t_design(return_parameters=True)
1372
+ sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits()) # needs sage.graphs
1373
+ sage: BD.is_t_design(return_parameters=True) # needs sage.graphs
1374
1374
(True, (2, 9, 4, 3))
1375
1375
"""
1376
1376
E = 'abcdefghi'
@@ -1395,8 +1395,8 @@ def Block_10_5():
1395
1395
sage: M = matroids.named_matroids.Block_10_5()
1396
1396
sage: M.is_valid() # long time
1397
1397
True
1398
- sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits())
1399
- sage: BD.is_t_design(return_parameters=True)
1398
+ sage: BD = BlockDesign(M.groundset(), M.nonspanning_circuits()) # needs sage.graphs
1399
+ sage: BD.is_t_design(return_parameters=True) # needs sage.graphs
1400
1400
(True, (3, 10, 5, 3))
1401
1401
"""
1402
1402
@@ -1427,7 +1427,7 @@ def ExtendedBinaryGolayCode():
1427
1427
1428
1428
sage: M = matroids.named_matroids.ExtendedBinaryGolayCode()
1429
1429
sage: C = LinearCode(M.representation())
1430
- sage: C.is_permutation_equivalent(codes.GolayCode(GF(2))) # long time # optional - sage.rings.finite_rings
1430
+ sage: C.is_permutation_equivalent(codes.GolayCode(GF(2))) # long time, needs sage.rings.finite_rings
1431
1431
True
1432
1432
sage: M.is_valid()
1433
1433
True
@@ -1462,7 +1462,7 @@ def ExtendedTernaryGolayCode():
1462
1462
1463
1463
sage: M = matroids.named_matroids.ExtendedTernaryGolayCode()
1464
1464
sage: C = LinearCode(M.representation())
1465
- sage: C.is_permutation_equivalent(codes.GolayCode(GF(3))) # long time # optional - sage.rings.finite_rings
1465
+ sage: C.is_permutation_equivalent(codes.GolayCode(GF(3))) # long time, needs sage.rings.finite_rings
1466
1466
True
1467
1467
sage: M.is_valid()
1468
1468
True
0 commit comments