Opened 4 years ago

Closed 4 years ago

#19854 closed enhancement (fixed)

Index of functions to finite lattices

Reported by: jmantysalo Owned by:
Priority: minor Milestone: sage-7.0
Component: documentation Keywords:
Cc: dkrenn Merged in:
Authors: Jori Mäntysalo Reviewers: Nathann Cohen
Report Upstream: N/A Work issues:
Branch: 5fcce2f (Commits) Commit: 5fcce2f9afd25bbcc5721750214b6ffa75136e3e
Dependencies: Stopgaps:

Description

This patch modifies index of functions of finite lattices (lattices.py) to categorized like finite posets (posets.py) already have.

Change History (11)

comment:1 Changed 4 years ago by jmantysalo

  • Branch set to u/jmantysalo/lattices_doc_index

comment:2 Changed 4 years ago by jmantysalo

  • Cc dkrenn added
  • Commit set to 5fcce2f9afd25bbcc5721750214b6ffa75136e3e
  • Status changed from new to needs_review

Daniel: I think that after #18489 there has been several additions and I want to add at least is_relatively_complemented(), and so this categorizing makes sense. Basically this "needs_review" asks if you agree on that.

There are two broken links, but they will work after #19801, which I suppose to be merged.

(Of course this is not good even after this because of categories, but...)


New commits:

5fcce2fCategorized index of functions in lattices.

comment:3 follow-up: Changed 4 years ago by ncohen

Not feeling like using the automatic generation of tables?

comment:4 in reply to: ↑ 3 Changed 4 years ago by jmantysalo

  • Status changed from needs_review to needs_work

Replying to ncohen:

Not feeling like using the automatic generation of tables?

Good point. This can be a good test ball for that.

(I suppose that this was also implicit "yes", so that ~20 functions is enough to have categorized index.)

comment:5 follow-up: Changed 4 years ago by jmantysalo

There are two points. First is technical one:

lattices.py contains three classes, i.e. (whole) lattice and semilattices. Now, hand-made version contained a table like

**Meet and join**

    :meth:`~FiniteMeetSemilattice.meet` | Return the meet of given elements.
    :meth:`~FiniteJoinSemilattice.join` | Return the join of given elements.

and this seems to be impossible to do with this.

Second is not so technical. It is possible to have for example

:meth:`~FiniteLatticePoset.is_geometric` | Return ``True`` if the lattice is atomic and upper semimodular.

in the index and

def is_geometric(self):
    """                                                                     
    Return ``True`` if the lattice is geometric, and ``False`` otherwise.   
                                                                                
    A lattice is geometric if it is both atomic and upper semimodular.

in the function documentation. I think that hand-made index can be better than automatically generated; and of course it needs more work.

But I am a fan of Nathann's code. I think I could use it at matrices and groups, at least. They are used is basic courses at university, so they should have good documentation page.

comment:6 in reply to: ↑ 5 ; follow-up: Changed 4 years ago by ncohen

Yo !

lattices.py contains three classes, i.e. (whole) lattice and semilattices. Now, hand-made version contained a table like

Oh. I see ... Yep, no way to have the methods of different classes in the same table I believe ...

Second is not so technical. It is possible to have for example

There I really don't see the problem in having the same message twice. Setting both to Return ``True`` if the lattice is atomic and upper semimodular. can't hurt anybody.

But I am a fan of Nathann's code. I think I could use it at matrices and groups, at least. They are used is basic courses at university, so they should have good documentation page.

Yep. Matrices and groups could surely use an index. Crazy that it hasn't happened before btw O_o

Nathann

comment:7 in reply to: ↑ 6 ; follow-up: Changed 4 years ago by jmantysalo

  • Status changed from needs_work to needs_review

Replying to ncohen:

lattices.py contains three classes, i.e. (whole) lattice and semilattices. Now, hand-made version contained a table like

Oh. I see ... Yep, no way to have the methods of different classes in the same table I believe ...

OK. I return this to needs_review again; in any case it will be better with full and categorized index than with partial uncategorized. #19801 was closed, so I think this can be safely be reviewed without waiting for next beta.

There I really don't see the problem in having the same message twice. Setting both to Return ``True`` if the lattice is atomic and upper semimodular. can't hurt anybody.

Yeah, it is a very minor thing. But for is_modular_element the issue is bigger (but still quite small...). It sounds odd to have "Return True if x is a modular element - -" in the index, where you don't see the parameter x.

But I am a fan of Nathann's code. I think I could use it at matrices and groups, at least. They are used is basic courses at university, so they should have good documentation page.

Yep. Matrices and groups could surely use an index. Crazy that it hasn't happened before btw O_o

I guess it will make quite a big difference for a student to start using Sage for graph theory or for linear algebra... http://doc.sagemath.org/html/en/reference/matrices/index.html vs. http://doc.sagemath.org/html/en/reference/graphs/index.html . There should be at least index in the matrix2.py -- but the file (or compiled .html) itself is quite hidden.

comment:8 in reply to: ↑ 7 ; follow-up: Changed 4 years ago by ncohen

Yo,

OK. I return this to needs_review again; in any case it will be better with full and categorized index than with partial uncategorized. #19801 was closed, so I think this can be safely be reviewed without waiting for next beta.

Err... Hmmm, technically you do something weird here: add a link toward a function that is not even defined in the branch.

But well, it is already merged so it probably doesn't matter. Do you compile the doc with '--warn-links' ? It helps a lot when you work on the doc.

I guess it will make quite a big difference for a student to start using Sage for graph theory or for linear algebra... http://doc.sagemath.org/html/en/reference/matrices/index.html vs. http://doc.sagemath.org/html/en/reference/graphs/index.html . There should be at least index in the matrix2.py -- but the file (or compiled .html) itself is quite hidden.

An index of functions would *really* make a difference. Seriously >_<

Nathann

comment:9 Changed 4 years ago by ncohen

  • Reviewers set to Nathann Cohen
  • Status changed from needs_review to positive_review

Okay okay !..

Nathann

comment:10 in reply to: ↑ 8 Changed 4 years ago by jmantysalo

Replying to ncohen:

Do you compile the doc with '--warn-links' ? It helps a lot when you work on the doc.

No. I have done that before, and then forgotten the option. Thanks. And thanks for review.

I opened #19859 for index of matrix functions.

comment:11 Changed 4 years ago by vbraun

  • Branch changed from u/jmantysalo/lattices_doc_index to 5fcce2f9afd25bbcc5721750214b6ffa75136e3e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.