8.7 Drop Empty Structure from a Species

Type Constructor

NonEmpty

Usage

fill in

Description

A species constructor to remove structures on the empty set.

131adom: NonEmpty 131a  (55)
NonEmpty(F: SPECIES)(L: LabelType): CombinatorialSpecies L == F L add {
        Rep == F L;
        import from Rep;
        implementation: NonEmpty 131b
}

Defines:
NonEmpty, used in chunks 133c, 455, 652, 654, and 721.

Uses CombinatorialSpecies 71, LabelType 62, and SPECIES 55.
131bimplementation: NonEmpty 131b  (131a)  132a
structures(s: SetSpecies L): Generator % == generate {
        if not empty? s then for r in structures(s)$Rep repeat yield per r;
}

Uses Generator 617 and SetSpecies 117.
132aimplementation: NonEmpty 131b+   (131a)  131b  132b
isomorphismTypes(s: SetSpecies L): Generator % == generate {
        if not empty? s then {
                for r in isomorphismTypes(s)$Rep repeat yield per r;
        }
}

Uses Generator 617 and SetSpecies 117.
132bimplementation: NonEmpty 131b+   (131a)  132a  133a
local dropEmptyApproximateOrder(ao: SeriesOrder): SeriesOrder == {
        ao = infinity => infinity;
        zero?(ao :: I)$I => 1;
        ao;
}
local egsOrder(): SeriesOrder == {
        s := generatingSeries$F(L);
        dropEmptyApproximateOrder(approximateOrder s);
}
local egsNonEmpty(i: I): Generator Q == generate {
        yield 0$Q;
        s := generatingSeries$F(L) :: DataStream(Q);
        for c in elements(s, 1) repeat yield c;
}
generatingSeries: ExponentialGeneratingSeries == new(egsNonEmpty, egsOrder);

Uses DataStream 386, ExponentialGeneratingSeries 316, Generator 617, I 47, Q 47, and SeriesOrder 289.
133aimplementation: NonEmpty 131b+   (131a)  132b  133b
local ogsOrder(): SeriesOrder == {
        s := isomorphismTypeGeneratingSeries$F(L);
        dropEmptyApproximateOrder(approximateOrder s);
}
local ogsNonEmpty(i: I): Generator Z == generate {
        yield 0$Z;
        s := isomorphismTypeGeneratingSeries$F(L) :: DataStream(Z);
        for c in elements(s, 1) repeat yield c;
}
isomorphismTypeGeneratingSeries: OrdinaryGeneratingSeries == {
        new(ogsNonEmpty, ogsOrder);
}

Uses DataStream 386, Generator 617, I 47, OrdinaryGeneratingSeries 311, SeriesOrder 289, and Z 47.
133bimplementation: NonEmpty 131b+   (131a)  133a  133c
local cisOrder(): SeriesOrder == {
        s := cycleIndexSeries$F(L);
        dropEmptyApproximateOrder(approximateOrder s);
}
local cisNonEmpty(i: I): Generator P == generate {
        yield 0$P;
        s := cycleIndexSeries$F(L) :: DataStream(P);
        for c in elements(s, 1) repeat yield c;
}
cycleIndexSeries: CycleIndexSeries == new(cisNonEmpty, cisOrder);

Uses CycleIndexSeries 330, DataStream 386, Generator 617, I 47, and SeriesOrder 289.
133cimplementation: NonEmpty 131b+   (131a)  133b
import from String, Symbol, List SpeciesExpression;
expression: SpeciesExpression == apply(- "NonEmpty",
    [expression$F(L)]);

Uses NonEmpty 131a, SpeciesExpression 430, and String 65.