We present the results of millimeter observations and a suitable chemical and radiative transfer model of the ( catalog AB Aurigae ) ( ( catalog HD 31293 ) ) circumstellar disk and surrounding envelope . The integral molecular content of this system is studied by observing CO , C ^ { 18 } O , CS , HCO ^ { + } , DCO ^ { + } , H _ { 2 } CO , HCN , HNC , and SiO rotational lines with the IRAM 30-m antenna , while the disk is mapped in the HCO ^ { + } ( 1-0 ) transition with the Plateau de Bure interferometer . Using a flared disk model with a vertical temperature gradient and an isothermal spherical envelope model with a shadowed midplane and two unshielded cones together with a gas-grain chemical network , time-dependent abundances of observationally important molecules are calculated . Then a 2D non-LTE line radiative transfer code is applied to compute excitation temperatures of several rotational transitions of HCO ^ { + } , CO , C ^ { 18 } O , and CS molecules . We synthesize the HCO ^ { + } ( 1-0 ) interferometric map along with single-dish CO ( 2-1 ) , C ^ { 18 } O ( 2-1 ) , HCO ^ { + } ( 1-0 ) , HCO ^ { + } ( 3-2 ) , CS ( 2-1 ) , and CS ( 5-4 ) spectra and compared them with the observations . Our disk model successfully reproduces observed interferometric HCO ^ { + } ( 1-0 ) data , thereby constraining the following disk properties : ( 1 ) the inclination angle \iota = 17 ^ { +6 } _ { -3 } \arcdeg , ( 2 ) the position angle \phi = 80 \pm 30 \arcdeg , ( 3 ) the size R _ { \mathrm { out } } = 400 \pm 200 AU , ( 4 ) the mass M _ { \mathrm { disk } } = 1.3 \cdot 10 ^ { -2 } M _ { \sun } ( with a factor of \sim 7 uncertainty ) , and ( 5 ) that the disk is in Keplerian rotation . Furthermore , indirect evidence for a local inhomogeneity of the envelope at \gtrsim 600 AU is found . The single-dish spectra are synthesized for three different cases , namely , for the disk model , for the envelope model , and for their combination . An overall reasonable agreement between all modeled and acquired line intensities , widths , and profiles is achieved for the latter model , with the exception of the CS ( 5-4 ) data that require presence of high density clumpy structures in the model . This allows to constrain the physical structure of the AB Aur inner envelope : ( 1 ) its mass-average temperature is about 35 \pm 14 K , ( 2 ) the density goes inversely down with the radius , \rho \propto r ^ { -1.0 \pm 0.3 } , starting from an initial value n _ { 0 } \approx 3.9 \cdot 10 ^ { 5 } cm ^ { -3 } at 400 AU , and ( 3 ) the mass of the shielded region within 2 200 AU is about 4 \cdot 10 ^ { -3 } M _ { \sun } ( the latter two quantities are uncertain by a factor of \sim 7 ) . Also , evolutionary nature and lifetime for dispersal of the AB Aur system and Herbig Ae/Be systems in general are discussed .