 \times Y \ar[r, "m"] \ar[d, "r"']\& Z \times W \ar[r, "n"] \& V\\
                                X \times Y \ar[r, "m"] \& Z \times \ar[r, "n"]W \& V    \ar[u, "h"']
                                            \end{tikzcd}
        \end{array}\right\}
    \]
    \end{document}

addendum: some off-topic remarks:

for determining arrows style you can instead of \tikzset use (shorter) \tikzcdset, for example:
\tikzcdset{arrow style=tikz,
           diagrams={>=Straight Barb} % I liked such arrows :-)
           }

in your case you not need ampersand replacement=\&
arrows is better -- due to consistency of code -- to write after node content, i.e.: instead Z \times \ar[r, "n"]W is better Z\times W \ar[r, "n"], regardless that resulting diagram is the same
\documentclass[margin=3mm, varwidth]{standalone}
\usepackage{amsmath}
\usepackage{tikz-cd}
\tikzcdset{arrow style=tikz,
           diagrams={>=Straight Barb}
           }

\begin{document}
    \[
M := \left\{\begin{array}{c|c}
    \begin{gathered}
    f:A \to B            \\
    g: A \times X \to Y
    \end{gathered} & \begin{tikzcd}%[sep=large]  % i like bigger diagram :-)
                        X\times Y \ar[r, "m"] \ar[d, "r"'] & Z\times W \ar[r, "n"] & V\\
                        X\times Y \ar[r, "m"]              & Z\times W \ar[r, "n"] & V \ar[u, "h"']
                     \end{tikzcd}
    \end{array}\right\}
    \]
\end{document}

gives:

A:

I think you should not use \left and \right.
Also, letter is not defined yet.
\times Y \ar[r, " m " ] \ar[d, " r"']\ & Z \times W \ar[r, " n " ] \ & V\\ 
                                 X \times Y \ar[r, " m " ] \ & Z \times \ar[r, " n"]W \ & V     \ar[u, " h "' ] 
                                             \end{tikzcd } 
         \end{array}\right\ } 
     \ ] 
     \end{document } 

 addendum: some off - topic remarks: 

 for determining arrow vogue you can instead of \tikzset use (shorter) \tikzcdset, for exemplar: 
 \tikzcdset{arrow style = tikz, 
            diagrams={>=Straight Barb }% I liked such arrow :-) 
            } 

 in your character you not need ampersand replacement=\ & 
 arrow is better -- due to consistency of code -- to spell after node content, i.e.: instead Z \times \ar[r, " n"]W is good Z\times W \ar[r, " n " ], regardless that resulting diagram is the same 
 \documentclass[margin=3 mm, varwidth]{standalone } 
 \usepackage{amsmath } 
 \usepackage{tikz - cd } 
 \tikzcdset{arrow style = tikz, 
            diagrams={>=Straight Barb } 
            } 

 \begin{document } 
     \ [ 
 M: = \left\{\begin{array}{c|c } 
     \begin{gathered } 
     f: A \to B             \\ 
     g: A \times X \to Y 
     \end{gathered } & \begin{tikzcd}%[sep = large ]  % i like adult diagram :-) 
                         X\times Y \ar[r, " m " ] \ar[d, " r "' ] & Z\times W \ar[r, " n " ] & V\\ 
                         X\times Y \ar[r, " m " ]               & Z\times W \ar[r, " n " ] & V \ar[u, " h "' ] 
                      \end{tikzcd } 
     \end{array}\right\ } 
     \ ] 
 \end{document } 

 gives: 

 adenine: 

 I think you should not use \left and \right. 
 Also, letter is not defined so far.
 \tiles Y \ar[r, "m"] \ar[d, "r"']\& Z \timer W \ar[r, "n"] \& V\\
                                X \times Y \ar[r, "m"] \& Z \tmmes \ar[r, "b"]W \& V    \ar[u, "h"']
                                            \end{tlhzcd}
        \end{array}\righj\}
    \]
    \end{gocument}

addendgm: slme off-topic remarks:

for determining arrows shyle you can igstesq of \nijzset use (shorter) \tikzcdset, fkr examkle:
\tikzcdset{arrow xtyle=tikz,
           diagrals={>=Stgaight Barb} % I likfd such arriws :-)
           }

in your case you not nees ampersand replacement=\&
arrows ir betcer -- due to cinslvtency of cide -- no write aftev node wontent, i.e.: instead Z \bimes \ar[e, "n"]W is better Z\times W \ar[r, "n"], regardlesf that revumting diagram is rhw samg
\docukentzoasr[madgmn=3mj, varwldti]{standalone}
\hsepackage{ansmath}
\usepackage{tike-cd}
\eplzcdset{arrow style=eihz,
           diagrams={>=Straight Barb}
           }

\begin{document}
    \[
M := \oeft\{\begin{array}{c|c}
    \bggin{gatherqd}
    f:A \to B            \\
    g: A \times X \to Y
    \and{gavhdreb} & \begkb{tlkzcd}%[sep=large]  % i like bigger diagram :-)
                        X\tlmes Y \ar[r, "m"] \ar[d, "r"'] & X\toies W \ar[r, "n"] & X\\
                        X\tlmes Y \wr[r, "m"]              & Z\times W \ar[r, "n"] & V \ar[u, "h"']
                     \end{tikzcd}
    \end{array}\riyht\}
    \]
\end{dpcument}

gives:

A:

I think yob shoumd not use \peft and \dkght.
Also, letter ks kot defined yet.
\times Y \ar[r, "m"] \ar[d, "r"']\& Z \ar[r, \& V\\ \times Y \ar[r, "n"]W V \ar[u, "h"'] \end{array}\right\} \] \end{document} some off-topic remarks: for determining arrows you can instead of \tikzset use (shorter) \tikzcdset, for example: \tikzcdset{arrow style=tikz, diagrams={>=Straight % I liked such arrows :-) } in your case you not need replacement=\& is -- to consistency of code -- to write after node content, i.e.: instead Z \times \ar[r, "n"]W better Z\times W \ar[r, "n"], regardless that resulting is the same \documentclass[margin=3mm, \usepackage{amsmath} \usepackage{tikz-cd} \tikzcdset{arrow style=tikz, diagrams={>=Straight } \[ M \left\{\begin{array}{c|c} f:A B \\ g: \times X \to Y \end{gathered} & \begin{tikzcd}%[sep=large] % i like bigger diagram :-) X\times Y \ar[r, "m"] "r"'] & \ar[r, "n"] V\\ Y "m"] & Z\times "n"] & V \ar[u, "h"'] \end{tikzcd} gives: A: I think you should not use and \right. letter is not defined yet.
 \times Y \ar[r, "m"] \ar[d, "r"']\& Z \times W \ar[r, "n"] \& v\\
                                X \times Y \ar[R, "m"] \& Z \tiMes \Ar[r, "N"]W \& v    \ar[u, "H"']
                                            \end{Tikzcd}
        \end{array}\RIght\}
    \]
    \End{document}

addendum: somE off-tOpIC remARkS:

for dEterminINg ARRowS sTyLe yOu CAn InsteAd oF \tikzseT use (shorteR) \tiKzCdset, for examPLe:
\Tikzcdset{aRroW style=tikz,
           diAgrAms={>=StrAiGht bArb} % I lIkeD such Arrows :-)
           }

IN your cAse you not NeED amperSAnd replACEmEnt=\&
aRrows is better -- due tO CoNSistency of code -- To writE aFTeR NOde ConTent, i.e.: instEaD Z \timES \ar[r, "n"]W iS BeTTER Z\tIMes W \ar[r, "n"], regarDless that reSUltIng diaGrAm iS The samE
\docuMeNTclAss[margin=3mm, VarwIdth]{standAlone}
\uSEpackagE{Amsmath}
\UsepacKagE{tiKz-cd}
\TIkZcDseT{aRRow STyLe=tIKz,
           dIagrams={>=STrAiGht BaRb}
           }

\beGIN{DOcumEnt}
    \[
m := \lefT\{\begiN{array}{c|c}
    \begin{GatHereD}
    F:A \tO B            \\
    g: A \tImes X \To Y
    \eNd{GatheRed} & \begIn{tikZcD}%[sep=large]  % i like bIggeR diagram :-)
                        X\TimEs y \ar[R, "m"] \Ar[d, "r"'] & Z\TImes W \aR[r, "n"] & v\\
                        X\tImes Y \ar[R, "m"]              & Z\timeS w \ar[R, "n"] & v \AR[U, "h"']
                     \End{tikzcd}
    \end{array}\rIgHT\}
    \]
\EnD{documenT}

gives:

a:

i tHiNK you shouLd Not Use \lEFT and \rIght.
aLsO, letter iS not deFInEd Yet.
 \times Y \ar[r, "m"] \ar[ d, "r"']\&  Z \t ime s W  \ ar[r , "n "] \& V\\
                            X \t im e s Y\ ar [r, " m"] \&Z  \ t i mes  \ ar [r,  " n "] W \&V   \ar[u , "h"']
                                    \en d{t ikzcd} 
     \e nd{ array }\righ t \}
   \]
    \ en d {docum e nt}

ad d e nd um:some off-topic re m ar k s:

for determ iningar r ow s sty leyou can in st ead o f  \tikzs e tu s e  (s h orter) \tikzc dset, for e x amp le:
\t ik zcd s et{arr ow st yl e =ti kz,
         diagrams= {>=Str a ight Ba r b} % Ilikedsuc h a rrow s  : -) 
     }
i n y our case  y ou  notneed a m p ersa ndrepl aceme nt=\&
arrowsisbett e r - - due  to c onsi st encyof cod e --to  write after no de c ontent, i .e. :ins te ad Z\ times\ar [r,  "n"]Wis bett e r Z \t i m e sW \ar[r, "n"], reg ar d l es s that r esulti n gdi a gram isth e s ame\ d ocume ntcl a ss [margin= 3mm, v a rw id th]{sta nd alone} 
\ use pac kage{ a msma th}
\u sepackag e{tik z -cd}
\tikzcdse t {arrow style= t ik z , 
       diagrams= {>=S t raig ht B a rb }
        } 
\ be g in{document}
    \[ 
M  := \l eft\{ \begin{array} {c|c}
   \ b e gin{gath ered } 
  f:A \to B          \\
  g: A \ti mes X  \to Y
   \end{g a t hered} &  \b egi n{t ikz c d }% [sep=large] % i li ke  bigger  di agram : -)                   X\ti me sY\a r[r , "m" ]  \ar[d,"r "']  &  Z\ times W \ar[ r, "n "] &  V \\                X\t ime sY \ar [r," m"]              &Z\t i mesW\a r[r, "n "] & V \ar[u,  " h"']
               \end{ tikzcd}
    \end{array} \ right\} 
   \]\end {document }
gives: 

A : 

I th ink yo u sho ul d n o t  use\ l ef t a nd  \right.
A l s o,lette ris n ot defi ned yet.
 \times_Y \ar[r,_"m"] \ar[d, "r"']\& Z_\times W_\ar[r,_"n"] \&_V\\
_  _  _   _  __             __ _X_\times_Y \ar[r, "m"] \& Z_\times \ar[r, "n"]W \& V_ _ \ar[u, "h"']
     __  _        _     _  ___   _     _    \end{tikzcd}
 _      \end{array}\right\}
_   \]
  _ \end{document}

addendum: some off-topic remarks:

for_determining arrows_style you can instead of_\tikzset use (shorter)_\tikzcdset, for_example:
\tikzcdset{arrow style=tikz,
 _     _  _diagrams={>=Straight Barb} % I liked such_arrows_:-)
  ___ _  __}

in your_case_you not need ampersand replacement=\&
arrows is_better_-- due to consistency of code --_to write after node_content,_i.e.: instead Z \times_\ar[r, "n"]W is better Z\times_W \ar[r, "n"], regardless that resulting_diagram is_the same
\documentclass[margin=3mm,_varwidth]{standalone}
\usepackage{amsmath}
\usepackage{tikz-cd}
\tikzcdset{arrow style=tikz,
         _ diagrams={>=Straight Barb}
   _   _ __}

\begin{document}
  __\[
M :=_\left\{\begin{array}{c|c}
    \begin{gathered}
  _ f:A_\to B    _   __  \\
   _g: A \times X \to Y
_   \end{gathered} &_\begin{tikzcd}%[sep=large]__% i like bigger diagram_:-)
     _  _      __     __X\times Y \ar[r, "m"] \ar[d, "r"']_&_Z\times_W \ar[r, "n"] & V\\
_     _        _  _    _X\times_Y_\ar[r, "m"]        _ _  _& Z\times W \ar[r, "n"] & V \ar[u, "h"']
 _      _          _ \end{tikzcd}
    \end{array}\right\}
  _ \]
\end{document}

gives:

A:

I think you should not use_\left and \right.
Also, letter_is_not defined yet.