Failures of Nakayama's lemma or Krull theorem In this  post, if $I$ is a finitely generated ideal of a commutative ring $A$ with 1 such that $I^2=I$, then we know $I$ is principal. To answer this question without using Nakayama lemma, I have a complicated method, first reduce to Noetherian case, then apply Krull intersection theorem(Artin Rees lemma) (In fact, by this method we can induce Nakayama's lemma.) Finiteness is essential, see :
Let $A=\prod_{i\in \mathbb{N}}\mathbb{Z}/2\mathbb{Z}$, $I=\bigoplus_{i\in\mathbb{N}}\mathbb{Z}/2\mathbb{Z}$, $\mathfrak{m}$ be a maximal ideal containing $I$. Then $\mathfrak{m}^2=\mathfrak{m}$, $I^2=I$, but neither $I$ nor $\mathfrak{m}$ can be finitely generated. Unfortunately, $A$ is an absolutely flat ring, localized at any prime will become a field.

I am interesting to find some  examples as follow required.

*

*Find a local ring $(A,\mathfrak{m})$, such that $\cap_{n\in\mathbb{N}}\mathfrak{m}^n\neq 0$.

*Furthermore, find $A$ satisfying (1) such that $A$ is a domain and $\mathfrak{m}$ is finitely generated .

*Find an (integral) local ring $(A,\mathfrak{m})$  with $\mathfrak{m}^2=\mathfrak{m}\neq 0$

 A: Every valuation ring $(A,m)$ with $m$ not finitely generated is an example for point 3: for every element $x \in m\setminus 0$ the ideal $Ax$ is not equal to $m$. Hence there exists $y\in m\setminus Ax$. The ideals of a valuation ring are totally ordered with respect to inclusion, thus $Ax\subset Ay$ as asserted.
As for 1 and 2: there are valuation domains of Krull dimension 2 say, with $m=At$. Let $p$ be the prime ideal of height $1$. Then for every $n\in\mathbb{N}$ either $p\subseteq At^n$ or $At^n\subseteq p$. But the second case implies the contradiction $t\in p$.
Example for points 1 and 2: consider the polynomial ring $k[x,y]$ over some field $k$ and define $A$ to be the set of those rational functions $f\in k(x,y)$ that can either be written as $f=\frac{x^kz}{n}$, where $k\in\mathbb{N}$ and $z,n\in k[x,y]$ are not divisible by $x$, or as $f=\frac{y^lz}{n}$, where  $l\in\mathbb{N}$ and $z,n\in k[x,y]$ are not divisible by $x$ and $y$. Then $A$ is a valuation ring: if $f\in k(x,y)$ does not have the first form and $\frac{1}{f}$ does not have the first form, then obviously $f$ or $\frac{1}{f}$ has the second form.
The maximal ideal $m$ of $A$ is generated by $y$: every element of the second form is a multiple of $y$. Every element of the first form can be written as $f=\frac{f}{y} y$, where $\frac{f}{y}$ is still of the first form.
The dimension of $A$ is at least $2$:the elements of the first form, form a prime ideal $p$ and $y\not\in p$.
$p$ is not finitely generated by the way.
