# joinExists -- determines if the join exists for two elements of a poset

## Synopsis

• Usage:
j = joinExists(P, a, b)
• Inputs:
• P, an instance of the type Poset,
• a, , an element of the poset
• b, , an element of the poset
• Outputs:
• j, , whether the join exists for $a$ and $b$ in $P$

## Description

The join of $a$ and $b$ in $P$, if it exists, is the unique least element greater than both $a$ and $b$.

 i1 : P = poset {{a,b}, {a,c}, {a,d}, {c,e}, {d,e}}; i2 : joinExists(P, b, c) o2 = false i3 : joinExists(P, c, d) o3 = true i4 : Q = poset {{a,b}, {a,c}, {b,d}, {c,d}, {b,e}, {c,e}}; i5 : joinExists(P, b, c) o5 = false