# labelPoset -- relabels a poset with the specified labeling

## Synopsis

• Usage:
Q = labelPoset(P, l)
• Inputs:
• P, an instance of the type Poset,
• l, , with $P.GroundSet$ as the keys and the new labels as the values
• Outputs:
• Q, an instance of the type Poset, a poset isomorphic to $P$

## Description

This method simply relabels the ground set of the poset based on given labeling.

 i1 : P = chain 5; i2 : l = hashTable { 1 => a, 2 => b, 3 => c, 4 => d, 5 => e}; i3 : Q = labelPoset(P, l); i4 : P.GroundSet o4 = {1, 2, 3, 4, 5} o4 : List i5 : Q.GroundSet o5 = {a, b, c, d, e} o5 : List

Clearly, $P$ and $Q$ areIsomorphic.

 i6 : P == Q o6 = true

• Poset _ ZZ -- returns an element of the ground set
• Poset _ List -- returns elements of the ground set
• indexLabeling -- relabels a poset with the labeling based on the indices of the vertices
• isomorphism -- computes an isomorphism between isomorphic posets
• naturalLabeling -- relabels a poset with a natural labeling

## Ways to use labelPoset :

• "labelPoset(Poset,HashTable)"

## For the programmer

The object labelPoset is .