Opened 8 years ago
Closed 8 years ago
#17121 closed enhancement (fixed)
LatticePoset: Add meet_irreducibles, faster is_distributive
Reported by: | jmantysalo | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | combinatorics | Keywords: | |
Cc: | ncohen | Merged in: | |
Authors: | Jori Mäntysalo | Reviewers: | Nathann Cohen |
Report Upstream: | N/A | Work issues: | |
Branch: | 8b68cdb (Commits, GitHub, GitLab) | Commit: | 8b68cdb1290ca3fa5e160debc322f5d9e86086af |
Dependencies: | Stopgaps: |
Description
Finite lattice posets now has join_irreducibles()
and join_irreducibles_poset()
. Add meet_irreducibles()
and meet_irreducibles_poset()
.
is_distributive()
is now based on formal definition. It can just check that lattice is graded and that number of both meet- and join-irreducibles equals to rank (=height-1) of the lattice.
Change History (12)
comment:1 Changed 8 years ago by
Branch: | → u/jmantysalo/latticeposet__add_meet_irreducibles__faster_is_distributive |
---|
comment:2 Changed 8 years ago by
Authors: | → Jori Mäntysalo |
---|---|
Cc: | ncohen added |
Commit: | → 0ee134c54632d9950ac65d9ce47e54c0fab0e483 |
Status: | new → needs_review |
comment:3 Changed 8 years ago by
Reviewers: | → Nathann Cohen |
---|---|
Status: | needs_review → needs_work |
Hello !
1) meet_irreducibles
: you write len(self.upper_covers())
which calls upper_covers_iterator
which iterates over all out-neighbors of a vertex of the HasseDiagram before relabelling them as !Poset elements. Why ? All you want to do is check that the outdegree of those points if 1. You could work on the diagram directly.
2) Please add the new functions to the index.
3) You cannot use $
for latex code there. Use `
instead. In order to check that the doc compiles correctly run sage -b && sage -docbuild reference/combinat html
and look at the html files produced.
4) Use ()
instead of \
to wrap code on multiple lines.
Nathann
comment:4 follow-up: 7 Changed 8 years ago by
1: But posets.py
says "This internal data structure is subject to change at any point. Do not break encapsulation!" But I can do that of course; then I'll also change join_irreducibles
.
2: Uh, of course.
3: OK. But then http://www.sagemath.org/doc/developer/coding_basics.html#latex-typesetting needs correcting.
4: OK.
comment:5 Changed 8 years ago by
Commit: | 0ee134c54632d9950ac65d9ce47e54c0fab0e483 → b3e1bcad805e3cff946ee95bc225534a583ea248 |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
b3e1bca | Minor corrections.
|
comment:6 follow-up: 8 Changed 8 years ago by
Status: | needs_work → needs_review |
---|
3: It seems that $ works in me. Could you check it? 2: There is no index where to add... So, more work to poset documentation project.
As of 1, I did not do that for now; this is direct copy from join_
-counterparts. Point 4 is done, but long line of ==
is still quite hard to read.
Also this same time I removed totally unused argument from cover_relations
. Is this OK to do in ticket title saying nothing about it?
comment:7 Changed 8 years ago by
Yo !
1: But
posets.py
says "This internal data structure is subject to change at any point. Do not break encapsulation!" But I can do that of course; then I'll also changejoin_irreducibles
.
Lost computations for political reasons. This code never ceases to amaze me :-P
3: OK. But then http://www.sagemath.org/doc/developer/coding_basics.html#latex-typesetting needs correcting.
Oh. If it is written in the developper's manual then the nazis can do nothing against you. Good ! :-D
Nathann
comment:8 Changed 8 years ago by
2: There is no index where to add... So, more work to poset documentation project.
Oh, no index for lattices. Right, sorry for my remark !
As of 1, I did not do that for now; this is direct copy from
join_
-counterparts. Point 4 is done, but long line of==
is still quite hard to read.
As you wish. Remember that there is some time there to save if you have time problems later on.
Also this same time I removed totally unused argument from
cover_relations
. Is this OK to do in ticket title saying nothing about it?
I don't mind. It will depend on the reviewers, though.
I will run all tests on a machine to check that removing this keyword does not break anything somewhere.
Nathann
comment:9 Changed 8 years ago by
The dollar-sign $
does work, but it is (strongly?) recommended that you use the backticks `
instead. I think there are still issues with the notebook's documentation when using dollar-signs.
comment:10 Changed 8 years ago by
Commit: | b3e1bcad805e3cff946ee95bc225534a583ea248 → 8b68cdb1290ca3fa5e160debc322f5d9e86086af |
---|
Branch pushed to git repo; I updated commit sha1. New commits:
8b68cdb | Changed "$" to "`" as LaTeX marker on documentation.
|
comment:11 Changed 8 years ago by
Status: | needs_review → positive_review |
---|
All tests passed !
Thanks,
Nathann
comment:12 Changed 8 years ago by
Branch: | u/jmantysalo/latticeposet__add_meet_irreducibles__faster_is_distributive → 8b68cdb1290ca3fa5e160debc322f5d9e86086af |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
New commits:
Much better is_distributive(). Added two little functions.