For a connected $n$-manifold $M$, the Lie algebra of all smooth vector fields is denoted by $\chi^{\infty}(M)$. For a point $p\in M$ we define $L\_{p}=\{X\in \chi^{\infty}(M)\mid X(p)=0\}$. Of course $L\_{p}$ is a Lie subalgebra of $\chi^{\infty}(M)$ whose codimension is equal to $n$.



> 
> Is it true that every codimension-$n$ Lie subalgebra of $\chi^{\infty}(M)$ is necessarily in the form of (or isomorphic to) $L\_{p}$ for some $p\in M$?
> 
> 
> 


[Here](https://mathoverflow.net/questions/244940/the-minimum-codimension-of-lie-subalgebra-of-chi-inftym) is a related post.



Lie subalgebras of $\chi^{\infty}(M)$ of codimension $n = \dim M$
Correction:
===========


The argument I gave initially is wrong. I treated $\mathfrak X(M)'$ like the space of differential forms. Only operations on $\mathfrak X(M)$ go over to the dual as (negative) adjoint operations, so $\mathcal L\_X$ makes sense but $i\_X$ and $d$ do not. Since it created some interest I leave the old answer.


Corrected argument:
===================


Let $\alpha$ be a 1-form on $M$ which is non-zero and closed near a point $p$ in $M$. Then consider the current $\alpha. \delta\_p \in \mathfrak X(M)'$ where $\delta\_p$ is the Dirac delta. Consider the the space 
$$
L^{\alpha}\_p = \{X\in \mathfrak X(M): \mathcal L\_X(\alpha. \delta\_p)=0\}
$$
Let us compute this space. The question is local, so we assume that we are in $\mathbb R^n$ and $p=0$.
Since $\mathcal L\_X$ acts as the negative adjoint, for an arbitrary field $Y$ we have 
$$
0=\langle Y, \mathcal L\_X(du^1.\delta\_p)\rangle = 
-\langle \mathcal L\_XY, du^1.\delta\_p\rangle = -[X,Y]^1(0) = \big(-(\partial\_iY^1(0))X^i(0) + (\partial\_iX^1(0))Y^i(0)\big)\partial\_1
$$
Running $Y$ through a basis of $T\_0M$ with $\partial\_i Y(0)=0$ for all $i$
implies that $\partial\_i X^1(0)=0$ $ \forall i$. 
Choosing $Y$ with $Y(0)=0$ in such a way that $dY^1$ runs through a basis of $T\_0^\*M$, implies $X^i(p)=0$. The converse is also true, thus 
$$
L^{\alpha}\_0 = \{X\in \mathfrak X(\mathbb R^n): dX^1(0)=0, X(0)=0 \}
$$
which has codimension $2n$, SIGH.


Remark, and proof of the statement in the question:
===================================================


[In a related question](https://mathoverflow.net/questions/244940/the-minimum-codimension-of-lie-subalgebra-of-chi-inftym) it was hinted that the determination of all the maximal ideals of $\mathfrak X(M)$ would be of interest. These are all of infinite codimension and are of the form: For a point $p$ in $M$ consider all vector fields $X$ which vanish at $p$ of infinite order. Here $M$ should be compact or $\mathfrak X(M)$ should be replaced by the space of vector fields with compact support. This is proved by Purcell and Shanks: For a related result and references see 


* MR0516602 Grabowski, J. Isomorphisms and ideals of the Lie algebras of vector fields. Invent. Math. 50 (1978/79), no. 1, 13–33.


In fact, this paper contains a proof of your question:
Let $M$ be compact or replace $\mathfrak X(M)$ by the Lie algebra $\mathfrak X\_c(M)$ of vector fields with compact support. So let $A=C^\infty\_c(M)$ and let $\mathcal L = \mathfrak X\_c(M)$. By Proposition 3.6, they satisfy the assumtions of the following theorem.


Theorem 5.1. Let $A$ be an $I$-algebra and let $\mathcal L$ be an admissible $A$-Lie module. Then for each maximal-prime finite-codimensional ideal $J$ of $A$ the Lie subalgebra $\mathcal L\_J$ of 
$\mathcal L$ is maximal finite-codimensional and the mapping
$\mathfrak M\_A \ni J \mapsto \mathcal L\_J\in \mathfrak M\_{\mathcal L}$
is a bijection.


Since $\mathfrak M\_A = \{A\_p: p\in M\}$ and $\mathcal L\_J =\{X\in \mathcal L: X(A)\subset J\}$, the result follows. 
For notation see Grabowski's paper.


Old, wrong answer:
==================


Here is a counterexample: Let $\alpha$ be a 1-form on $M$ which is non-zero and closed near a point $p$ in $M$. Then consider the current $\alpha\otimes \delta\_p \in \mathfrak X(M)'$ where $\delta\_p$ is the Dirac delta. Consider the space of all $X\in\mathfrak X(M)$ with $i\_X(\alpha\otimes\delta\_p) = 0$ and $\mathcal L\_X(\alpha\otimes\delta\_p) = 0$. Since $i\_{[X,Y]} = [i\_X,\mathcal L\_Y]$ and $\mathcal L\_{[X,Y]} =[\mathcal L\_X,\mathcal L\_Y]$, this space is a Lie algebra.
Its codimension is 2.


More detail:
Choose a Riemannian metric $g$ on $M$ and and consider a chart $(U,u)$ centered at $p$ such that $\alpha|\_U = du^1$. Then 
$0 = i\_X(du^1\otimes\delta\_p) = du^1(X)(p)= X^1(p)$
and 
$0=\langle Y, \mathcal L\_X(du^1\otimes\delta\_p)\rangle 
= \langle Y, (i\_Xd + di\_X) (du^1\otimes\delta\_p)\rangle
= -\langle Y, i\_X(du^1\wedge d\delta\_p)\rangle
= -X^1(p) \text{div}(Y)(p) + Y^1(p) \text{div}(X)(p).
$


Since $X^1(p)=0$ and $Y$ is arbitrary, we see that the Lie subalgebra is given by $\{X: X^1(p)=0, \text{div}(X)(p)=0\}$ and thus has thus has codimension $2$. The divergence is with respect to the density of $g$. 


One can also use $\text{div}(f.X) = f\text{div}(X) + g(\text{grad}^g(f),X)$ to make a more local computation. 


