`posets/text/distributive` := TEXT(
` `,
`FUNCTION:  distributive - test distributivity of lattices`,
` `,
`CALLING SEQUENCE:  distributive(L);    distributive(L,'S');`,
`                   distributive(L,X);  distributive(L,X,'S');`,
`                   distributive(L,n);  distributive(L,n,'S');`,
` `,
`PARAMETERS:  L = a lattice`,
`             X = a set (the vertex set)`,
`             n = a positive integer (the number of vertices)`,
`             S = a name (optional)`,
`   `,
`SYNOPSIS:`,
`  A lattice L is distributive if the meet and join operations satisfy`,
`  the distributive laws, or equivalently, if L is isomorphic to J(P),`,
`  where P is the subposet of L formed by its join-irreducible elements.`,
`   `,
`  distributive(L) returns true or false according to whether the lattice L`,
`  is distributive. The procedure *does not* verify whether L is a lattice.`,
`  distributive(L,X) does the same, if X is the vertex set of L. `,
`  distributive(L,n) does the same, if {1,...,n} is the vertex set of L. `,
`   `,
`  If the last argument is an unassigned name S, then the procedure will`,
`  return true or false as above, and in addition, assign to S the set of`,
`  join-irreducible elements of L.`,
`   `,
`  The algorithm for testing distributivity is based on a criterion of`,
`  Greene and Markowsky: L is distributive if and only if it is (a) ranked,`,
`  and (b) the rank of L equals both the number of join irreducibles and`,
`  the number of meet irreducibles.`,
` `,
`EXAMPLES:`,
`  L:=chain(3) &* chain(2);`,
`  distributive(L,'S'),S;            yields          true, {2,3,4}`,
`  P:=subposet(L,S);`,
`  isom(J(P,S),L);                   yields              true`,
`  L:=({},1) &+ ({},3) &+ ({},1);`,
`  distributive(L);                  yields              false`,
` `,
`SEE ALSO:  J, lattice, meet, modular, ranked, subposet`,
NULL):

if `+`(0)=0 then # Maple V.4 or later
  print(INTERFACE_HELP(insert, topic=`posets/distributive`,
  helpfile=HomeLib, text=`posets/text/distributive`))
elif ceil(0)=0 then # Maple V.2 or V.3
  `help/posets/text/distributive`:=`posets/text/distributive`:
  save `help/posets/text/distributive`, cat(HomeLib,`/help/posets/text/distributive.m`)
fi:
