I’m only beginning to learn about schemes, but I know that at least in some cases, the dimension of a scheme (or variety) is 1 less than the length of the longest chain of irreducible closed subsets.
For (let’s say real, smooth) manifolds, this definition doesn’t work: all closed sets are reducible unless they are points. But what if we replace “irreducible closed sets” with “connected compact (c.c.) submanifolds (without boundary)”? It seems that c.c. manifolds are somewhat similar to irreducible closed sets in that they cannot be written as finite unions of other c.c. (proper)submanifolds not equal to themselves (I think). Does this idea lead anywhere interesting / is there a source that discusses dimension from this perspective (or can the validity thereof be disproven)?
The obvious follow up is: given a smooth manifold X, does the ideal of smooth, real valued functions on X which vanish on a given c.c. submanifold Y have any “nice” properties analogous to prime ideals (of course in the ring of smooth functions on X, this ideal itself is unfortunately not actually prime... but maybe something comparable but weaker? Or maybe this works better in the real analytic case?)
I'm able to answer some of this question now.
You don't need to restrict to compact, connected submanifolds. You can just look at closed submanifolds. Everything I'll be discussing will be in the smooth case.
Define a submanifold to be m-reducible if it can be written as a finite union of two closed, proper submanifolds. We see that this matches the typical topological definition of reducibility, but that we're only considering decomposition into submanifolds, not arbitrary closed sets. Then, we claim that the dimension of a manifold M is equal to the length of the longest proper chain of m-irreducible closed submanifolds, $M_1 \subsetneq ...\subsetneq M_n$. Call this number $\ell(M)$. We must show that $\ell(M) \leq dim(M)$ and $\ell(M) \geq dim(M)$.
We show that $\ell(M) \geq dim(M)$ first. Consider a manifold $M$ with dimension $n$. Take $M_n$ to be a connected component of $M$. This is clearly a closed submanifold of dimension $n$. Then, $M_n$ has a subset that is isomorphic to $\mathbb{R}^n$ by definition. But $\mathbb{R}^n$ contains $\mathbb{S}^{n-1}$ as a closed submanifold, so $M_n$ contains an isomorphic copy thereof. By minor abuse of notation, we write $\mathbb{S}^{n-1} \subsetneq M_n$, and we define $M_{n-1} = \mathbb{S}^{n-1}$. From here, we can just proceed by building a "chain of spheres", noting that the $n-1$ sphere has an $\mathbb{R}^{n-1}$ patch, and thus contains an $n-2$ sphere. So, a chain of length n is: $\mathbb{S}^1 \subsetneq ... \subsetneq \mathbb{S}^{n-1} \subsetneq M_n$. Are all of these m-irreducible? They are all connected, closed submanifolds. By invariance of domain, if they are m-reducible, their constituent closed pieces must open subsets. But this would then render them disconnected, which they are not. So, they are all m-irreducible, and we're done.
Now we want to show that $\ell(M) \leq dim(M)$. Suppose not: suppose there was some chain of closed submanifolds of $M$ longer than $n$. Clearly no manifold can have higher dimension than $n$, so (by the always helpful pigeonhole principle) a chain longer than n must have two closed submanifolds of M, call them $X$ and $Y$, with $X \subsetneq Y$ but $dim(X) = dim(Y)$ (note we haven't proven that they are at consecutive positions in the chain, it doesn't matter - all that matters is that one is contained in the other). Now, again by invariance of domain, the inclusion map is open, and so $X$ is open in $Y$. But $X$ is closed in $M$ by assumption, and so also closed in $Y$. Thus, $X$ is either all of $Y$ (which is disallowed), or it disconnects $Y$. But $Y$ being disconnected means that it is m-reducible ($X$ and $X^c$ are proper closed submanifolds), which is also a contradiction. So we cannot construct a chain longer than $n$. This fully completes the proof - the chain of m-irreducible submanifolds definition of dimension matches the traditional definition.
I can also give some partial information about the ideals $I(X) \subset \mathcal{C}^{\infty}(M)$ where $X$ is a submanifold (where $I(X)$ is the set of all maps which vanish on all of $X$). We've proven that the maximum chain length for chains of m-irreducible closed submanifolds is $n$, but it's well known that $M$ is not Noetherian - for example, if we take $M = \mathbb{R}$, then any closed interval can be written as a union of two smaller closed intervals. The only irreducible closed sets are points. However, closed intervals are not submanifolds - they are submanifolds with boundary. A key part of our construction was disallowing the use of submanifolds with boundary for decompositions of closed submanifolds. We know that the $I(X)$ are not prime if $X$ is not a point. But can we tell the difference between the ideals generated by manifolds, and those generated by manifolds with boundary? Yes: from Dominic Joyce's "Algebraic Geometry over $\mathcal{C}^\infty$-rings" (available at https://arxiv.org/pdf/1001.0023.pdf), Proposition 3.1, we can see that the ring of smooth functions on a manifold (without boundary) is finitely presented, while the ring of smooth functions on a manifold with boundary is not. Recall that for a submanifold $X$ of $M$, we have $\mathcal{C}^\infty (X) = \mathcal{C}^\infty (M) / I(X)$, so this implicitly gives us information about the ideal.