On Sun, 17 Aug 2014, Nathann Cohen wrote:
> Please, be respectful of other people's work and focus your hate on Sage's
> categories. The rest is quite fine :-P
OK, I'll try to remember this. :=)
> And if you want the product of more complicated things (with sets of
> different size) you can use the trick that was first proposed above, i.e.:
>
> product(* [range(x) for x in [2,2,2,3,3,3,2,3]] )
Ah, seems to be quite a compact form!
But after two days of wondering I don't know how to generate all lower
triangular matrices with non-zero elements taken from, say, [0,1]. For all
matrices it seems simple:
N=3; v=[0,1];
p=product(product(v, repeat=N), repeat=N)
print matrix(ZZ, p.next())
print matrix(ZZ, p.next())
. . .
> P.S. : Sage is open source: when you hate something, come and change it.
It's not always possible. Or what_to_do to DifferentNamingStyles like
KleinFourGroup vs. is_isomorphic?
--
Jori Mäntysalo