\section{Preliminary: running Bertini}

\subsection{Numerical Irreducible Decomposition}

Bertini\_real takes as input a Numerical Irredicible Decomposition (NID) of the complex algebraic variety for your problem.  The NID is computed by Bertini, {\tt tracktype: 1}, and is stored in a file called {\tt witness\_data}.


Once your input file describing the system you want to solve is created, you need to run Bertini.  Navigate in the command line to the directory of the {\tt input} file and type \texttt{bertini} or \texttt{bertini your\_input\_file\_name}.  Bertini assumes the input file is named {\tt input} unless told otherwise, by passing the name as the first argument.  No, you do not currently use flags to specify input file name with Bertini 1.

\textbf{Cygwin users:} A user may also use \texttt{bertini-serial.exe} (or \texttt{bertini\_parallel.exe}). This will run Bertini, creating the Numerical Irreducible Decomposition needed for Bertini\_real.  You may need to type in the entire pathway to where Bertini is located, if it's not in the same folder, so the command line read \newline \texttt{/cygdrive/path/to/BertiniSource\_v1.5/bertini-serial.exe input}


If the NID run is successful, you should see a summary of the decomposition print to the screen.  It should look something like this:

\begin{lstlisting}[caption={Example NID screen output, tracktype 1 in Bertini 1}, captionpos=b]
************* Witness Set Decomposition *************

| dimension | components | classified | unclassified
-----------------------------------------------------
|   2       |   1        |   7        |  0
-----------------------------------------------------

************** Decomposition by Degree **************

Dimension 2: 1 classified component
-----------------------------------------------------
   degree 7: 1 component

*****************************************************
\end{lstlisting}


If there are path failures or unclassified points, change Bertini settings, and re-run the problem.  Consult the Bertini book or user's manual for more information about available settings, and their impact on computing the NID.


\clearpage
\subsection{Necessary Bertini output files for Bertini\_real}

The main output file of interest from Bertini to feed into Bertini\_real is called \texttt{witness\_data}, a file suited for automated reading by a program. It's terribly formatted for humans. See the Bertini book \cite{bates2013numerically} for information about what is contained in {\tt witness\_data}.  

Shortly, {\tt witness\_data} contains all of the information needed to describe the witness sets for the irreducible components of your variety. In particular, it has the information used for regeneration used in Bertini\_real, as well as component sampling and membership testing.

Do not rename {\tt witness\_data}.  Bertini\_real will do its best to preserve this file against loss.  If your {\tt witness\_data} took a lot of effort to compute, you are encouraged to not use the original data file as input to Bertini\_real, or any other program.  Archive the original, and use a duplicate. 

