Patents encourage monopolisation by harming smaller companies more than large conglomerates. Small companies either take their chances and risk being sued out of existence or actively avoid patent infringement, wasting resources and limiting innovation.
If anything, patents discourage knowledge sharing because showing your work opens you up to liability for violating patents you may have been unaware of. The only form of "knowledge sharing" patents seem to encourage is filing patents, which only becomes "knowledge sharing" when they expire many years later.
EDIT: The most frequently cited counter-example is historical: guilds keeping trade secrets to prevent outsiders from just copying them. But this is meant to associate all the negative associations we have with that time and its level of technology with the absence of patents without doing the actual work of establishing anything resembling a causal relationship.