I want to associate to a finite poset a simplicial complex Δ(P) and study homology(with coefficients in the rational numbers or a finite field) and the topological type of this simplicial complex using Sage. I have not yet used sage for this and wanted to ask whether there is an easy method to do this.
Let P be a a finite poset with at least two elements and for p∈P define two subsets as follows:
J(p):=(g∈P|p≰g) and I(p):=(g∈P|g≤p).
(here ( means { and ) means } but it seems that the set brackets can not be displayed here)
For a subset S of P (we view P also as set of its vertices) we then define
J(S):=⋂p∈SJ(p) and I(S):=⋃p∈SI(p).
We set J(∅)=P,J(P)=∅ and I(∅)=∅, I(P)=P.
Then the simplicial complex Δ(P) is defined as the set of all subsets S⊆P with J(Sc)⊆I(Sc), where fore a subset S⊂P we denote by Sc the complement of S in P.
I can obtain the sets J(p) and I(p) for elements but not for subsets in Sage, but I would think there is an easy trick.
Thanks for any help.