Background: The hierarchical clustering model of galaxy formation, particularly within the Cold Dark Matter theory for structure formation, makes many quantitative predictions about the evolution of galaxy masses and galaxy clustering properties. To a significant degree these theories (particularly the semi-analytic approach) are normalized to low redshift data. Tests of the models are then most powerful at increasingly high redshifts. There is widespread agreement that the "feedback processes" are difficult to handle and need observational guidance. Hierarchical models indicate that galaxy evolution works bottom-up: small structures form first. Recent observations suggest that, although the dark matter may assemble in this manner, stars form in large galaxies first. There is increasing evidence that the mass assembly of large galaxies takes place well beyond z=1. Recent work by the Gemini Deep Deep Survey (GDDS, Glazebrook et al. 2004) shows that most of the stellar mass in bright galaxies has already been assembled by z=1. Im et al. (2002) show that large ellipticals were already mostly in place at z=1, and that they were already old at this epoch. While these are very important results, and arguably in strong disagreement with the hierarchical model, these studies do not probe far enough out in redshift to find the epoch of mass assembly (z>2), nor do they go very far down the luminosity function of galaxies at z>1.5. In order to study the less massive galaxies which are more representative of the galaxy population as a whole, it is necessary to go deeper. We propose a deep AO imaging survey down to K_AB=25. This is 2-3 magnitudes deeper than the GDDS and the Las Campanas InfraRed Survey. Using the adaptive optics system of ALTAIR+NIRI on Gemini, we will get 0.08" FWHM images of galaxies, three times better in resolution than the space-based NICMOS images from HST and covering a larger area. The superb resolution of these AO images will enable us to observe galaxies as faint as K_AB=25 in one hour integrations. At these magnitudes, most of the objects are at z>1 (See Figure 1) and there is a significant population out to z=3-4. The targets will be selected in the CFHTLS Deep fields. These fields provide u'g'r'i'z' data down to about 26 AB magnitude (at this point in time) over four square degrees of sky. This ongoing survey will extend another magnitude deeper when it is completed, approaching the depth of the HDF. The multi-colour CFHTLS data already yield excellent photometric redshifts (Gwyn et al. 2004) which will be further refined with K data. The large size of the fields (1 degree = 30 Mpc at z=1) means that we can sample a range of local density environments from isolated field galaxies to galaxy clusters (each square degree of the CFHTLS images contains on the order of 10 galaxy clusters). Density maps of the fields are being prepared using photometric redshifts to split the fields into redshift slices and measuring the local surface density of galaxies in co-moving volumes of one Mpc in projected radius (Nuyten et al. 2004). In addition, one of the fields (the CFHTLS-D2) is embedded in the HST-ACS COSMOS public field. These high-resolution space-based data will provide morphologies in the optical (rest frame UV) which will complement the K band (rest frame optical) data we will obtain. Given our need for AO, the main driver of field selection must be the R(Vega)<13.5 guide stars in the square degree of each CFHTLS Deep Field. Each 22x22 arcsecond AO field covers about 0.1 square arcminutes, after allowances are made for the area swamped by the guide star itself. Picking subfields around the randomly placed guide stars means that we are sparsely sampling the area. This means that we take advantage of the large size of the CFHTLS fields to look at un-correlated parts of the universe and partially avoid the problems with cosmic variance. The observations in the current proposal will address three aspects of galaxy evolution: Merging, morphology and mass-buildup. -Merger rates: One relatively robust prediction of hierarchical models is the evolution of the two-point correlation function, which at the small scale end is simply the close galaxy pairs. These pairs are the precursors to merging events which play a central role in determining the evolution of galaxy masses, star formation, and galaxy morphology. Close pairs have been used to estimate the galaxy merger rate and its evolution at z < 1.5 (e.g., Patton et al 2000, 2002, Le Fevre et al. 2000; Carlberg et al. 2000, Bundy et al. 2004). All of these studies indicate that the merger rate rises with redshift. These studies extend out to z<1.5; so far, no pair-fraction study has gone beyond this. One of the central goals of this proposal is to make comparable measurements at high redshift (1.5 1.5, and will allow us to discern between the wide range of predictions yielded by current measurements of the merger rate. -Morphology studies: The era before z=1 studied in this survey is an interesting one for galaxy morphology. At z>2 most galaxies show very disturbed morphologies while at z<1 most of the standard Hubble "tuning fork" sequence of morphologies is largely in place. There are a number of studies (eg. Abraham et al. 1996, Im et al 2002) which use quantitative morphology methods to study this evolution. All of these studies used images in optical bands. At z>1, even fairly red optical bands show the galaxy in the rest frame UV, where the transitory effects of starbursts dominate the morphology. By switching to the infrared we can study the underlying structure of galaxies. The quantitative morphology software package, GIM2D (Simard et al. 2002), decomposes the image of a galaxy into its components (a bulge and a disk),computes the relative contributions of each component to the total light of the galaxy and the properties of each component (e.g disk scale length). We would use this software to trace the change of various morphological properties with redshift and environment. For example, we will be able to follow the growth of disk scale length as a function of time and the degree to which local density influences the formation of ellipticals. Selecting the sample in K is uniquely suited to finding red, dust-enshrouded disk galaxies. A few have been found in a cluster at z=1.27 (Wu et al 2003). Finding some of these objects would help bridge the gap between the normal star-forming galaxies found in the optical and the extremely obscured, dusty objects that show up as SCUBA sources. As mentioned earlier, the CFHTLS-D2 field will have extensive HST optical imaging. One can combine the two data sets by generating a model for the morphology of a given galaxy in the K band and subtracting this model from the HST image of the same galaxy. The resulting image gives a picture of the location of star formation in that galaxy. -Mass-build up: The UV and blue light from galaxies is dominated by short-lived, high mass stars and is therefore a poor indicator of stellar mass. The red/IR light from galaxies comes from longer-lived objects is therefore a much better tracer of mass. Although there is a direct correlation between K-band luminosity and stellar mass, the fitting methods used by Glazebrook et al. (2004) and Dickinson et al. (2003) are a better approach. In these methods, spectral energy distributions (SED) are modelled with a variety of star formation histories. The actual SED of a galaxy is determined from its colours and compared to the synthetic SEDs to determine its star formation history and therefore its current stellar mass. This fitting process has been shown to not be degenerate with photometric redshift. Having determined accurate mass measurements for these objects a number of studies will be possible. The most obvious of these is to observe the evolution of the mass function over time. The 400 galaxies that will be surveyed will allow us to split the sample into photometric redshift bins. If the naive interpretation of the hierarchal model is correct, then high redshift bins will be bottom heavy with respect to the low redshift bins. If the top down model is correct, the high redshift mass function will have a deficit of low mass objects. In order to be able to make definitive statements about the low-mass end of the mass function, it is absolutely vital to have deep K-band images; the K_AB=25 observations we propose extend 4 magnitudes below the K-band equivalent of L_* at z=1 and 2 mags below K* at z=3. Finally, adding deep spectroscopy to the imaging provides a much richer dataset. In a subsequent proposal we will undertake AO spectroscopy using Altair+NIFS for a subset of the objects to create a redshift survey between 2 and 3 magnitudes deeper than any other K selected sample.