File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -1857,9 +1857,8 @@ def find_nonsemidistributive_elements(self, meet_or_join):
1857
1857
for x in range (n ):
1858
1858
u = M1 [e , x ]
1859
1859
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 )
1863
1862
1864
1863
return None
1865
1864
@@ -2151,9 +2150,8 @@ def recursive_fit(orthocomplements, unbinded):
2151
2150
# Every element might have one possible orthocomplement,
2152
2151
# but so that they don't fit together. Must check that.
2153
2152
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
2157
2155
if start [e_ ] is None :
2158
2156
start [e ] = e_
2159
2157
start [e_ ] = e
@@ -2191,10 +2189,7 @@ def find_nonsemimodular_pair(self, upper):
2191
2189
sage: H_.find_nonsemimodular_pair(upper=False) is None
2192
2190
True
2193
2191
"""
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
2198
2193
2199
2194
n = self .order ()
2200
2195
for e in range (n ):
You can’t perform that action at this time.
0 commit comments