ON SEMICONTINUITY OF REAL FUNCTIONS: AN ALGEBRAIC DESCRIPTION