To clarify my formalism, let me give an example, slightly more complicated then the one with the chairperson and the secretary. Again, assume that we have an association with 10 members, but in this case 5 men and 5 women. The association shall elect a board with 4 members, one chairperson, one vice chairperson, one secretary, and one treasurer. According to the statutes, the chairperson and the vice chairperson must have different sexes, and no person can uphold more than one of these four positions. There are no other restrictions of how the board can be composed.
In how many ways can the board be composed?
This can be viewed as a task to be performed in 4 steps:
1. Elect a chairperson.
2. Elect a vice chairperson.
3. Elect a sectretary.
4. Elect a treasurer.
With my formalism in this case, ##n=4## = the number of steps (selections), ##M## = the set of members of the association. Each possible board is represented as a function ##f: D_4\to M##, with ##f(1)## = the chairperson, ##f(2)## = the vice chairperson, ##f(3)## = the secretary, and ##f(4)## = the treasurer, for the particular possible board represented by ##f##. ##S## is the set of all possible boards, and the question above is equivalent to asking what the cardinality of ##S## is.
For each ##k## (##1\le k\le 4##), ##p(k)## = the number of persons which can be elected to the ##k##:th position, after the first ##k-1## positions are filled. Thus:
##p(1)=10## (anyone of the 10 members),
##p(2)=5## (the 5 women if the elected chairperson is a man, the 5 men if the elected chairperson is a woman),
##p(3)=8## (anyone of the 8 persons elected to neither chairperson nor vice chairperson),
##p(4)=7## (anyone of the 7 persons not elected to any of first three positions).
To see how this with restrictions and extensions works, suppose, for example, that the chairperson and vice chairpersons are already elected, let's say their names are Jack and Jane, but not the remaining two positions. This partial board with Jack and Jane is represented by a function ##g: D_2 \to M##. It can be completed to a full board in 8*7=56 ways, represented by 56 functions ##f\in S##. ##g## is then a restriction of each of these 56 functions.
In completing this Jack+Jane partial board, a secretary is first to be elected. When a sectretary is elected, we get a larger partial board, which is represented by a function ##h: D_3\to M## (Jack+Jane+some secretary). Any such function ##h## is an extension of ##g##, and a restriction of 7 functions ##f \in S##, representing full boards containing Jack, Jane, the same secretary as in the ##h##-case, and some treasurer. There are ##p(3)=8## such functions ##h##, one for each possible secretary which can be added to the Jack-Jane partial board. ##T_g## is the set of these 8 functions in this case (for which ##k=3##), so the cardinality of ##T_g## is ##p(3)=8##.
The claim is then, in this case, that the caridinality of ##S##, i.e. the number of possible boards, is ##p(1)\,p(2)\,p(3)\,p(4)=10*5*8*7=2800##.
I hope it is a little more clear now...