Electronic ground-state properties of planar, periodic, infinite polythiophene chains are calculated using a first-principles density-functional method. The author concentrates on a set of geometries differing in the size of the carbon-carbon bond length alternation along the backbone, thus studying a transition between a quinoid and an aromatic structure. Whereas the lowest unoccupied orbitals are found to have pi symmetry the author finds valence energy bands of sigma symmetry unusually close to the Fermi level. It is demonstrated that the valence band structures offer a consistent interpretation of experimental photoelectron spectra. An important result is the lack of a band-gap closure when passing from the aromatic to the quinoid structure, although the band gap is diminished. The results are used in deriving a model Hamiltonian with which the author subsequently studies the pi -electron density of states for solitonic and polaronic excitations. The above-mentioned lack of band-gap closure leads to the absence of near-mid-gap states for solitons. Polarons induce states asymmetric in the gap and, comparing with experimental results for doped and photo-excited polythiophene, the author estimates the width of the polaron to be large (of the order of eight thiophene units which, however, might be slightly modified when including correlation effects), and suggests that bipolarons and not polarons are the charge carriers in doped polythiophene in the dilute limit.