Skip to content

Commit b41465d

Browse files
committed
a few more details in posets
1 parent 2266a35 commit b41465d

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/sage/combinat/posets/hasse_diagram.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,9 +1857,8 @@ def find_nonsemidistributive_elements(self, meet_or_join):
18571857
for x in range(n):
18581858
u = M1[e, x]
18591859
for y in range(x):
1860-
if u == M1[e, y]:
1861-
if u != M1[e, M2[x, y]]:
1862-
return (u, e, x, y)
1860+
if u == M1[e, y] and u != M1[e, M2[x, y]]:
1861+
return (u, e, x, y)
18631862

18641863
return None
18651864

@@ -2151,9 +2150,8 @@ def recursive_fit(orthocomplements, unbinded):
21512150
# Every element might have one possible orthocomplement,
21522151
# but so that they don't fit together. Must check that.
21532152
for lc in self.lower_covers_iterator(e):
2154-
if start[lc] is not None:
2155-
if not self.has_edge(e_, start[lc]):
2156-
return
2153+
if not (start[lc] is None or self.has_edge(e_, start[lc])):
2154+
return
21572155
if start[e_] is None:
21582156
start[e] = e_
21592157
start[e_] = e
@@ -2191,10 +2189,7 @@ def find_nonsemimodular_pair(self, upper):
21912189
sage: H_.find_nonsemimodular_pair(upper=False) is None
21922190
True
21932191
"""
2194-
if upper:
2195-
neighbors = self.neighbors_out
2196-
else:
2197-
neighbors = self.neighbors_in
2192+
neighbors = self.neighbors_out if upper else self.neighbors_in
21982193

21992194
n = self.order()
22002195
for e in range(n):

0 commit comments

Comments
 (0)