A patient with end-stage liver disease is admitted with worsening confusion, lethargy, and asterixis.
The serum ammonia level is elevated.
The nurse anticipates administering lactulose.
What is the primary therapeutic mechanism of action for this medication?