Adds solve function and solve' definition.