  We show that the family of standard simplices and the family of Stasheff
polytopes are dual to each other in the following sense.
  The chain modules of the standard simplices, resp. the Stasheff polytopes,
assemble to give an operad. We show that these operads are dual of each other
in the operadic sense. The main result of this paper is to show that they are
both Koszul operads. As a consequence the generating series of the standard
simplices and the generating series of the Stasheff polytopes are inverse to
each other. The two operads give rise to new types of algebras with 3
generating operations, 11 relations, respectively 7 relations, that we call
{\it associative trialgebras} and {\it dendriform trialgebras} respectively.
The free dendriform trialgebra, which is based on planar trees, has an
interesting Hopf algebra structure, which will be dealt with in another paper.
  Similarly the family of cubes gives rise to an operad which happens to be
self-dual for Koszul duality.

Algebraic Topology;Combinatorics;Rings and Algebras