\documentclass[12pt, a4paper, draft]{article}

\usepackage[italian]{babel}

\newcommand{\anPol}{$K[x_1, \dots, x_n]$}

\newcommand{\anpl}{\ensuremath{K[x_1, \dots, x_n]}}

\newcommand{\anp}[1]{\ensuremath{K[x_1, \dots, x_{#1}]}}

\newcommand{\anPolinom}[2]%
         {\ensuremath{K[{#1}_1, \dots, {#1}_{#2}]}}

\begin{document}
\begin{center}
\textbf{Definizione di comandi}
\end{center}

\bigskip
\noindent
Sia \anPol l'anello dei polinomi\dots\\
Sia \anPol\ l'anello dei polinomi\dots\\
%% Sia $f : \anPol \longrightarrow \anPol$ data da\dots
\bigskip

\noindent
Sia \anpl l'anello dei polinomi\dots\\
Sia \anpl\ l'anello dei polinomi\dots\\
Sia $f : \anpl \longrightarrow \anpl$ data da\dots

\bigskip
\noindent
Sia $g : \anp{5} \longrightarrow \anp{m}$ data da\dots

\bigskip
\noindent
Sia $h : \anPolinom{x}{n} \longrightarrow \anPolinom{y}{k}$ 
data da\dots

\newpage

\begin{verbatim}
\documentclass[12pt, a4paper]{article}

\usepackage[italian]{babel}

\newcommand{\anPol}{$K[x_1, \dots, x_n]$}

\newcommand{\anpl}{\ensuremath{K[x_1, \dots, x_n]}}

\newcommand{\anp}[1]{\ensuremath{K[x_1, \dots, x_{#1}]}}

\newcommand{\anPolinom}[2]%
         {\ensuremath{K[{#1}_1, \dots, {#1}_{#2}]}}

\begin{document}

\noindent
Sia \anPol l'anello dei polinomi\dots\\
Sia \anPol\ l'anello dei polinomi\dots\\
%% Sia $f : \anPol \longrightarrow \anPol$ data da\dots
\bigskip

\noindent
Sia \anpl l'anello dei polinomi\dots\\
Sia \anpl\ l'anello dei polinomi\dots\\
Sia $f : \anpl \longrightarrow \anpl$ data da\dots

\bigskip
\noindent
Sia $g : \anp{5} \longrightarrow \anp{m}$ data da\dots

\bigskip
\noindent
Sia $h : \anPolinom{x}{n} \longrightarrow \anPolinom{y}{k}$ 
data da\dots
\end{verbatim}

\end{document}
