summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTara Fife <fi.tara@gmail.com>2016-07-14 17:32:35 -0500
committerTara Fife <fi.tara@gmail.com>2016-07-14 17:32:35 -0500
commite8c5b4e1fdb1c4708f300d361daee941ef490c33 (patch)
treeeb798f3b685bebc86bfe5ba161e93abcb1c416de
parentFixed doctest (diff)
Fixed return when we test if a matroid has itself as a minor.public/ticket/20689
-rw-r--r--src/sage/matroids/matroid.pyx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sage/matroids/matroid.pyx b/src/sage/matroids/matroid.pyx
index 2eb1a39..4fc3fad 100644
--- a/src/sage/matroids/matroid.pyx
+++ b/src/sage/matroids/matroid.pyx
@@ -1135,7 +1135,7 @@ cdef class Matroid(SageObject):
"""
if self is N:
if certificate:
- return True, None
+ return True, (frozenset(), frozenset(), {x: x for x in self.groundset()})
return True
rd = self.full_rank() - N.full_rank()
cd = self.full_corank() - N.full_corank()
@@ -3935,6 +3935,12 @@ cdef class Matroid(SageObject):
sage: matroids.named_matroids.NonFano().has_minor(M, certificate=True)
(True, (frozenset(), frozenset({'g'}),
{0: 'b', 1: 'c', 2: 'a', 3: 'd', 4: 'e', 5: 'f'}))
+ sage: M = matroids.named_matroids.Fano()
+ sage: M.has_minor(M, True)
+ (True,
+ (frozenset(),
+ frozenset(),
+ {'a': 'a', 'b': 'b', 'c': 'c', 'd': 'd', 'e': 'e', 'f': 'f', 'g': 'g'}))
"""
if not isinstance(N, Matroid):
raise ValueError("N must be a matroid.")