I'm going through a real analysis course, and i noticed that every theorem we've seen about open sets can be transformed into a theorem about closed sets and vice versa. Here's an example:
Let $(X, d)$ be a metric space and consider $A \subset X$, $B \subset X$. Then:
$$ Int(A) \cap Int(B) = Int(A \cap B) $$ $$ Int(A) \cup Int(B) \subset Int(A \cup B) $$
Now, if you consider the complement of both relations:
$$ Int(A) \cap Int(B) = Int(A \cap B) $$ $$ \Rightarrow (Int(A) \cap Int(B))^c = (Int(A \cap B))^c $$ $$ \Rightarrow Cl(A^c) \cup Cl(B^c) = Cl(A^c \cup B^c) $$ $$ Int(A) \cup Int(B) \subset Int(A \cup B) $$ $$ \Rightarrow (Int(A) \cup Int(B))^c \supset (Int(A \cup B))^c $$ $$ \Rightarrow Cl(A^c) \cap Cl(B^c) \supset Cl(A^c \cap B^c) $$
You end up with a very similar theorem but with closure of sets:
$$ Cl(A) \cup Cl(B) = Cl(A \cup B) $$ $$ Cl(A \cap B) \subset Cl(A) \cap Cl(B) $$
Another example is that $Int(A)$ is the maximum open set contained on $A$, while $Cl(A)$ is the minimum closed set that contains $A$.
One last example is continuity of metric spaces. A function from a metric space $(X,d)$ to another metric space $(Y,\lambda)$ is continuous if and only if the preimage of every open set on Y is open on X. The same function is also continuous if and only if the preimage of every closed set on Y is closed on X.
This duality, at least with the theorems i've seen, seems to tell that open sets and closed sets really behave the same way.
I know that, if you consider continuous functions on real numbers, each function will have a maximum and a minimum on a closed interval, but this doesn't always apply on open intervals.
However, the real numbers along with absolute value is only one metric space, in which axioms of real numbers apply. This isn't true for every metric space.
So, i want to consider only definitions and theorems that apply to every metric space. This is (informally speaking because i don't know about mathematical logic, if i'm wrong correct me or ignore this), i want to consider only the axiomatic system of metric spaces and it's theorems, not theorems that only some models verify along with other axioms.
Since you can't use real number axioms on every metric space, the extreme value theorem isn't a counter-example to my question, it's not intrinsic to metric spaces in general.
Finally, the question is: Considering only statements that are true for every metric space, do open and closed sets actually behave the same way?