Marr's theory of the cerebellar cortex as an associative learning device is one of the best examples of a theory that directly relates the function of a neural system to its neural structure. However, although he assigned a precise function to each of the identified cell types of the cerebellar cortex, many of the crucial aspects of the implementation of his theory remained unspecified. We attempted to resolve these difficulties by constructing a computer simulation which contained a direct representation of the 13 000 mossy fibres and the 200 000 granule cells associated with a single Purkinje cell of the cerebellar cortex, together with the supporting Golgi, basket and stellate cells. In this paper we present a detailed explanation of Marr's theory based upon an analogy between Marr's cerebellar model and an abstract model called the associative net. Although some of Marr's assumptions contravene neuroanatomical findings, we found that in general terms his conclusion that each Purkinje cell can learn to respond to a large number of different patterns of activity in the mossy fibres is substantially correct. However, we found that this system has a lower capacity and acts more stochastically than he envisaged. The biologically realistic simulated structure that we designed can be used to assess the computational capabilities of other network theories of the cerebellum.