Skip to content

Commit

Permalink
a few more details in posets
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Jan 26, 2024
1 parent 2266a35 commit b41465d
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/sage/combinat/posets/hasse_diagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -1857,9 +1857,8 @@ def find_nonsemidistributive_elements(self, meet_or_join):
for x in range(n):
u = M1[e, x]
for y in range(x):
if u == M1[e, y]:
if u != M1[e, M2[x, y]]:
return (u, e, x, y)
if u == M1[e, y] and u != M1[e, M2[x, y]]:
return (u, e, x, y)

return None

Expand Down Expand Up @@ -2151,9 +2150,8 @@ def recursive_fit(orthocomplements, unbinded):
# Every element might have one possible orthocomplement,
# but so that they don't fit together. Must check that.
for lc in self.lower_covers_iterator(e):
if start[lc] is not None:
if not self.has_edge(e_, start[lc]):
return
if not (start[lc] is None or self.has_edge(e_, start[lc])):
return
if start[e_] is None:
start[e] = e_
start[e_] = e
Expand Down Expand Up @@ -2191,10 +2189,7 @@ def find_nonsemimodular_pair(self, upper):
sage: H_.find_nonsemimodular_pair(upper=False) is None
True
"""
if upper:
neighbors = self.neighbors_out
else:
neighbors = self.neighbors_in
neighbors = self.neighbors_out if upper else self.neighbors_in

n = self.order()
for e in range(n):
Expand Down

0 comments on commit b41465d

Please sign in to comment.