Patterns and algebra revision