I have a header.tex file which has a large set of useful definitions and macros for a set of documents, including the lines
\theoremstyle{definition}
\newtheorem{nthm}{Theorem}[section]
which are useful in the majority of files I'm writing. However for one of the files, I'd like global theorem numbering instead of per section, so here is a minimal example of what I tried:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
% (from header.tex)
\theoremstyle{definition}
\newtheorem{nthm}{Theorem}[section]
\newtheorem{nprop}[nthm]{Proposition}
% (end of header.tex)
\makeatletter
\let\nthm\relax
\let\c@nthm\relax
\makeatother
\theoremstyle{definition}
\newtheorem{nthm}{Theorem}
\begin{document}
\section{First}
\begin{nprop}
Proposition 1 goes here
\end{nprop}
\begin{nthm}
Theorem 2 goes here
\end{nthm}
\section{Second}
\begin{nthm}
Theorem 3 goes here
\end{nthm}
\begin{nprop}
Proposition 4 goes here
\end{nprop}
\end{document}
Hopefully the desired behaviour should be clear from there.
I'd very much prefer not to amend header.tex, because those lines work very well for other documents, and I'd like to keep the dependancy because header.tex has other useful commands (irrelevant to this issue). Similarly I'd like to continue using an article class because it's most appropriate for this work.
To the best of my understanding
\newtheorem{nthm}{Theorem}
should give global theorem numbering, but it doesn't seem to here. Relatedly, adding [subsection] at the end of that line does behave as expected.

\usepackage{chngcntr}and\counterwithout{nthm}{section}at the place of the document from which you to want to switch to global numbering – Oct 23 '17 at 16:15\counterwithoutetc. are additions based on the default LaTeX format,chngcntrshould work for every class, except the very weird ones ;-) – Oct 23 '17 at 19:37