In computer science, there is the (possibly informal) concept of writing predicates that are "closed". For example I might write (pseudocode):
i = 1;
while ( i != 23 ) {
...
i = i + 1;
}
This is not closed, because I could have something in the loop that results in i skipping over the value of 23.
What I should have written is a closed conditional expression such as the following:
while ( 0 < i && i < 23 )
All the desired values make the expression true, and all the undesired values make it false, and there are no extra values left unspecified: thus it's closed.
Can someone explain which types of mathematical closure are related to this concept, and a little bit about how they relate?