On Tue, 4 Apr 2017, Robin van der veer wrote:
> Thanks for your reply.To me the essence of the definition of join and meetsemilattice is about joins/meets existing for ALL
> pairs, as opposed to some pairs.
As a slow code you can just say something like
Matrix([join2(L, a, b) for a in L] for b in L])
> As for your code, I think you want to return j.bottom(), not just the first element of j, correct?
Actually it is the same thing, as for any poset P in Sage we have P[0],
P[1], ... a linear extension of P.
> Either way I'm not sure that this is efficient enough to be workable,
> but I will try it.
It should be quite easy to make faster one for bigger posets. OTOH Sage is
about never very fast compared to C code, when your computation has
for-loops. But then, nowadays computers are so fast that even "slow" code
is often fast.
--
Jori Mäntysalo