I wrote:
the set of functions from [0,1] to {0,1} such that the pre-images of both 0 and 1 consist of finitely many points and intervals is something like an infinite dimensional polytope, and it seems to be trying to have Euler characteristic 1/2.
Replace [0,1] here by (0,1). (The mumbo-jumbo way to compute the Euler characteristic of the set of polyhedral maps from (0,1) to {0,1} is to take the Euler characteristic of {0,1} to the power of the Euler characteristic of (0,1) --- that's 2 to the power of -1, or 1/2.) And before you object that the Euler characteristic of the interval (0,1) is +1 rather than -1, let me hasten to add that the kind of Euler characteristic I'm using is not the usual homotopy-invariant kind, but a more naive sort that has different good properties (such as the property of being additive). To compute this kind of "combinatorial" Euler characteristic, think "V-E+F": for {0,1}, V-E+F = 2-0+0 = 2, while for (0,1), V-E+F = 0-1+0 = -1. Jim Propp