We know that the definition of local max value is "$f(a)$ is called $\textbf{local max value of f} $ if $f(a)\geq f(x)$ for all $x$ in some open interval containing $a$."
Would it be okay if I change the word "open" with "closed" i.e some closed interval?
Your proposal would not give an equivalent definition because the singleton $\{a\}$ is a "closed interval containing $a$".