Define an r-secant to be the linear space spanned by r given points
on a variety, which here is the d-Veronese (i.e., the d-uple image
of **P**^{2}).
The output of this script is a list of all configuration types
for which the dimension of the tangent space determined by the given configuration of r points is smaller than for r generic points; the (affine) dimension of the tangent space for each deficient configuration type
is also given. This script works only if 1 <= r <= 8. In this case, there are no deficient configuration types when d > 15, so d is restricted to being at most 15.

### More Detailed Discussion

This script finds configuration types of r ≤ 8 points
for which the mapping on tangent spaces for the map Φ_{r,d}
defining the secant variety Sec_{r}(V_{d})
drops rank. What the script does actually is to find
all configuration types of r points p_{1},…,p_{r}
of **P**^{2} such that H(2p_{1}+…+2p_{r}, d) does not achieve its maximum value (i.e., the value when the points
p_{i} are generic).
• S = k[**P**^{2}] = S_{0} ⊕ S_{1} ⊕ ^{…} ⊕ S_{i} &oplus ^{…}

• Φ_{r,d} : (S_{1})^{r} → S_{d} where
Φ_{r,d}(*l*_{1},…,*l*_{r}) = *l*_{1}^{d} + ^{…} + *l*_{r}^{d}

• **P**(Im(Φ)) = Sec_{r}(V_{d}), where V_{d} = d-uple image of **P**^{2}

• Im(dΦ_{(l1,…,lr)}) = *l*_{1}^{d-1}S_{1} + … + *l*_{r}^{d-1}S_{1} ≅ (S/(I(p_{1})^{2}∩^{…}∩ I(p_{r})^{2}))_{d}

where p_{i} is the point dual to the form *l*_{i}

Points (*l*_{1},…,*l*_{r}) ∈ ((**P**^{2})^{∧})^{r} for which

dim Im(dΦ_{(l1,…,lr)}) fails to achieve its maximum value we will call *deficient*.

**Definition**: Z = m_{1}p_{1}+…+m_{r}p_{r} ⊂ **P**^{2} denotes the subscheme, called a *fat point* subscheme, defined by the ideal I(p_{1})^{m1}∩^{…}∩ I(p_{r})^{mr} ⊆ S.

**Definition**: For Z = m_{1}p_{1}+…+m_{r}p_{r}, the *Hilbert function* H(Z, •) of Z is H(Z, d) = dim (S/(I(p_{1})^{m1}∩^{…}∩ I(p_{r})^{mr}))_{d}

**Definition**:
(p_{1},…,p_{r}) ∈ **P**^{2}
and (p'_{1},…,p'_{r}) ∈ **P**^{2}
have the same *configuration type* if

H(m_{1}p_{1}+…+m_{r}p_{r},•) = H(m_{1}p'_{1}+…+m_{r}p'_{r}, •)
for all m_{i}.