Yo ! 1) Why is join() defined for join-semilattices, but join_matrix() > "defined" for posets? (I.e. it works by giving exception if the poset is > not join-semilattice.) >
Hmmmm... 1) I do not know why it is made like that, and I do not like the design 2) After several cycles of "a) answer question b) think c) erase the answer", I have a question: given a Poset, how can you detect if this poset is a meet semilattice ? For sure we need a function for that ! And it seems that this function is exactly what join_matrix does. Then, how should it be implemented ? My way of doing that (what would yours be?) to: 1) Have a FinitePoset.is_meet_semilattice() function that would try to build that matrix and answer yes/no accordingly. The matrix, when built, would be cached somewhere. 2) Move Poset.join_matrix() to FiniteMeetSemiLattice The good thing is that if you: a) Build a Poset b) Notice it is a MeetSemiLattice by calling .is_meet_semilattice (which builds the matrix) c) Build the MeetSemiLattice from the poset Then step c should not re-build the matrix as the matrix is currently a lazy attribute of the hasse diagram, which has no reason to be changed by those commands. 2) Would it be useful to have join() function taking more than two > arguments? And if so, should then also L.join(x) return x if x in L, and > maybe even L.join() return L.top()? Or could join take a list as argument, > so that both L.join(x,y) and L.join([x,y]) would work and latter one be > possible to extend to L.join([x,y,z,...])? > +1 3) s/join/meet for questions 1 and 2. > That does not make any sense. You might want to try s/join/meet/g. Nathann -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.