Semantic Foundations of Proof-search