I've noticed some similarities between the story of completing a metric space and taking algebraic closure of a field. My question is whether these two stories can be generalized.
Metric space
Fix a metric space $(X, d_X)$. Consider isometries from it to other metric spaces (i.e. the under category).
- Every isometry $(X, d_X) \to (Y, d_Y)$ is continuous and injective.
- Given isometry $\varphi : (X, d_X) \to (Y, d_Y)$, say the closure is the map $\overline{\varphi} : (X, d_X) \to \left(\overline{\varphi(X)}, d_Y|_{\overline{\varphi(X)}}\right)$.
- Taking closure (2) is idempotent.
- Say isometry $\varphi : (X, d_X) \to (Y, d_Y)$ is "dense" if $\varphi = \overline{\varphi}$ (2) (i.e. the range is dense in the codomain).
- Say $(Z,d_Z)$ is "complete" if every Cauchy sequence converges.
- If isometry $(X, d_X) \to (Y, d_Y)$ is dense (4) and isometry $(X, d_X) \to (Z, d_Z)$ has complete codomain (5) then there is an isometry $(Y, d_Y) \to (Z, d_Z)$ making the diagram commute (i.e. a morphism in the under category).
- Say isometry $(X, d_X) \to (Y, d_Y)$ is a "completion" if it is dense (4) and has complete domain (5).
- Given isometry $\varphi: (X, d_X) \to (Z, d_Z)$ with complete codomain (5), we can take its closure $\overline{\varphi}$ (2) to get a completion (7).
Field
Fix a base field $F$. Consider homomorphisms from it to other fields (i.e. the under category).
- Every field homomorphism $F \to K$ is injective.
- Given homomorphism $i : F \to K$, say the closure is the map $\bar{i} : F \to \text{integral closure of $i(F)$ in $K$}$.
- Taking closure (2) is idempotent.
- Say homomorphism $i : F \to K$ is "algebraic" if $i = \overline{i}$ (2) (i.e. every element of $K$ is algebraic over $F$).
- Say $L$ is "algebraically closed" if every non-constant polynomial over $L$ has a root in $L$.
- If $F \to K$ is algebraic (4) and $F \to L$ has algebraically closed domain (5) then there is a homomorphism $K \to L$ making the diagram commute (i.e. a morphism in the under category).
- Say $F \to K$ is an "algebraic closure" if it is algebraic (4) and the codomain is algebraically closed (5).
- Given homomorphism $F \to L$ with algebraically closed codomain (5), we can take its closure (2) to get an algebraic closure (7).
My thoughts
The maps in the metric space scenario are unique while the maps in the field scenario are highly non-unique. So reflective subcategory might be able to deal with the first one but not the second one; if we consider finite separable extensions then Galois category might be able to deal with the second one but certainly not the first one. However, I do not know much about Galois categories.