Introduction to Pattern Theory