Given that $x,y,z,w,v\in \{0,1\}$. The connection between the variable is given by:
$\max\{\min\{x,y\},z,v\}=w$.
Write a system of linear constraints that represents this connection.
My Work:
Let $t=\min\{x,y\}$. So our system will look like:
$\max\{t,z,v\}=w$
S.t: $t=\min\{x,y\} \Longrightarrow t\le x, t\le y$.
Now, let $r=\max\{t,z,v\}$, that means we get:
$r=w$.
S.t: $t\le x, t\le y, r=\max\{t,z,v\}$.
Which is also: $t\le x, t\le y, r\ge t, r\ge z, r\ge v$. and of course $x,y,z,w,v\in \{0,1\}$
I would appreciate any feedback about my work and if this is how the solution should look like. (I've dealt with writing a new equivalent minimum/maximum problem, but not with system of constraints).
Edit: I've noticed that I can't write $t=\min\{x,y\} \Longrightarrow t\le x, t\le y$, that easily, because then $t$ could be anything lower than $0$ or $1$, so I'm thinking of adding the constraint $t\in \{0,1\}$, does that still count as a linear constraint?
Your constraints are incomplete. For example, they do not prevent $(x,y,z,v,w)=(0,0,0,0,1)$, which violates the desired equation.
For binary variables, $\max$ is the same as $\lor$ (logical OR) and $\min$ is the same as $\land$ (logical AND).
You can find linear constraints somewhat automatically, without any additional variables, via conjunctive normal form as follows: $$ w=\max\{\min\{x,y\},z,v\} \\ w \iff ((x \land y) \lor z \lor v) \\ \left(w \implies ((x \land y) \lor z \lor v)\right) \bigwedge \left(((x \land y) \lor z \lor v) \implies w\right) \\ \left(\lnot w \lor ((x \land y) \lor z \lor v)\right) \bigwedge \left(\lnot((x \land y) \lor z \lor v) \lor w\right) \\ \left((\lnot w \lor x \lor z \lor v) \land (\lnot w \lor y \lor z \lor v)\right) \bigwedge \left(((\lnot x \lor \lnot y) \land \lnot z \land \lnot v) \lor w\right) \\ (\lnot w \lor x \lor z \lor v) \bigwedge (\lnot w \lor y \lor z \lor v) \bigwedge (\lnot x \lor \lnot y \lor w) \bigwedge (\lnot z \lor w) \bigwedge (\lnot v \lor w) \\ (1-w + x + z + v \ge 1) \bigwedge (1-w + y + z + v \ge 1) \bigwedge (1-x + 1-y + w \ge 1) \bigwedge (1-z + w \ge 1) \bigwedge (1-v + w \ge 1) \\ (x + z + v \ge w) \bigwedge (y + z + v \ge w) \bigwedge (w \ge x+y-1) \bigwedge (w \ge z) \bigwedge (w \ge v) $$ That is, the following five linear constraints enforce the desired behavior: \begin{align} x + z + v &\ge w \\ y + z + v &\ge w \\ w &\ge x+y-1 \\ w &\ge z \\ w &\ge v \end{align}