Expand linear expressions