Fundamental approach to discrete mathematics