lecture notes for the third chapter by xi zhang 7161908