Closed p -adic rings and rings of definable functions