Changes between Version 2 and Version 7 of Ticket #31725


Ignore:
Timestamp:
Apr 25, 2021, 5:14:59 AM (17 months ago)
Author:
Yuan Zhou
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31725

    • Property Commit changed from to 287ec785acd6a520beae4f2f61523cc2e40ce9fa
    • Property Branch changed from to u/yzh/implement_meet__join__etc__methods_for_posets
  • Ticket #31725 – Description

    v2 v7  
    1 Similar methods `_meet`, `_join` exist in `FinitePoset._hasse_diagram` but not yet in `FinitePoset` itself. To make them methods of `Poset`, one needs apply the `_element_to_vertex` and `_vertex_to_element` conversions.
     1`FinitePoset.meet(x, y)` takes:
     2
     3Input: two elements `x` and `y` of the `poset` (type: `FinitePoset`).
     4
     5Output: an element of `poset` which is the meet of `x` and `y`, if the meet exists; `None` otherwise.
     6
     7Similar for `FinitePoset.join(x, y)`.
     8
     9
     10Currently, `FinitePoset._hasse_diagram` has `@lazy_attribute _meet` (resp. `_join`) and method `meet_matrix` (resp. `join_matrix`). However, they don't compute the matrix but raise an Error if the poset is not a meet/join-semilattice or if there is a pair of x and y whose meet doesn't exist.
     11
     12We propose to change `HasseDiagram._meet` (resp. `_join`) and `HasseDiagram.meet_matrix()` (resp. `join_matrix`), so that the `(x,y)`-entry of the matrix is `None` if the meet of `x` and `y` doesn't exist, instead of raising an Error. Then, we make the method `FinitePoset.meet(x, y)` (resp. `join(x, y)`) by applying the `_element_to_vertex` and `_vertex_to_element` conversions on `poset._hasse_diagram._meet[x, y]`.
    213
    314In addition, `FinitePoset` has the method `common_upper_covers`. We propose to implement the method `common_lower_covers` as well, for symmetry and completeness.