Ranks with Respect to a Projective Variety and a Cost-Function

: Let X ⊂ P r be an integral and non-degenerate variety. A “cost-function” (for the Zariski topology, the semialgebraic one, or the Euclidean one) is a semicontinuous function w : = [ 1, + ∞ ) ∪ + ∞ such that w ( a ) = 1 for a non-empty open subset of X . For any q ∈ P r , the rank r X , w ( q ) of q with respect to ( X , w ) is the minimum of all ∑ a ∈ S w ( a ) , where S is a ﬁnite subset of X spanning q . We have r X , w ( q ) < + ∞ for all q . We discuss this deﬁnition and classify extremal cases of pairs ( X , q ) . We give upper bounds for all r X , w ( q ) (twice the generic rank) not depending on w . This notion is the generalization of the case in which the cost-function w is the constant function 1. In this case, the rank is a well-studied notion that covers the tensor rank of tensors of arbitrary formats (PARAFAC or CP decomposition) and the additive decomposition of forms. We also adapt to cost-functions the rank 1 decomposition of real tensors in which we allow pairs of complex conjugate rank 1 tensors.


Introduction
In the first part of the introduction, and in Sections 2-4, we work over an algebraically closed field K (the reader looses nothing taking C instead of K, but with the Zariski topology), while in Section 5, we work over C or R and use the Euclidean topology. In Section 5, we discuss the case of the Euclidean topology with semialgebraic cost functions and generalized cost functions (Section 5). In Section 4, we discuss the solution set, a well-study notion for tensor decompositions and additive decompositions of forms. See [1][2][3][4][5][6][7] for background on these topics with a strong bent toward applications, different applications in different books or papers.
Fix an integral and non-degenerate variety X ⊂ P r over K. For each q ∈ P r the X-rank r X (q) of q is the minimal cardinality of a subset S ⊂ X such that q ∈ S , where denotes the linear span. The notion of X-rank unifies several important notions: tensor rank, partially symmetric tensor rank, additive decompositions of forms [1][2][3][4][5][6][7].
Our contribution is to add a cost function w, i.e., a function w : X → R >0 ∪ {+∞} so that r X,w (q) is the minimal ∑ p∈S w(p) for all finite S ⊂ X, such that q ∈ S . We assume that B := w −1 (+∞) is a proper closed algebraic subset of X. Since X \ B spans P r , without the other assumptions we will soon see that r X,w (q) is a finite real number (Theorems 1 and 2). We assume w(p) ≥ 1 for all p ∈ X \ B. With this assumption, r X,w (q) ≥ r X (q) for all q. The main assumption is that w is upper semicontinuous for the Zariski topology of X \ B. We explain what it means since the Zariski topology is quite strange (not Hausdorff), but it has several key features. First of all, there is a finite decomposition {A i } i∈I of X \ B, i.e., X \ B = ∪A i and A i ∩ A j = ∅ for all i = j, with each A i locally closed and w is constant on each A i . Moreover, the boundary condition is satisfied, i.e., for all i ∈ I the set A i \ A i is a union of some A j . Semicontinuity with respect to such partition is equivalent to w(q) ≥ w(p) for all p ∈ A i and all q ∈ A i . Since X is irreducible, there is a unique i 0 ∈ I such that U i 0 is a non-empty open subset of X \ B and all points of U i 0 have the minimum weight. We normalize w so that w(p) = 1 for all p ∈ U i 0 , but this is not a key requirement. With this requirement, we see that r X,w (q) = r X (q) for almost all q ∈ P r . The X-rank function P r → N is not semicontinuous in most interesting cases [8,9], but nevertheless, there is a non-empty Zariski open subset U of P r such that all p ∈ U have the same rank, r gen (X), called the generic rank of X (Remark 2). If K = C, the cost-function w is also semicontinuous for the Euclidean topology, but remember that we are assuming that w(X) is finite (finitely many prices). Our first result is the following theorem. Theorem 1. Let w be any normalized cost-function. Then r X,w (q) ≤ 2r gen (X) for all q ∈ P r .
Note that Theorem 1 works for every normalized cost-function. Now instead of a single normalized cost-function, we take infinitely many unknown normalized cost functions w q , one different for different points q. If we only take costfunctions with value 1 or +∞ we get the following notion of open rank introduced for affine spaces (a more difficult case that projective spaces, affine geometry instead of linear algebra) by A. Białynicki-Birula and A. Schinzel [10,11] and considered for projective spaces in [12].
The open X-rank or X (q) for a point q ∈ P r is defined in the following way. The integer or X (q) is the minimal integer t such that for any closed set T X there is S ⊂ X \ T such that #S ≤ t and q ∈ S [12].
The open-cost X-rank ocr X (q) of q ∈ X is the minimal integer t such that r X,w (q) ≤ t for all normalized cost-functions w.
The following result shows that ocr X (q) is finite for all q.
Theorem 2. We have ocr X (q) = or X (q) ≤ 2r gen (X) for all q ∈ P r Theorem 1 shows that for an arbitrary normalized cost function, there is an upper bound for all r X,w (q), q ∈ P r , in terms usually well-known for each important X [1,4].
Obviously, Theorem 2 implies Theorem 1 and hence we only prove Theorem 2. The proof is an adaptation of [13].
We show that Theorems 1 and 2 are optimal for some cost-function (Example 1).
We explain now a very particular case of normalized cost-function w, the one with as values only 1 and +∞. For these w, the set B := w −1 (+∞) is a closed subset of X for the Zariski topology and B = X. Conversely, for any closed set B ⊂ X, B = X, the function w with w(x) = 1 if x / ∈ B and w(x) = +∞ if x ∈ B is a normalized cost-function. For any q ∈ P r r X,w (q) is an integer, the minimal cardinality of a finite set A ⊂ X \ B such that q ∈ A . For orc X (q), the closed set B depends on q, i.e., (as we will see in the proof of Theorem 2), orc X (q) is the minimal integer t such that for all closed sets B ⊂ X there is A ⊂ X \ B such that q ∈ A and #A ≤ t.
In Section 3, we discuss the well-known notion of the solution set (for the usual X-rank): it is the set S(X, q) of all finite sets A ⊂ X such that q ∈ A and #A = r X (q).
In the next observation, we explain the motivation for semialgebraic cost-function and, in general, the use of semialgebraic sets for real tensors. Remark 1. Suppose you consider real tensors. Often it is necessary/useful to consider the Euclidean topology and look at the ranks of " general " tensors T ∈ V 1 ⊗ · · · ⊗ V k with a certain format and to study their ranks. Over C there is a unique general rank and it is achieved by all complex tensors T ∈ V 1 ⊗ · · · ⊗ V k outside a family with lower dimension ( [4,7] [ §6.2]). Over R there may be several different real ranks achieved by non-empty open subsets (for the Euclidean topology) of V 1 ⊗ · · · ⊗ V k and the corresponding ranks are said to be typical ( [7] [ §6. 2]). These open subsets are semialgebraic (a very restrictive property), and the complement of the union of these open semialgebraic sets is a lower dimensional real semialgebraic set. In general, the partition of V 1 ⊗ · · · ⊗ V k given by the rank is a semialgebraic partition.
The same occurs for additive decompositions of real forms and in general for the set of real points X(R), where X is a real algebraic variety. Thus, semialgebraic partitions occur in nature. In the applications, one often does not look at solutions in some Euclidean space R N , but in the closed semi-algebraic set (R ≥0 ) N ( [9]). We allow these semialgebraic sets as w −1 (1) for normalized semialgebraic sets, but they are not algebraic. Thus, semialgebraic cost-functions are essential for several problems over the real numbers.
Take again a real X with the Euclidean topology. In Section 5, we define arbitrary semicontinuous normalized cost-function w without assuming that w has finitely many values. In this way, one can take, for instance, a cost proportional to the square of a Euclidean distance from some p ∈ X.
The last part of Sections 5 and 5.1 adapts the idea of cost-function to expansions of a real q into complex addenda, but in which we prescribe that the non-real addenda appear as complex conjugate pairs. We explain here the case of rank 1 decompositions of real tensors. Take an integer k ≥ 2 and k finite-dimensional real vector spaces V 1 , . . . , V k and set . . , e in which for any non-real addenda its complex conjugate appears in the expansion with the same coefficient. In the last part of Section 5 we discus this known concept. We apply the cost function not to the points of X(R) (real points of the variety X) or X(C) (complex points of the variety X) but to the set S(X(C), e, σ) of all finite subsets S ⊂ X(C) such that #S = e and σ(S) = S. We may prefer the real solutions, but allow, if necessary, the non-real σ-invariant solutions, just giving cost 1 to a real point of S and cost 2 + , > 0, to a pair {u, σ(u)} with u ∈ X(C) \ X(R). We say that S has label (a, b) with (a, b) non-negative integers and 2a + b = e if σ(S) = S and b = #(S ∩ X(R)). Set n := dim X. For any fixed label (a, b), e = 2a + b, the set of all σ-invariant subsets of X(C) with cardinality e has real dimension ne, the same dimension of the totally real ones, the ones with label (0, e). Thus, each solution with label (a, b) " costs " in principle as the totally real ones. This framework is promising for a substitution of typical ranks [7].

Proof of Theorem 2
In this section, we always use the Zariski topology. For any quasi-projective variety W over K, a constructible subset of W is a finite union of locally closed subsets for the Zariski topology of W. The key properties of the constructible set is a theorem of Chevalley saying that for any morphism f : Y → Y between algebraic varieties and any constructible set

Remark 2.
It is well-know that the set {r X (q) = k} is a constructible subset of P r . Thus, there is a non-empty open subset U of P r such that all p ∈ U have the same rank.
Proof of Theorem 2. We adapt the proof in [13]. Set c := r gen (X). Fix q ∈ P r and let w be any normalized cost-function. Let U be a non-empty open subset of w −1 (1). Let U 1 be the subset of U c formed by all (a 1 , . . . , a c ) ∈ U c such that #{a 1 , . . . , a c } = c and {a 1 , . . . , a c } is linearly independent. Let U 2 be the subset of U 1 × P r formed by all ((a 1 , . . . , a c ), p) such that p ∈ {a 1 , . . . , a c } . Let f : U 2 → P r be the restriction to U 2 of the projection U 1 × P r → P r . Since the set U 2 is constructible, a theorem of Chevalley says that f (U 2 ) is constructible ( [14] [Ex. II.3.18, Ex. II.3.19]). Set U := U ∩ U . The set U is a non-empty Zariski open subset of P r and r X,w (p) = r gen (X) for all p ∈ U. Fix any p ∈ U. If q = p, then r X,w (q) = r X (q) = r gen (X). Assume q = p and set L := {q, p} . Since L is a line containing p ∈ U and U is open in the Zariski topology, L \ L ∩ U is a finite set. Hence, there is p ∈ U ∩ L such that p = p. Thus, L = {p, p } . Fix S ⊂ U, S ⊂ U such that #S = #S = c, p ∈ S and p ∈ S . Since S ∪ S ⊂ U and q ∈ S ∪ S , orc X (q) ≤ 2c.
We have orc X (q) = or X (q) for all q for the following reason. Fix q ∈ P r . Taking only cost-functions with values 1 and +∞ we see that ocr X (q) ≥ or X (q). Fix any normalized cost-function w. Define the cost-function w 1 by the rule w 1 (a) := 1 if w(a) = 1 and w 1 (a) = +∞ if w(a) = 1. Set B := w 1 −1 (+∞). Since B is a proper closed subset of X, or X (q) ≥ r X,w 1 (q) ≥ r X,w (q). Since this is true for all cost-functions w, ocr X (q) ≤ or X (q).

Examples
We recall that a non-degenerate curve X ⊂ P r , r ≥ 2, is said to be strange if there is o ∈ P r (called the strange point of X) such that a general tangent line of X contains o. Such curves exist only in positive characteristics [15][16][17][18][19][20][21] and they are always singular, except the smooth conic in characteristic 2 ( [14,21] [Theorem IV.3.9]). Since two different lines have at most one common point, a strange curve has a unique strange point. In the positive characteristic it is easy to produce all strange curves [15]. Proposition 1. Let X ⊂ P r , r ≥ m + 2, be an integral and non-degenerate m-dimensional variety.
(a) If q ∈ P r \ X and q is not a strange point of X, then orc X (q) ≤ r + 1 − m.
(b) If q ∈ X and either m = 1 or q is not a strange point of X, then orc X (q) ≤ r + 2 − m.
Proof. Fix a normalized cost-function w. Assume q ∈ P r \ X and that q is not a strange point of X. These assumptions imply that the scheme V ∩ X is a finite set, where V is a general codimension m linear subspace of P r containing q. Varying V, we see that we may also assume that w(p) = 1 for all p in the finite set X ∩ V. Since q ∈ V and dim V = r − m, to prove part (a) it is sufficient to prove that X ∩ V spans V. First assume m = 1. We have an exact sequence of coherent sheaves on P r : for any coherent sheaf F on P r let H i (F ) denote its i-th chomology group (it is a finite dimensional vector space over K). Set h i (F ) := dim H i (F ). Since X spans P r , h 0 (I X (1)) = 0. Since X is integral, it is reduced and connected. Thus, h 0 (O X ) = 1. Hence, h 1 (I X ) = 0. The long cohomology exact Sequence of (1) gives h 0 (V, I X∩V,V (1)) = 0, i.e., the finite set X ∩ V spans V. Thus, r points of X ∩ V span V. Now, assume m > 1. We use induction on the integer m. To use the case m = 1 and the inductive assumption, it is sufficient to prove that X ∩ H is integral for a general hyperplane H ⊂ P r passing through q and that X ∩ H spans H. Since h 1 (I X ) = h 0 (I X (1)) = 0, the second assertion follows from the long cohomology exact sequence of (1) with H instead of V.
Obviously, dim X ∩ H = m − 1. Since q is not a strange point of X, X ∩ H has no multiple component. Since q is not a strange point of X, the restriction to X of the linear projection P r \ {q} → P r−1 from q is separable. We use the second Bertini theorem as stated in ( [22] [part 4) of Th. I.6.3]). Now we prove part (b). If m = 1 it is sufficient to use that r + 1 general points of X . Now assume m > 1 and that (b) is true for (m − 1)-dimensional non-degenerate varieties in P r−1 . Since q is not a strange point of X, the restriction to X \ {q} of the linear projection is separable and we conclude using the second Bertini theorem ( [22][part 4) of Th. I.6.3]). Proposition 2. Let X ⊂ P r , r ≥ 2, be an integral and non-degenerate curve. Assume that X is strange with strange point q. Let s be the separable degree of the restriction to X \ {q} of the linear projection from q. We have ocr X (q) = 2 if and only if s > 1.
Proof. Fix a normalized cost-function w. If q ∈ X assume w(q) = +∞. We have s > 1 if and only if there are infinitely many lines through q containing at least two points of X \ {q} (indeed these lines form algebraic variety of dimension 1). Thus, if s > 1, then r X,w (q) = 2 for all cost-functions w with w(q) = +∞. If s = 1, there is a cost-function w such that r X,w (q) > 2, because giving weight +∞ to a suitable finite subset F of X, we need at least three points of X \ F to span q. Remark 3. Let X ⊂ P r , r ≥ 3, be an integral and non-degenerate curve. Obviously, ocr X (q) ≤ n + 1 for all q ∈ P r . Assume that X is strange with point q ∈ P r \ X. Let : P r \ {q} → P r−1 denote the linear projection from q. The curve X is called flat if for each set S ⊂ X such that #S ≤ r and S is linearly independent of the set (S). By ( [23] [Theorem 2]), a pair (X, q), q ∈ P r , satisfies r X (q) = r + 1 if and only if X is flat. Call s the separable degree of |X . By Proposition 2, if s > 1, then ocr X (q) = 2 < r + 1. Assume s = 1. If (X) is a rational normal curve of P r−1 , then X is flat ( [23] [Proposition 2]) and hence ocr X (q) ≥ r X (q) = r + 1. Flat curves such that (X) is not a rational normal curve are very strange in the sense of [20,23] ([Proposition 1]). Note that ocr X (q) = r + 1 if and only if for each finite set B ⊂ X and any linearly independent set S ⊂ X \ B such that #S ≤ r the set (S) is linearly independent. Proposition 3. Let X ⊂ P r , r ≥ 3, be an integral and non-degenerate strange curve with strange point q / ∈ X. Assume ocr X (q) ≤ r. The integer ocr X (q) is the minimal integer α such that there are infinitely many linearly independent sets S ⊂ X such that #S = α, (S) is linearly dependent and no proper subset of (S) is linearly dependent.

Proof.
It is sufficient to test the normalized cost-functions, which have only values 1 and +∞. Thus, ocr X (q) is the minimal integer b such that for every finite set B ⊂ X there is S ⊂ X \ B, which is linearly independent, but (S) is linearly dependent. Since B is an arbitrary finite subset, the minimality of the integer b is the same as the minimality of the integer α in the statement of Proposition 3.
In the following example, we work over C and the answer is the same for the Euclidean topology and the Zariski topology (for the real additive decompositions of real binary forms and their typical ranks with respect to the Euclidean topology, see [24]).
Less well-known but easy to check are the following statements: (v) If x > (r + 1)/2 , then for each finite set S ⊂ X(C), there is A ∈ S(X(C), q) such that A ∩ S = ∅; (vi) Assume 1 ≤ x ≤ (r + 1)/2 and set {A} := S(X(C), q). Then the first integer t > x such that S(X(C), q, t) = ∅ is the integer t := r + 2 − x and for any finite set S ⊂ X(C) there is E ∈ S(X(C), q) such that E ∩ S = ∅.
(a) Assume x ≤ (r + 1)/2 and set {A} : (b) Assume x > (r + 1)/2 . Part (v) gives r X(C),w (q) = x. Thus, if B = B = ∅ the maximum of all r X(C,w (q) is r + 1 and it is achieved exactly by the points q ∈ X(C) ∩ B. If B = ∅, then the maximum is r. Thus, ocr X(C) (q) = r + 1 for all q ∈ X(C), while ocr X(C) (q) ≤ r for all q / ∈ X(C). Since r gen(X(C) = (r + 1)/2 , this example shows that Theorems 1 and 2 are sharp for all odd r.

Mild Cost-Functions
Let X ⊂ P r be an integral and non-degenerate variety. Since ocr X (q) = or X (q) (Theorem 2) to get the upper bounds on orc X (q) is sufficient to use the more extremes normalized cost-functions, i.e., the ones who only take the values 1 and +∞. In this section, we take the mildest cost-functions in the following sense. Let r max (X) denote the maximum of all r X (q), q ∈ P r . For any q ∈ P r , let S(X, q) denote the set of all S ⊂ X such that #S = r X (q) and q ∈ S . The definition of X-rank shows that the solution set S(X, q) of q with respect to X is non-empty for all q ∈ P r . For any normalized cost-function w, let S(X, w, q) denote the set of all finite sets S ⊂ X, such that q ∈ S and ∑ a∈S w(a) = r X,w (q). The definition of r X,w (q) shows that the solution set S(X, w, q) of q with respect to (X, w) is non-empty for all q ∈ P r .
The normalized cost-function w is said to be mild if w(a) < 1 + 1 r+1 for all a ∈ X.
Proposition 4. Let w be a mild normalized cost-function. Then, S(X, w, q) ⊆ S(X, q) for all q ∈ P r .

Remark 4.
In characteristic zero or in positive characteristic if dim X ≥ 2 to define mildness and get Proposition 4 it is sufficient to assume w(a) < 1 + 1 r+1 for all a ∈ X, because r max (X) ≤ r in these cases [23]. The normalized cost-function w is said to be X-mild if w(a) < 1 + 1 r max (X) for all a ∈ X. Proposition 4 for a fixed X only requires that w is X-mild.

Remark 5.
Take any cost-function w such that S(X, w, q) ⊆ S(X, q) for all q ∈ P r , e.g., a mild one by Proposition 4. To give an optimal additive decomposition of q, one always takes some A ∈ S(X, q). If w is not the constant function 1, then some of the sets A ∈ S(X, q) may be more expensive with respect to w. The search of the solutions, at least until the very end, does not require the knowledge of w, and hence, one first uses the known algorithms/softwares and then decides the total cost.

Semialgebraic Cost-Functions and Generalized Cost-Functions for the Euclidean Topology
In this section, we take algebraic varieties defined over R or C and use the Euclidean topology. Obviously, we assume w −1 (+∞) = X. We assume that w(X) is a finite set and that for all c ∈ w(X) the set w −1 (c) is semialgebraic in the sense of [26]. We call them semialgebraic cost-functions. One could normalize w assuming that 1 is the minimum of the finite set w(X). Note that w −1 (+∞) is a proper closed semialgebraic subset of X, but we do not assume that w −1 (+∞) has empty interior, although sometimes this may be a useful assumption. These assumption may be stated in the following way (assuming +∞ > c for all c ∈ R). We get the existence of a finite decomposition {A i } i∈I of X, i.e., X = ∪A i and A i ∩ A j = ∅ for all i = j, with each A i semialgebraic and w is constant on each A i . Moreover, the boundary condition is satisfied, i.e., for all i ∈ I the set A i \ A i is a union of some A j . Semicontinuity with respect to such partition is equivalent to w(q) ≥ w(p) for all p ∈ A i and all q ∈ A i . Note that B := w −1 (+∞) is a closed semialgebraic subset of X. Nontriviality means B = X. If w is normalized, then w −1 (1) is a non-empty open semialgebraic subset of X. An element c ∈ w(X) is said to be typical if w −1 (c) contains a non-empty open subset of X. Easy examples with X(R) of dimension 1 show that all elements of w(X) may be typical. For any X, it is easy to find a normalized cost-function with w(X) = {1, +∞} and only typical values: just take as w −1 (X) any closed semialgebraic set B X. For the usual X(R)-rank and the notion of real typical rank, see [13,24,27,28].
Let X ⊂ P r be an integral and non-degenerate variety defined over R. We also assume that the embedding X ⊂ P r is defined over R. For any variety Y defined over R call Y(C) the set of its complex points and Y(R) the set of its real point. Thus, X(C) ⊂ P r (C) and X(R) ⊂ P r (R). Since the embedding of X in P r is defined over R, X(R) = X(C) ∩ P r (R). Fix q ∈ P r (R). It is defined the X(C)-rank r X(C) (q) of q and the X(R)-rank r X(C) (q) of q. The paper [29] and other papers quoted therein study another type of rank (called the weight of q in [29]). Let σ : X(C) → X(C) denote the complex conjugation. We defined the weight of q ∈ P r (R) as the minimal cardinality of a set S ⊂ X(C) such that q ∈ S and σ(S) = S. The interested reader may extend the definition of r X,w (w any algebraic or semialgebraic cost-function) to the notion of weight, just taking only finite sets S ⊂ X(C) such that σ(S) = S. Now assume that X is defined over R or C and use the Euclidean topology. We define the generalized cost-function w in the following way. Fix a closed subset B of X, B = X and set w(x) = +∞ for all x ∈ B. Let w X\B : X \ B → [1, +∞) be an upper semicontinuos function such that w −1 (1) has a no-empty interior. For instance, if X \ B is isomorphic to an open subset Ω of a Euclidean space we may take p ∈ Ω and take as w |X\ the square of the distance from p. Remark 6. The definition of mildness and X-mildeness is the same for semialgebraic normalized cost-functions and generalized cost-function (with w(x) < +∞ for all x ∈ X) and Proposition 4 is true in the semialgebraic and generalized case (its proof require no modification in these cases). Proposition 1 works for semialgebraic cost-functions and generalized cost-functions because any non-empty open subset U of X for the Euclidean topology is dense in X for the Zariski topology and we may use the inducting proof taking a hyperplane H such that H ∩ U = ∅. The other results and examples of Section 3 are not related to this section because in the characteristic zero, no non-linear variety is strange.

Labels, i.e., Partially Complex Solutions
Let X ⊂ P r be an integral and non-degenerate variety defined over R. Let X(R) (resp. X(C)) denote the set of all real (resp. complex) points of X. The complex conjugation σ : X(C) → X(C) is an order two involution with X(R) as the fixed set. Note that P r (R) is the set of all σ-invariant points of P r (C). Fix q ∈ P r (R). We have defined two different ranks of q, the one, r X(C) (q), with respect to X(C) and the one, r X(R) (q), with respect to the set X(R). The first one is called the complex rank of q, while the second one is called the real rank of q. We always have r X(C) (q) ≤ r X(R) (q), but quite often r X(R) (q) r X(C) (q). For instance, if X is as in Example 1 for any r ≥ 3 there are q ∈ P r (R) with r X(C) (q) = 2 and r X(R) (q) = r. Thus, real additive decompositions may be much more expensive than the complex ones. The same is true for " generic " q ∈ P r (R) (one single integer for complex rank, several for the real one, the minimum being the generic complex rank r gen (X)); these ranks are called the typical ranks of P r (R) with respect to X(R) [7,24,27,28]. See [7] (Ch 6) for the typical ranks of tensors. For any positive integer t, let S(X(C), t) denote the set of all S ⊂ X(C) such that #S = t. Since the complex conjugation σ acts on X(C), it acts on S(X(C), t). Let S(X(C), t, σ) ⊂ S(X(C), t) denote the set of all its fixed points, i.e., the set of all S ⊂ X(C) such that #S = t and σ(S) = S. The label of S is the pair (a, b), where b := #(S ∩ X(R)) and 2a := t − b. Note that 2a = #(S ∩ (X(C) \ X(R)). Fix S ∈ S(X(C), t, σ). Taking the linear span over C we get a linear subspace S C of P r (C) such that S R := P r (R) ∩ S C is a real vector space such that dim R S R = dim C S R . The weight of q is the minimal cardinality of a σ-invariant subset S of X(C) such that q ∈ S R . There is a notion of typical weight, and it may be a string of integers, the minimum one being the generic rank r gen (X). However, under mild assumptions, there are only two typical weights, r gen (X) and r gen (X) + 1 [29] (Remark 3.3, Theorem 3.4 and 3.5), while many more are the typical ranks (see [7] (Ch 6)). Set n := dim X. For any fixed label (a, b), t = 2a + b, the set of all σ-invariant subsets of X(C) with cardinality e has real dimensions ne, the same dimension of the totally real ones, the ones with label (0, e). Thus, each solution with label (a, b) " costs " in principle as the totally real ones.

Methods and Conclusions
We gave full proofs (modulo quoted results in the references) of all the results proved in this paper. We stated the main results as theorems (in the introduction) or as propositions in Sections 3 and 4. We gave examples showing how sharp the results are. The concepts introduced in the paper (cost-function, semialgebraic cost-function, and generalized costfunction) are proved here to satisfy the main properties of the X-rank, e.g., the tensor rank.
We define a cost-function and use it to weigh the additive decompositions (or the rank 1 decompositions of tensors). The main results proven here are upper bounds for the minimum weight of an additive decomposition, e.g., the rank 1 tensor decompositions, in terms independent from the cost function (for tensors only depending on the format of the tensor), and usually known. In this framework, we restated some problems whose solutions are searched only on R N ≥0 or inside a disc of a Euclidean space. We raise the following questions for further investigation: 1.
Take the set of all tensors of a fixed format, say m 1 × · · · × m k for some k ≥ 3. Is there a cost-function distinguishing the solutions of the general tensor with that format? The same question for homogeneous polynomial of fixed degree and number of variables.

2.
Fix an odd integer m. Take f ∈ R[x 1 , . . . , x n ] homogeneous of degree m. What happens prescribing that f (x 1 , . . . , x n ) ≥ 0 when x i ≥ 0 for all i ? For any m when f (x 1 , . . . , x m ) ≥ 0 if (x 1 , . . . , x n ) is in a certain cone with vertex 0 ∈ R n ?
We think that the most promising future work is the typical weights and typical labels considered in Section 5.1. The quoted papers left open the need for an algorithmic approach similar to the algorithms for the additive decompositions of homogeneous multivariate polynomials (see [30] for recent ones related to [29] ( §2)).