What does it mean for a definition to be covariant or contravariant? In this answer, Brian M. Scott lists different definitions of continuity, and for some of them mentions whether they are covariant or contravariant. I am familiar with these terms from subtyping in programming, but I haven't seen these terms applied to mathematical definitions before.
Some questions I have:


*

*What does it mean for a definition to be covariant or contravariant? Is there a precise definition or is it more informal?

*When can a definition be covariant or contravariant? What are some other examples of covariant or contravariant definitions?

*Is there a way to search for this usage of these terms? When I try to search for the application of these terms to definitions, the search engine (understandably) mistakenly assumes I am looking for the definitions of these terms.

 A: Brian Scott's usage of "covariant" and "contravariant" in that post is (as far as I know) entirely informal and it is not at all standard to use these terms to refer to definitions in the way he did.  He's just borrowing the terms from category theory: a covariant functor is a functor that preserves the directions of maps, and a contravariant functor reverses them.
So, when Brian says a definition of continuity is "covariant", he just means informally that it goes in the same "direction" as the map whose continuity you are verifying: you start with something in the domain of the map, and then get something in the codomain codomain after applying the map.  For instance, the sequences definition of continuity is covariant: you start with a convergent sequence in the domain, and then its image in the codomain must also converge.  On the other hand, a "contravariant" definition is one that starts in the codomain.  For instance, he calls the $\epsilon$-$\delta$ definition contravariant because it starts with $\epsilon$ which is relevant to the codomain (it is how close you want $f(x)$ and $f(a)$ to be) and then demands that you can always find a corresponding $\delta$ for the domain.  The open sets definition of continuity is similarly contravariant: you start with an open set in the codomain, and then its preimage in the domain must be open.
