\documentclass[a4paper,10pt]{article}
\usepackage{myXsim}

\author{Benjamin Bertrand}
\title{Information chiffrée 1 - Exercices}
\date{Octobre 2021}

\xsimsetup{
    solution/print = false
}

\begin{document}
\maketitle

\begin{exercise}[subtitle={Réductions}]
    Développer puis réduire les expressions suivantes
    \begin{multicols}{2}
        \begin{enumerate}[label={\Alph*=}]
            %- set a = Expression.random("{a}x + {b} + {c}x + {d}")
            \item $\Var{a}$
            %- set b = Expression.random("{a}x + {b} + {c}x + {d}")
            \item $\Var{b}$

            %- set c = Expression.random("({a}x + {b})^2")
            \item $\Var{c}$
            %- set d = Expression.random("{c} + x*({a}x + {b})")
            \item $\Var{d}$

            %- set e = Expression.random("{c}*x^2 + x*({a}x + {b})")
            \item $\Var{e}$
            %- set f = Expression.random("{a}(x+{b})(x+{c})")
            \item $\Var{f}$
        \end{enumerate}
    \end{multicols}
\end{exercise}

\begin{solution}
    \begin{enumerate}
        \item 
            \[ 
                \Var{a.simplify().explain() | join('=')}
            \]
        \item 
            \[ 
                \Var{b.simplify().explain() | join('=')}
            \]
        \item 
            \[ 
                \Var{c.simplify().explain() | join('=')}
            \]
        \item 
            \[ 
                \Var{d.simplify().explain() | join('=')}
            \]
        \item 
            \[ 
                \Var{e.simplify().explain() | join('=')}
            \]
        \item 
            \[ 
                \Var{f.simplify().explain() | join('=')}
            \]
    \end{enumerate}
\end{solution}


\pagebreak

\printsolutionstype{exercise}

\end{document}
