# Example 5.2 (A secant variety example)

Software
The computations described below were performed using Bertini version 1.4 and Matlab version R2012b in a 64-bit Linux environment. The instructions below assume that the user already has these or similar versions installed. Note that the Bertini commands are written here to run in serial, but it would be advisable to run these commands in parallel if the computing environment is set up for it (e.g. mpirun bertini input instead of bertini input).
Part 1: Obtaining a witness set
• In this step, we will find one point on the witness point set.
In the directory /step1findgoodpoint/, run:
bertini input.eval random_a
mv function start_parameters
In a text editor, change the 1st line of start_parameters to 32
bertini input.homotopy random_a
cp finite_solutions point_fiber
bertini input.newton point_fiber
cp newPoints ../step2monodromy/start_good
• In this step, we will find the rest of the witness point set.
In the directory /step2monodromy/, run:
In Matlab:
do50loops.m
The script should find 345 points. The number of iterations (monodromy loops) necessary may differ due to randomness, but these 50 loops will typically be sufficient.
At the command line:
cp start_good ../step3tracetest/
cp input_out ../step3tracetest/
• In this step, we will verify the witness point set.
In the directory /step3tracetest/, run:
At the command line:
cp input_out input_in
In a text editor, edit input_in so that all occurrences of +(1-t) are changed to -(1-t)
./setuptrace.script
In Matlab:
tracetest.m
The results displayed for the coordinate wise sums should all be numerically zero (e.g. magnitude 1e-8 or smaller). This numerically verifies the witness point set.
At the command line:
cp start_good ../part2/start_345_move
Part 2: Sampling and computing Hilbert functions
• All steps below are performed in the directory /part2/
• At the command line, run:
bertini input.eval start_345_move; mv function witness_point_set
• At the command line, run:
bertini input.move start_345_move; mv finite_solutions fiber01
bertini input.move start_345_move; mv finite_solutions fiber02
bertini input.move start_345_move; mv finite_solutions fiber03
bertini input.move start_345_move; mv finite_solutions fiber04
bertini input.move start_345_move; mv finite_solutions fiber05
bertini input.move start_345_move; mv finite_solutions fiber06
bertini input.move start_345_move; mv finite_solutions fiber07
bertini input.move start_345_move; mv finite_solutions fiber08
bertini input.move start_345_move; mv finite_solutions fiber09
bertini input.move start_345_move; mv finite_solutions fiber10
• In Matlab, run:
combinepoints(['fiber01';'fiber02';'fiber03';'fiber04';'fiber05';'fiber06';'fiber07';'fiber08';'fiber09';'fiber10'],'fiber_all');
• At the command line, run:
bertini input.eval fiber_all; mv function sample_points
• In Matlab, run:
testacm
At the prompts, enter the following:
(press enter), (press enter), 31
Matlab may give a warning when attempting to compute HP. A Bertini input file will be generated, and in the next step it will be used to finish this computation.
• At the command line, run:
bertini input.hp
The coefficients of HP_X can now be read from finite_solutions. These coefficients can be converted to rational numbers, e.g., using the Maple command: convert(...,rational,80)