It is perhaps well-known that ideas from mathematical logic (esp. model theory) can help solve problems in "main-stream" mathematics, e.g. using ideas from model theory to solve problems in algebraic geometry. However, all of those examples seem quite advanced.
Is there an accessible example of using logical ideas to solve problems in other areas of mathematics (including theoretical computer science)? I'm going to give a lecture to undergraduates and would really like to highlight this to them, and ideally the examples would be easily explainable to someone with only basic mathematical training.