If we have the functional equation $F(t, f) = 0$ with $F$ being linear in $f$ where the solutions are required to be $n$ times differentiable (for example an $n$th order liner differential equation, but not limited to it) and if we know that on an open interval $I$, around any point $t\in I$ there is an interval included in $I$, on which the solution space of the equation has dimension $n$, then is it true that the solution space on $I$ has dimension $n$ as well?
I managed to prove it for the case $n=1$:
Denote an interval around a point $t\in I$ on which the solution space is $n$ by $\newcommand{\DN}{\mathop{\rm DN}\nolimits} \DN(t)$ and call any interval with this property a "DN interval".
Take two DN intervals $T_1$ and $T_2$ such that $T_1\cap T_2\ne\varnothing$
Let $f$ be a solution defined on $T_1$ and $g$ another solution defined on $T_2$.
Take $t^* \in T_1\cap T_2$ and we observe that since the solution space on $T := \DN(t^*)$ has dimension $1$, the restrictions $f|_{T},\ g|_{T}$ are linearily dependent.
Write $(f|_{T})(t) = \lambda (g|_{T})(t)$. Define the function $h$ on $J = T_1\cup T_2$ by
$$ h(t) = \begin{cases}f(t), & t \in T_1 \\ \lambda g(t), & t \in T_2 \end{cases}$$
This new function is differentiable and is a solution to the equation on $J$.
Now, if we take another solution $s$ on $J$, $s|_{T_1} \propto f|_{T_1}$ and $s|_{T_2} \propto g|_{T_2}$, then $s(t^*) = \mu f(t^*) = \mu\lambda g(t^*)$ so the proportionality constants are $\mu$ and $\mu\lambda$. We see that $s(t) = \mu h(t)$, hence the solution space on $J$ has dimension $1$.
It is rather easy to see that if $T_1\cap T_2=\varnothing$ instead, the solution space on $J$ still has dimension $1$.
The above proves (for $n=1$) that the union of two DN intervals is a DN interval. Since $I = \displaystyle{\bigcup_{t\in I}\DN(t)}$, the solution space on $I$ has dimension $1$.
Can this proof be generalised for $n > 1$? If it's not true, please provide a counterexample.
PS: please check the tags, I'm not quite sure what tags are suitable for this question.
Update: When the 2 intervals are disjoint, the solution space on their union doesn't necessarily have dimension $n$. This issue can be solved, check the last part of my self-answer (the part with a partition of $I$).
Update 2: I think one more condition is necessary: the interval on which the solution space has dimension $n$ around any point can be as small as you need. Otherwise, $\DN(t^*)$ might actually be a superset of $T_1 \cup T_2$.
Ok, I got it. The above proof can be generalized, and the process I used to "extend" a solution to a larger interval works because of the fact that due to the of the property of $I$, linearly-independent solutions stay linearly-independent on smaller intervals and this was my principal concern. Here's what I mean:
Again, let $T_1$ and $T_2$ be two non-disjoint intervals on which the solution space is $n$-dimensional. Take a basis $\{f_i\}_{i=1}^n$ of the solution space on $T_1$ and $\{g_i\}_{i=1}^n$ a basis of the solution space on $T_2$.
Let $t^* \in T_1\cap T_2$ and denote $T^* := \newcommand{\DN}{\mathop{\rm DN}\nolimits}\DN(t^*)$. Also, consider a basis $\{g_i^*\}_{i=1}^n$ of the solution space on $T^*$.
We will now show that $\{g_i|_{T^*}\}_{i=1}^n$ is a basis on $T^*$. This was my problem with generalising the proof, as I have already had the general idea. Since $\forall j=\overline{1,n}\hspace{4mm}\{g_i^*\}_{i=1}^n\cup\{(g_j|_{T^*})\}$ are linearily dependent, we can write $g_j = \sum_{i=1}^n \lambda_{j,i}\ g_i^*$. Suppose $\{g_j|_{T^*}\}_{j=1}^n$ are linearly-dependent, then there exist constants $(\mu_j)_{j=1}^n$ such that $\sum_{j=1}^n \mu_j\ (g_j|_{T^*}) = \sum_{j=1}^n \sum_{i=1}^n \mu_j \lambda_{j,i}\ g_i^* = \sum_{i=1}^n\left(\sum_{j=1}^n \mu_j\lambda_{j,i}\right)g_i^* = 0$ which contradicts the linear-independence of $\{g_i^*\}_{i=1}^n$.
Now that we know that $\{g_i|_{T^*}\}_{i=1}^n$ are a basis on $T^*$, for all $j=\overline{1,n}$ we have $f_j|_{T^*} = \sum_{i=1}^n \eta_i\ (g_i|_{T^*})$. Now, we can construct the basis on $J := T_1 \cup T_2$. Define $h_i$ on $J$ as $$ h_i(t) = \begin{cases} f_i(t), & t \in T_1 \\ \sum_{i=1}^n \eta_i\ g_i(t), & t \in T_2 \end{cases} $$ Since these functions are linearly independent on $T_1$, they are linearly independent on $J$.
Similarily, take another solution $s$ on $J$, we have that $s|_{T_1} = \sum_i \delta_i \ (f_i|_{T^*})$ and $s|_{T_2} = \sum_i \gamma_i \ (g_i|_{T^*})$ and $s(t^*) = \sum_j \delta_j \ f_j(t^*) = \sum_j\sum_i\delta_j\eta_i\ g_i(t^*) = \sum_i\left(\sum_j\delta_j\eta_i\right)g_i(t^*)$, so $\gamma_i = \sum_j \delta_j\eta_i$. Then, $s = \sum_j \delta_j h_j$.
I will come back with a way to construct a partition of $I$, $\{P_i\}_{i=1}^m$ such that $P_i \cap P_{i\pm 1} \ne \varnothing$, $P_i$ and $P_{i\pm 1}$ are not one a subset of the other and $\bigcup_{i=1}^m P_i = I$ where all $P$s are what I called "DN intervals".
Update - here it is:
First, I want to prove that the property that $I$ has works with $K=I\cup\{\inf I, \sup I\}$ too. Let $H = \{ t\in K\ | \exists \epsilon > 0, (t-\epsilon, t+\epsilon)\cap I \text{ is a DN interval } \}$. It's easy to see that $H$ is clopen in $K$ and $K$ is an interval, so it's connected. Then $H=K$.
Now, denote two DN intervals at either side of $I$ by $P_0$ and $P_1$.
Define a variable $P = \{\}$. We can use the following recursive algorithm to form a partition of $I$:
The termination conditions of the two recursive steps are satisfied because the sequences defined reccurently by $a_1 = x_1, a_{n+1} = \frac{a_n-x_0}{2}$ and $b_1 = x_0, b_{n+1} = \frac{x_1-b_n}{2}$ converge to $x_0$ and $x_1$ respectively, so, at some point during the first recursive step, $x \in Q$ and at some point during the second recursive step, $x \in R$.
Hence, after applying the algorithm with inputs $P_0$, $P_1$, we have that $P$ is a finite partition of $I$ where for all classes there exist exactly 2 other classes that are non-distjoint with it, except for $P_0$ and $P_1$ for which there is only 1 such class. We can order this partition such that the first class is $P_0$, the last one is $P_1$ and every other class is placed between the other 2 non-disjoint with it. All classes in the partition are DN and taking the union of the whole partition in order result that the solution space on $I$ has dimension $n$.