{'fraction_non_alphanumeric': 0.06412657997635719, 'fraction_numerical': 0.014804037464763118, 'mean_word_length': 3.870759146071397, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 43, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Piecewise Extended Chebyshev Spaces: a numerical test for design

Given a number of Extended Chebyshev (EC) spaces on adjacent intervals, all of the same dimension, we join them via convenient connection matrices without increasing the dimension. The global space is called a Piecewise Extended Chebyshev (PEC) Space. In such a space one can count the total number of zeroes of any non-zero element, exactly as in each EC-section-space. When this number is bounded above in the global space the same way as in its section-spaces, we say that it is an Extended Chebyshev Piecewise (ECP) space. A thorough study of ECP-spaces has been developed in the last two decades in relation to blossoms, with a view to design. In particular, extending a classical procedure for EC-spaces, ECP-spaces were recently proved to all be obtained by means of piecewise generalised derivatives. This yields an interesting constructive characterisation of ECP-spaces. Unfortunately, except for low dimensions and for very few adjacent intervals, this characterisation proved to be rather difficult to handle in practice. To try to overcome this difficulty, in the present article we show how to reinterpret the constructive characterisation as a theoretical procedure to determine whether or not a given PEC-space is an ECP-space. This procedure is then translated into a numerical test, whose usefulness is illustrated by relevant examples.


Introduction
By their ability to ensure unisolvence of Hermite interpolation problems or, equivalently, by the bound on the number of zeroes of their non-zero elements, Extended Chebyshev spaces are known as the most natural generalisations of polynomial spaces, and for this reason they are old tools in Approximation Theory [10,34]. In that direction they are generally defined by means of generalised derivatives associated with systems of weight functions, which permits to extend to them various wellknown notions of the polynomial framework, e.g., generalised divided differences [31] and associated Newton-type decompositions, Taylor formulae, . . . [31,34,12].
Initiated by H. Pottmann [33], the theory of Chebyshevian blossoming has permitted a deeper understanding of Extended Chebyshev spaces and Chebyshevian splines ( i.e., splines with pieces taken from the same Extended Chebyshev space and with ordinary continuity at the knots [2,3]), while enhancing their resemblance with polynomial (spline) spaces in connection with geometric design. The present paper is not at all a paper on blossoms, but it would not exist without the fundamental contribution of these powerful and elegant tools. In any situation where blossoms arise, the major difficulty consists in proving their pseudoaffinity in each variable which extends the well-known affinity in each variable of polynomial blossoms. Once this proven, the classical design algorithms are somehow inherent in Chebyshevian blossoms which also guarantee shape preservation of the resulting Bernstein bases [18]. As a recent important progress arising from blossoms, let us mention the complete description of all possible systems of weight functions which can be associated with a given Extended Chebyshev space on a closed bounded interval [25]. Moreover the geometrical nature of Chebyshevian blossoms makes them ideal tools to express geometric contact between parametric curves. This naturally produces blossoms for Chebyshevian splines with similar properties and consequences, e.g., geometric design algorithms, B-spline bases, shape preservation.
Unlike polynomials, Extended Chebyshev spaces explicitly or implicitly involve shape parameters and this explains why they offer more possibilities in the control of shapes of curves and surfaces. To take full advantage of the Chebyshevian framework, it is useful to consider Piecewise Chebyshevian splines, that is, splines with pieces taken from different Extended Chebyshev spaces all of the same dimension, the continuity between consecutive pieces being controlled by connection matrices. These splines were first considered by P.J. Barry in [1], see also [15,16,32] and [8,7] for geometrically continuous polynomial splines. To be of interest for applications, and in particular for geometric design, such a spline space S is expected to possess a B-spline basis -in the usual sense of a normalised basis composed of minimally supported splines-and this feature should be maintained after knot insertion. As a matter of fact, this requirement was proved to be equivalent to the existence of blossoms in the space S [17,19,24]. Moreover, for an efficient control of the shapes, the B-spline bases are additionally expected to be totally positive. This property can automatically be derived from the properties of blossoms, and in particular from their pseudoaffinity. This explains why the terminology " S is good for design" was adopted whenever the spline space S possesses blossoms. It should be mentioned that the interest of Piecewise Chebyshevian spline spaces good for design is not limited to design: they also naturally produce multiresolution analyses with associated piecewise Chebyshevian wavelets [13], they permit approximation by Schoenberg-type operators [27], they have useful applications in Isogeometric Analysis [14], . . .
In the present article we focus on the special case where all interior knots have zero multiplicities, the corresponding spline spaces being referred to as Piecewise Extended Chebyshev spaces (PEC). The first motivation to consider this case is that zero multiplicities can efficiently be used to strengthen the shape effects [11]. The second motivation lies in the fact that determining the class of all piecewise Chebyshevian spline spaces which are good for design amounts to determining the class of all PECspaces which are good for design. Indeed, it was recently proved that a piecewise Chebyshevian spline space is good for design if and only if it is based on a PEC-space good for design, that is, possessing blossoms [19,24]. It is known that a given PEC-space E which contains constants possesses blossoms if and only if the PEC-space obtained from E by differentiation is an Extended Chebyshev piecewise space (ECP) in the sense that the global bound on the number of zeroes is exactly the same as in each of its section-spaces. The presence of blossoms in E can also be characterised by the existence of systems of weight functions associated with the section-spaces, relative to which the continuity conditions are expressed by identity matrices [23]. Given that we know how to obtain all possible systems of weight functions associated with the section-spaces, this characterisation naturally provides us with a procedure to determine whether or not a given PECspace is good for design. Nevertheless, in general this procedure proves to be all the more difficult to carry out in practice as zero multiplicities allow no freedom between consecutive sections. This motivated the search for a an effective numerical procedure as a replacement, to which the present work is devoted.
The paper is organised as follows. The necessary background is presented in Section 2, with special insistence on Bernstein and Bernstein-like bases and their behaviour under possible piecewise generalised derivatives associated with piecewise weight functions according to a process similar to the non-piecewise case. In Section 3, these results are first reinterpreted as a theoretical test to answer the question: is a given PEC-space an ECP-space?, which is in turn transformed into a numerical test. What we actually test is: can we repeatedly diminish the dimension via piecewise generalised derivatives? We illustrate this test by relevant examples in Section 4, in particular with a view to design with shape parameters. We conclude the paper with some comments on both the usefulness and the limits of the numerical procedure.

Background
In this section we briefly survey the main results on (n + 1)-dimensional piecewise spaces obtained from (n + 1)-dimensional section-spaces on adjacent intervals joined by connecting left/right derivatives at the interior knots by appropriate matrices. These results were proved in many earlier articles by the third author to which we refer the reader to, e.g., [20,22,23,28] and other references therein. This survey is deliberately presented in a way to facilitate the next section.

Piecewise spaces via connection matrices
Throughout this article we consider a fixed interval [a, b], a < b, and a fixed sequence T = (t 1 , . . . , t q ) of q 1 knots interior to [a, b], with t 0 := a < t 1 < · · · < t q < t q+1 := b.
We will deal with piecewise functions on ([a, b]; T), defined separately on each [t + k , t − k+1 ]. Given two such piecewise functions F, G on ([a, b]; T), the equality F = G means that F (x) = G(x) for all x ∈ [a, b] \ {t 1 , . . . , t q }, and that both F (t − k ) = G(t − k ) and F (t + k ) = G(t + k ), for k = 1, . . . , q. This will be summarised by saying that F (x ε ) = G(x ε ) for all x ∈ [a, b], ε having the meaning of both −, + if x ∈]a, b[. One can similarly consider positive piecewise functions on ([a, b]; T), and so forth. Whenever necessary we will allow the integer q to be zero to come back to the non-piecewise situation.
Throughout the article, D will stand for the (possibly left/right) ordinary differentiation, and 1I for the constant function 1I(x) = 1 for all x, on any interval.
With a view to defining piecewise spaces, take: , the Wronskian of a basis of E k never vanishes on [t k , t k+1 ], or any Taylor interpolation in (n + 1) data at any x ∈ [t k , t k+1 ] has a unique solution in E k ); -a sequence M 1 , . . . , M q of connection matrices of order (n + 1) : each M k is lower triangular with positive diagonal entries.
These ingredients provide us with an (n + 1)-dimensional Piecewise W-space (for short, PW-space) on ([a, b]; T), defined as the set E of all piecewise functions F on ([a, b]; T) such that 1) for k = 0, . . . , q, there exists a function F k ∈ E k such that F coincides with F k on [t + k , t − k+1 ]; 2) for k = 1, . . . , q, the following connection condition is fulfilled: This is the most natural and the largest framework to define piecewise spaces by connecting left/right derivatives at the interior knots. In such a space, the Wronskian of any basis never vanishes on ([a, b]; T). At this stage, it is necessary to mention some important technical points for which we refer to [22].
Remark 2.1. Given a piecewise function ω, assumed to be piecewise C n and positive on ([a, b]; T), the set ωE := {ωF | F ∈ E} is an (n + 1)-dimensional PW-space on ([a, b]; T), in which the connection matrices (lower triangular with positive diagonal elements) are given by (see Lemma 39 of [22]) where, for x ∈ [a, b] and ε ∈ {−, +}, C n (ω, x ε ) = C n (w, x ε ) p,q 0 p,q n stands for the lower triangular square matrix of order (n + 1) defined by Remark 2.3. Assume that, in the (n + 1)-dimensional PW-space E, we can find an element w 0 which is positive on ([a, b]; T). Then, denoting by L 0 the piecewise division by w 0 , the space L 0 E contains constants. Combining the previous two reminders shows that, if n 1, the space DL 0 E is an ndimensional PW-space on ([a, b]; T). Therefore, the first order piecewise differential operator DL 0 (also named piecewise generalised derivative) diminishes the dimension by one within the class of all PW-spaces on ([a, b]; T). The existence of such a dimension diminishing procedure is thus subject to the existence of a piecewise function w 0 ∈ E positive on ([a, b]; T). This existence is not at all guaranteed, see Section 2.3.3.
Due to the assumptions on the connection matrices, for any integer p, 0 p n, and any k = 1, . . . , q, a piecewise function F in the PW-space E vanishes exactly p times at t + k if and only if it vanishes exactly p times at t − k . We can therefore count the total number of zeroes of any element of E, including multiplicities up to (n + 1). We denote it by Z n+1 (F ).
Definition 2.4. The PW-space E is said to be an Extended Chebyshev Piecewise space (for short, ECP-space) on ([a, b]; T) when Z n+1 (F ) n for any non-zero F ∈ E.
Equivalently, E is an ECP-space on ([a, b]; T) if, for any positive integers µ 1 , . . . , µ r summing to (n + 1), for any pairwise distinct a 1 , . . . , a r ∈ [a, b], any convenient ε 1 , . . . , ε r ∈ {−, +}, and any real numbers α i,j , i = 1, . . . , r, j = 0, . . . , µ i−1 , the Hermite interpolation problem find U ∈ E such that U (j) (a εi i ) = α i,j for 0 j µ i − 1 and for i = 1, . . . , r, has a unique solution in E. Clearly, if E is an ECP-space on ([a, b]; T), then, for k = 0, . . . , q, any non-zero element F k ∈ E k satisfies Z n+1 (F k ) n, which means that the section-space E k is an Extended Chebyshev space (EC-space) on [t k , t k+1 ]. Conversely, that each section-space is an EC-space on its own interval does not imply that E is an ECP-space on ([a, b]; T). This justifies the introduction of the following intermediate definition.
Definition 2.5. The PW-space E is said to be a Piecewise Extended Chebyshev space (for short, PEC-space) on ([a, b]; T) when for k = 0, . . . , q, the section-space E k is an EC-space on [t k , t k+1 ].
It is important to mention that, in the situation described in Remark 2.3, a piecewise version of Rolle's theorem says that (see Lemma 38 of [22]) T), such that, for i = 0, . . . , n, w i is positive and C n−i on each [t + k , t − k+1 ], k = 0, . . . , q. With such a system one can associate piecewise generalised derivatives L 0 , . . . , L n defined in a recursive way as follows: By ECP (w 0 , . . . , w n ) we denote the set of all piecewise functions which are piecewise C n on ([a, b]; T) and such that L n F is constant on [a, b], with the additional requirement that . . , n − 1, and for k = 1, . . . , q.
According to the previous observations, the space ECP (w 0 , . . . , w n ) is an (n + 1)-dimensional ECPspace on ([a, b]; T). In the special case q = 0, we recover the well-known procedure to build an (n + 1)-dimensional EC-space on [a, b] from a system (w 0 , . . . , w n ) of weight functions on [a, b]. The EC-space in question is denoted by EC(w 0 , . . . , w n ).
We conclude this section with two observations.

Bernstein-type bases
We consider again the (n + 1)-dimensional PW-space E on ([a, b]; T) defined in the previous subsection. Due to the assumptions on the connection matrices, for any F ∈ E and any k = 1, . . . , q, Along with the fact that we can count the exact numbers of zeroes at any point in [a, b], this makes the following definitions relevant.  The importance of such bases for ECP-spaces is summarised in the theorem below.
Theorem 2.10. Let E be an (n + 1)-dimensional PW-space on ([a, b]; T), assumed to contain constants, with n 1. Then, the following properties are equivalent: (ii) for any c, d ∈ [a, b], c < d, DE possesses a Bernstein-like basis relative to (c, d); (iii) for any c, d ∈ [a, b], c < d, E possesses a normalised Bernstein-like basis relative to (c, d); (iv) blossoms exist in E.  [21]. Applied to the section-spaces of E, this yields the following characterisation.
The latter theorem and corollary call for a number of important comments below.
Remark 2.12. As is classical, see [21], if n 1, and if the PW-space E possesses a normalised Bernstein-like basis (B 0 , . . . , B n ) relative to (a, b), then this basis generates a Benstein-like basis relative to (a, b) in the space DE, say (V 0 , . . . , V n−1 ), via the following formulae The passage (4) from normalised Bernstein-like bases to Bernstein-like bases explains the implication (iii) ⇒ (ii) in Theorem 2.10. Moreover, from the expansion U = n i=0 α i B i of a function U ∈ E, we can derive the following expansion of the piecewise function DU ∈ DE Remark 2.13. When (i) of Theorem 2.10 holds, then all Bernstein-like bases in (ii) of the same theorem can be assumed to be positive in the sense of Definition 2.8. The same is valid for all Bernstein-like bases in (ii) of Corollary 2.11. This is why positivity is often directly included in the definition of Bernstein-like bases. Nevertheless, positivity is not at all needed to prove the implication (ii) ⇒ (i) of either Theorem 2.10 or Corollary 2.11, see [21]. In the present paper, it is important to separate the requirement on the zeroes and the positivity requirement in view of the next section.
Remark 2.14. Assume that (i) of Theorem 2.10 holds. Then, according to (iv), blossoms exist in E.
Without giving the precise geometrical definition of blossoms, we simply remind the reader that each function F ∈ E d (d 1) "blossoms" into a function f : [a, b] n → IR d , called the blossom of F . The three main properties satisfied by blossoms (symmetry, pseudoaffinity in each variable, diagonal property) are the reasons why we can develop a corner cutting de Casteljau-type algorithm for the evaluation of the blossom f at any (x 1 , . . . , x n ) ∈ [a, b] n as a convex combination (with coefficients . . , n, called the Bézier points of F relative to (a, b). The notation x [j] is used with the meaning of x repeated j times. In particular, this yields: It follows that (B 0 , . . . , B n ) is the Bernstein basis of E. That it is generated by a corner cutting algorithm guarantees the total positivity of the Bernstein basis ( i.e., for any a x 0 < x 1 < · · · < x n b, each minor of the matrix B i (x j ) 0 i,j n is non-negative). Concerning the importance of total positivity for geometric design, see [8,17,4]. Readers interested in the precise geometrical definition of blossoms can refer to [33,15] for instance.
Clearly, the property (i) of Theorem 2.10 implies that E itself is an ECP-space on ([a, b]; T) (note that the converse if not true). This justifies the definition below. Following from Remark 2.14 we can state (for details, see [17]) Theorem 2. 16. Let E be an (n + 1)-dimensional ECP-space good for design on ([a, b]; T). Then, the normalised Bernstein-like basis of E relative to (a, b) is its Bernstein basis relative to (a, b) and it is its optimal normalised totally positive basis.

Dimension diminishing via piecewise generalised derivatives
Throughout the present section we assume that n 1. In Remark 2.3 we have mentioned that diminishing the dimension within the class of all PW-spaces on ([a, b]; T) was not always possible. By contrast, this is always possible in the smaller class of all ECP-spaces on ([a, b]; T). Below we describe how to proceed. We also examine the same question in the intermediate class of all PEC-spaces on ([a, b]; T).

Within the class of all ECP-spaces on ([a, b]; T)
For the proof of the theorem below readers are referred to [25,28]. We simply mention that it is based both on Theorem 2.10 and on the properties of blossoms in the ECP-space good for design on ([a, b]; T) obtained by continuous integration. Property (ii) of Theorem 2.17 means that the n-dimensional PW-space DL 0 E is an ECP-space on ([a, b]; T). In other words, when (i) holds, the first order piecewise differential operator DL 0 diminishes the dimension by one within the class of all ECP-spaces on ([a, b]; T). Iterating the process leads to On account of Definition 2.15, Corollary 2.18 obviously implies that any (n + 1)-dimensional ECP-space good for design on ([a, b]; T) is of the form ECP (1I, w 1 , . . . , w n ). Remark 2.19. As a consequence of Theorem 2.17, as soon as n 1, the dimension diminishing process produces infinitely many different n-dimensional ECP-spaces DL 0 E. Remark 2.20. Assuming that (i) of Theorem 2.17 holds, clearly the Bernstein basis (B 0 , . . . , B n ) relative to (a, b) in the space L 0 E is given by This basis generates in turn a positive Bernstein-like basis (4). This recursive construction of bases will be essential in the next section.

Within the class of all PEC-spaces on ([a, b]; T)
Observe that, if q = 0, Theorem 2.17 describes how to diminish the dimension in the class of all EC-spaces E on [a, b], that is, all possible first steps to write E as E = EC(w 0 , . . . , w n ). We would like to draw the reader's attention that this is not valid for EC-spaces on intervals which are not assumed to be closed and bounded.
Here we assume that E is a PEC-space on ([a, b]; T). How can we similarly diminish the dimension within the class of all PEC-spaces on ([a, b]; T)? This is recalled in Proposition below, as a straightforward consequence of the non-piecewise version of Theorem 2.17.
Let us first observe that, a priori, we do not have a global (positive) Bernstein-like basis (that is, relative to (a, b)) in the space E. By contrast, as recalled in Corollary 2.11 and Remark 2.13 we know that, for each k = 0, . . . , q, the space E possesses a positive Bernstein-like basis relative to (t k , t k+1 ). We denote such a basis by (V k,0 , V k,1 , . . . , V k,n ) and we refer to it as a kth local positive Bernstein-like basis in E.

Proposition 2.21.
Assume that E is an (n + 1)-dimensional PEC-space on ([a, b]; T). Consider a piecewise function w 0 ∈ E, expanded in the local positive Bernstein-like bases of E as Then, the following two properties are equivalent (i) all coefficients δ k,r , r = 0, . . . , n, k = 0, . . . , q, are positive; It is important to emphasise that, in the PEC context, the existence of a function w 0 satisfying (i) is not guaranteed, see Subsection 2.3.3.
Remark 2.22. Assuming that (i) of Proposition 2.21 holds, the passage from local positive Bernsteinlike bases in E to local Bernstein bases in L 0 E, and then to local positive Bernstein-like bases in DL 0 E can be described by local versions of Remark 2.20. Only in the largest class of PW-spaces on ([a, b]; T) diminishing by one the dimension via a piecewise generalised derivative is equivalent to finding a positive piecewise function w 0 in the considered space. In each of the two other classes the positivity requirement is not sufficient in general to remain in the same class. Simple counterexamples can be found in [25] for instance.

Concluding remarks
Only in the smallest class of ECP-spaces on ([a, b]; T) the dimension diminishing process via piecewise generalised derivatives is always possible. This can be easily illustrated by the following classical example. Given h > 0, take . Let E be the space spanned over [a, b] by the two functions cos, sin. It can be considered as well as a PW-space on ([a, b]; T), with T := (t 1 ), with section-spaces its restrictions E 0 , E 1 to [t 0 , t 1 ] and [t 1 , t 2 ], respectively, and with the identity connection matrix of order two at t 1 . As is well known, each section-space is an EC-space on its interval if and only if h < π. This is therefore the necessary and sufficient condition for E to be a PEC-space on ([a, b]; T). Now, E can also be described as the set of all functions on [a, b] which are of the form α cos(x − β), for some α, β ∈ IR. Accordingly, a non-zero w 0 exists in E if and only if h < π 2 , that is, if and only if E is an EC on [a, b], or equivalently, if and only if E an ECP-space on ([a, b]; T). Note that, here, when 2h < π, the requirement (i) of Theorem 2.17 is equivalent to w 0 being positive because the space is two-dimensional.

How to test if a given PW-space is an ECP-space
Among all PW-spaces on ([a, b]; T) containing constants, we would like to be able to recognize those which are ECP-space good for design on ([a, b]; T). On account of Definition 2.15 this amounts to being able to answer the following question: Trying to answer Question (7) is the object of the present section.

The guiding principles
Clearly, on account of the (q + 1) different section-spaces and of the presence of connection matrices, as soon as q 1, this question is difficult to answer, even in rather low dimensions. Still, in Remark 2.7 we have given an interesting general theoretical answer to (7): the given PW-space E is an ECP-space on ([a, b]; T) if and only if we are able to iteratively build first order piecewise differential operators so as to diminish the dimension by one at each step, until we reach dimension one. This will be our guiding principle. The problem is that, in the large class of PW-spaces, we have no constructive way to test if it is possible to find such piecewise differential operators. Now, a first necessary condition to give a positive answer to (7) is that each section-space should be an EC-space on its own interval. How to test this point is another problem for which we refer to [5,26,6] for instance. Therefore, from now on we will directly assume that E is a given (n + 1)-dimensional PEC-space on ([a, b]; T). The interest of working in this framework is that we will have at our disposal local positive Bernstein-like bases, see Subsection 2.3.2. Proposition 2.21 shows that these local bases are practical tools to test whether or not a given function w 0 ∈ E enables us to diminish the dimension within the class of all PEC-spaces on ([a, b]; T). Now, how to select the functions w 0 ∈ E which should be tested? As a matter of fact, the possible candidates will be selected by analogy with the case where we do know that E is an ECP-space on ([a, b]; T), that is, by analogy with (i) of Theorem 2.17. Nonetheless, in order to imitate condition (i) of Theorem 2.17, we first need to have at our disposal a basis (V 0 , . . . , V n ) in E which resembles a positive Bernstein-like relative to (a, b). This point will thus be a preliminary requirement before trying to diminish the dimension.
Finally, though (i) of Theorem 2.17 offers infinitely many different possibilities to select a function w 0 , it will actually be sufficient to test one single appropriately chosen function w 0 ∈ E. The various steps of the test will be based on specific properties in ECP-spaces on ([a, b]; T) that we present in the next subsection.

Useful necessary conditions
Throughout the present subsection we assume that E is an ECP-space on ([a, b]; T). Let (V 0 , . . . , V n ) be a given positive Bernstein-like basis relative to (a, b) in the space E. It will be convenient to refer to it as the initial global positive Bernstein-like basis.

Some properties of the global Bernstein-like basis
Below we point out a few properties of the basis (V 0 , . . . , V n ) which directly follow from the definition of positive Bernstein-like bases. We state them as lemmas because they will serve to build the test later on.
For each i = 0, . . . , n, we know that the function V i is positive on ]a, b[ and that it vanishes i times at a and (n − i) times at b. Its Taylor expansions at a and b show that We refer to (8) as the endpoint positivity conditions. For k = 0, . . . , q, let (V k,0 , . . . , V k,n ) denote a given kth local positive Bernstein-like basis in E. We can then consider the expansions of the global basis (V 0 , . . . , V n ) in the local ones, which we denote as V i = n r=0 γ i,k,r V k,r , k = 0, . . . , q, i = 0, . . . , n.

One specific construction of piecewise generalised derivatives
In Remark 2.19 we have reminded the reader that, if n 1, the space E generates infinitely many different n-dimensional ECP-spaces DL 0 E on ([a, b]; T) via the dimension diminishing process described in Theorem 2.17. In this subsection we will describe one specific systematic way to build a system (w 0 , . . . , w n ) of piecewise weight functions on ([a, b]; T) such that E = ECP (w 0 , w 1 , . . . , w n ). According to Theorem 2.17, since the function has clearly positive coordinates in the global positive Bernstein-like basis, it can be taken as a first piecewise weight function on ([a, b]; T). If L 0 denotes the piecewise division by w 0 , we know that the global Bernstein basis in L 0 E is given by Moreover, according to (4), the sequence (V 0 , V 1 , . . . , V n−1 ) defined by is a global positive Bernstein-like basis in the ECP-space DL 0 E on ([a, b]; T). Then, is taken as the next piecewise weight function, and with L 1 defined as in (3), the n-dimensional space L 1 E is an ECP-space good for design on ([a, b]; T) and so forth. This describes one simple systematic procedure to write E as E = ECP (w 0 , . . . , w n ).

Iterated local expansions
In the previous iterative construction of the system (w 0 , . . . , w n ) of piecewise weight functions on ([a, b]; T), all global bases are derived form the initial global positive Bernstein-like basis. The procedure induces a simultaneous iterated construction of local bases from the initial local positive Bernstein-like bases. As a consequence, the local expansions of the successive global positive Bernstein-like bases can be derived from the initial one (9). One step of this iteration is subsequently described in detail. Take k ∈ {0, . . . , q}. On account of (9), the kth local expansion of the piecewise weight function w 0 introduced in (11) is In L 0 E, the kth local Bernstein basis (B k,0 , . . . , B k,n ) is thus given by B k,r := δ k,r V k,r w 0 , r = 0, . . . , n.

The numerical test
Throughout this section we assume that E is an (n + 1)-dimensional PEC-space on ([a, b]; T). For k = 0, . . . , q, we denote by (V k,0 , . . . , V k,n ) a given kth local positive Bernstein-like basis in E (see Corollary 2.11 and Remark 2.13).

Step 0
For E to be an ECP-space on ([a, b]; T) it is necessary that E possess a global Bernstein-like basis satisfying the endpoint positivity conditions (8) and whose local expansions satisfy (10).
Assume that the answer to Question 1) is positive for each i = 0, . . . , n. Then the sequence (V 0 , . . . , V n ) is a basis of E, and it satisfies half of the endpoint positivity conditions (8). It is therefore a good candidate to be a global positive Bernstein-like basis but we cannot yet assert that it is indeed such a basis.
A negative answer to Question 2) means that E is not an ECP-space on ([a, b]; T). Assume that we obtain a positive answer. Then, the local expansions prove that (V 0 , . . . , V n ) is a global positive Bernstein-like basis in E. Moreover, we can assert that δ k,r := n i=0 γ i,k,r > 0 for each r = 0, . . . , n, and for each k = 0, . . . , q.
Accordingly, the positive piecewise function w 0 := V 0 + V 1 + · · · + V n ∈ E, satisfies (i) of Proposition 2.21 since it can be expanded as in (15). The corresponding space DL 0 E is thus an n-dimensional PEC-space on ([a, b]; T).

Iteration of the test
Let us assume that the two questions 1) and 2) above have received positive answers. Then, we can iterate the test, that is, we can apply it to the n-dimensional PEC-space DL 0 E on ([a, b]; T).
Before starting the iteration, it is necessary to give further comments on the passage from E to L 0 E, for which we can copy and paste every single formula of Sections 3.2.2 and 3.2.3. In particular, the basis (B 0 , . . . , B n ) defined in (12) is a global Bernstein basis in the PEC-space L 0 E. The sectionspaces of L 0 E being EC-spaces good for design on their intervals, for each k = 0, . . . , q, the basis (B k,0 , . . . , B k,n ) introduced in (16) is its kth local Bernstein basis. Similarly, the functions V k,r , r = 0, . . . , n − 1, defined by (17) form a kth local positive Bernstein-like basis in the PEC-space DL 0 E.
By contrast, it should be observed that, in the PEC-space DL 0 E, the basis V 0 , V 1 , . . . , V n−1 defined in (13) is not necessarily a global positive Bernstein-like basis. Here, we can only assert that it is a global Bernstein-like basis. Nevertheless, it automatically satisfies the adapted end point positivity conditions (8) due to the positivity of the piecewise function w 0 .
Accordingly, the first part of the test is useless. We only have to apply the second part, thus applying Question 2) to all coefficients γ i,k,r in the expansions (18). As in Section 3.2.3, we know that these coefficients are given by (20), the δ's being taken from (15). If the answer is negative, we stop the test: E is not an ECP-space on ([a, b]; T). Otherwise we continue the dimension diminishing procedure.
Similarly, if, at some further iteration, Question 2) is answered negatively, the test stops: E is not an ECP-space on ([a, b]; T). Suppose that we can perform n such dimension diminishing steps with positive answers to Question 2) at each step, via positive piecewise functions w 0 , w 1 , . . . , w n−1 on ([a, b]; T), successively defined in accordance with (11) and (14). After these n steps, we obtain a one-dimensional PEC-space on ([a, b]; T), DL n−1 E -where L n−1 is defined as in (3) -possessing a global Bernstein-like basis, say V 0 , satisfying the endpoint positivity conditions V 0 (a) > 0. V 0 (b) > 0. From Remark 2.6 we know that DL n−1 E = ECP (w n ) where w n := V 0 is our last piecewise weight function. Then, we can state that E = ECP (w 0 , . . . , w n ). In retrospect we can say that each global Bernstein-like basis in the process is indeed a global positive Bernstein-like basis. Accordingly, the test is successful as soon as we reach dimension two with a positive answer to Question 2).

Implementation
Following the theoretical description given in Subsections 3.3.1 and 3.3.2, the implementation of the numerical test comprises the following steps.
• T0: This part of the test corresponds to Step 0.
T0.1 Given i = 0, . . . , n, if the square matrix of order (q + 1)(n + 1) involved in the computation of the coefficients γ i,k,r , k = 0, . . . , q, r = 0, . . . , n, is nearly-singular or/and very ill-conditioned, we stop the test: in that case the system is not solvable or the solution cannot be computed with sufficient accuracy. Otherwise we solve the system. If all the functions V i , i = 0, . . . , n can be computed, we proceed to T0.2.
• T1: This part of the test corresponds to the dimension diminishing process. To describe it, for some integer p, 1 p n − 1, consider real numbers γ {p} i,k,r , i, r = 0, . . . , n − p, k = 0, . . . , q, such that γ . When the test stops either at T0 or at T1 for some p n − 1, then, numerically speaking, we consider that the space E is not an ECP-space on ([a, b]; T). When the test successfully continues to T1 until p = n − 1, numerically speaking, we consider that the space E is an ECP-space on ([a, b]; T). gamma(i-1,k,r)=gamma(i,k,r)/gamma1kr; end end % differences in (20) for i=1:np-1 for r=1:np-1 gamma(i,k,r)=gamma(i,k,r+1)-gamma(i,k,r); end end end p=p+1; end

Illustrations
In this section, we present the numerical test in two different situations corresponding to different objectives. We will first consider an academic example with a view to illustrate the test itself. Then we will show how it can be used to design with ECP-spaces.

Academic example
Here, we work with four five-dimensional section-spaces, that is, with n = 4 and q = 3. The two section-spaces E 0 and E 2 are the trigonometric spaces spanned on [t 0 , t 1 ] and [t 2 , t 3 ] by the five functions 1, x, x 2 , cos x, sin x, while E 1 and E 3 are the hyperbolic spaces spanned on [t 1 , t 2 ] and [t 3 , t 4 ] by the functions 1, x, x 2 , cosh x, sinh x. Moreover, in E, the three connection matrices M 1 , M 2 , M 3 are the identity matrices of order five. Accordingly, the space E is a W-space on [a, b] = [t 0 , t 4 ]. For the space E to be a PEC-space on ([a, b]; T) we have to require that, for k = 0 and k = 2, the length t k+1 − t k be less than the so-called critical length of five-dimensional trigonometric spaces, which is approximately 8.98, see [5]. In that case, for short, we refer to E as a THTH PEC-space on   Table 1: Coefficients of the local expansion of the Bernstein-like bases for the THTH PEC-space in Section 4.1, with (λ, µ) = (5, 1) ([a, b]; T). In order to determine if E is an EC-space on [a, b], we actually apply the numerical test to E, with is depicted in green if the algorithm ends successfully: in that case, experimentally the space E is an EC-space on [a, b]. The white region (including the boundary of the green region) corresponds to points (λ, µ) where the algorithm stops in either step of T0. In the pink region, the numerical test stops after one iteration (that is, at T1, with p = 1). To more precisely illustrate our numerical test, Table 1 concerns the point (λ, µ) = (5, 1), located in the pink region. It lists the coefficients of the local expansions of global Bernstein-like bases: on the left, in E, where the basis (V 0 , . . . , V 4 ) is given by (21) and (22); on the right, in the fourdimensional PEC-space DL 0 E built by generalised differentiation. In the left part of Table 1, all required coefficients are positive, which means that the test can continue, and that DL 0 E is a PECspace on ([a, b]; T). By contrast, in the right part of Table 1, we can see some negative coefficients. Accordingly, the test stops at this stage: we conclude that, experimentally speaking, E is not an ECP-space on ([a, b]; T), that is, it is not an EC-space on [a, b]. Note that the local Bernstein-like bases which have been used to compute these coefficients all satisfy conditions (21) and (22) where a, b are replaced by t k , t k+1 , respectively. This choice explains the five coefficients equal to 1 in the left part of Table 1 (for k = 0 and k = 3). for some positive p n − 1. In practice, in most of the many examples we have tested, with various section-spaces, various kinds of connection matrices, and various dimensions, we could observe that the test either stops at T0, or it successfully continues until the end. It was all the more essential to exhibit an example contradicting this observation. The major interest of this example (which may seem somewhat ill conceived at first sight) is thus to clearly point out that the existence of a global Bernstein-like basis in the PEC-space E (resp. of a global Bernstein basis in the PEC-space L 0 E) is not sufficient for E to be an ECP-space on ([a, b]; T) (resp. for L 0 E to be an ECP-space good for design on ([a, b]; T)) even under the requirement that all convenient coefficients of its local expansions be positive. It secondarily illustrates the possibility of constructing a global EC-space from EC-section spaces. This example therefore also shows that, in a W-space on [a, b] (containing constants), the presence of a positive Bernstein-like basis (a Bernstein basis) relative to (a, b) is not sufficient for this space to be an EC-space (good for design) on [a, b]. See Theorem 2.10 and its non-piecewise version.

Design with ECP-spaces
Here, we are interested in designing with ECP-spaces. We thus start with an (n + 1)-dimensional PEC-space E on ([a, b]; T), and we assume that it contains constants. Such a PEC-space E depends on a number of shape parameters: the entries of the connection matrices plus, possibly, parameters provided by the section-spaces themselves. We would like to determine whether or not E is an ECP-space good for design on ([a, b]; T). We know that this amounts to determining whether or not the n-dimensional PEC-space DE on ([a, b]; T) (in which the connection matrices are obtained by deletion of the first rows and columns in those of E) is an ECP-space on ([a, b]; T). Accordingly, applied to DE, the numerical test can be used to experimentally identify regions of parameters where E is an ECP-space good for design on ([a, b]; T). Within such experimental regions, we can then try to study how the shape parameters act on the curves for fixed Bézier points.
We first illustrate our purpose with n = 3, q = 2, and equispaced knots t k+1 − t k = 1, k = 0, 1, 2. Moreover, for q = 0, 1, 2, the section-space E k is the cubic polynomial space on [t k , t k+1 ], and we assume that the connection matrices M 1 , M 2 are of the form: where β, δ, ε are free real parameters. Our four-dimensional PEC-space E is thus composed of piecewise cubic functions on ([a, b]; T), which are C 1 on [a, b] and geometrically continuous in the sense of continuity of the Frenet frames of order three and of the first two curvatures. Our choice (26) also guarantees that the PEC-space E is closed under symmetry.
Subsequently we test four different situations where we only have to handle two free parameters. Case (I): Here we assume that β = 0. We are thus dealing with C 2 piecewise cubic functions. The experimental domain of parameters (δ, ε) where the space E is an ECP-space good for design on ([a, b]; T) is shown in Fig. 2, top, left. Experimentally, it can be described by δ = α(ε + 3) with −2 < α < 2 and ε > −3. The shape effects obtained by varying (δ, ε) within the experimental green region are illustrated in Fig. 3. For a given −2 < α < 2, we can see how the curve changes on the line δ = α(ε + 3) when ε ranges over ] − 3, +∞[. It moves continuously from the red limit curve obtained for ε = −3 + to the blue one obtained when ε → +∞. The values of α which are presented are α = −1.96 (left); 0 (middle); 1.96 (right). The sequence of subfigures efficiently indicates how the shape effects progressively range from left to right as α goes from −2 + to 2 − . To better point out the shape effects, it is deliberate that we have not used the same values of ε in the three subfigures, because the speed of deformation varies depending on α. Case (II): Here we assume that ε = 0. The experimental domain of parameters (δ, β) where the space E is an ECP-space good for design on ([a, b]; T) is shown in Fig. 2, top, right. Experimentally, it can be described by δ = α(β+3) with −2 < α < 2 and β > −3. The shape effects obtained by varying (δ, β) can be observed in Fig. 4, with, similarly to Case (I), from left to right α = −1.96; 0; 1.96. Here too the values of the parameter β are selected differently depending on α so as to achieve sufficiently significant variations in shape. Case (III): Here we assume that δ = 0. As shown in Fig. 2, bottom, left, the numerical test suggests that the domain of parameters where the space E is an ECP-space good for design is described by (β + 2)(ε + 2) > −2 and β + ε + 3 > 0. In Fig. 5, we show the shape effects along the two branches of hyperbolas (the horizontal one in the left picture and the vertical one in the right picture). For numerical reasons, we have to remain sufficiently far from the asymptotes. This is why in both cases the selected pairs (β, ε) are taken from the hyperbola (β + 1.99)(ε + 1.99) = −2. The curves in the middle picture represent pairs on the diagonal, that is, ε = β > −1.5. As can logically be expected from the previous pictures, along the segment β + ε + 3 = 0 (for instance, on the segment β + ε + 2.9 = 0), there is hardly any change in the curves which all nearly coincide with the segment joining the extreme Bézier points. Case (IV): Here we assume that δ = βε 2 , or equivalently, that the matrices M 1 and M 2 are equal. As shown in Fig. 2, bottom, right, the numerical test suggests that the domain of parameters where the space E is an ECP-space good for design is described by (β +4)(ε+4) > 4 and β +4 > 0. In Fig. 6 we show the shape effects along the boundary of the domain. As in the previous case, for numerical reasons, the corresponding pairs (β, ε) are selected on the hyperbola (β + 3.96)(ε + 3.96) = 4, the left picture corresponding to its vertical half, and the right one to the horizontal half. The curves     in the middle picture represent pairs on the diagonal, namely ε = β > −2.
In Fig. 7, the four-dimensional ECP-space E is again composed of piecewise cubics, with, from left to right q = 2; 4 ; 6 interior knots. We take everywhere the connection matrix already used in Case (IV), but we additionally assume that ε = 3β. We thus have G 3 piecewise cubics (that is, C 3 with respect to the arc-length) depending on only one parameter β. The test tells us where to choose this parameter depending on the number of sections. For comparison, the dotted curve represents the ordinary cubic, obtained here with β = 0. We can see both the efficiency of the parameter β, how important it is for shape effects to allow negative values of the parameters, along with the evolution when the number of section increases.

Concluding comments
We have presented a numerical test to determine whether a given PEC-space on ([a, b]; T) is an ECP-space on ([a, b]; T), whose main application is to determine whether or not a PEC-space on ([a, b]; T) which contains constants is an ECP-space good for design on ([a, b]; T). The example of piecewise cubic PEC-spaces considered in Subsection 4.2 will serve as a basis for commenting on the usefulness and the limits of this test.

Shape effects from ECP-spaces
The usefulness of the test is mainly justified by the practical interest of ECP-spaces for design. Indeed, compared to polynomial spaces, and even to EC-spaces, the interest of using ECP-spaces lies in the fact that they mix within the same space two different families of parameters: those provided by their section-spaces (whose effects are known in the most classical examples) along with those provided by the connection matrices (some effects of which can be foreseen, e.g., changes in the curvatures). The interactions between these two families can be used to create new interesting shape effects.
The expression "shape parameter" refers to a parameter which can be used to slightly modify/improve the shape of a curve while keeping its general aspect, determined by fixed control points. This is expected to be an interactive process, and the designer should therefore be able to predict how changing the parameter will affect the shape of the curve. In this regard, it is not reasonable to deal with a great number of parameters at the same time. Now, concerning four-dimensional PECspaces on ([a, b]; T), each connection matrix is defined by six parameters, while each section space provides us with up to 3 free shape parameters. The total amount of parameters can thus reach 6q + 3(q + 1) = 9q + 3. Even with a small number of sections, we cannot expect to efficiently control the shape deformations with such a number of parameters varying simultaneously. This is the reason why, in order to present relevant examples of shape variations, we first have drastically reduced the number of free connection parameters to three, via various arguments. Additional possibilities could be obtained in the general case: for instance, requiring unit diagonals does not allow changes in the first two curvatures, which could be interesting to produce special shape effects. We also have deliberately limited ourselves to the simplest piecewise cubic case where no shape parameter comes from the section-spaces themselves, at least after fixing the interior knots.
Even under such limitations, the samples of geometrically continuous piecewise cubic curves presented in Figs. 3 to 7 give clear evidence of the amplitude of the shape effects by comparison with known four-dimensional EC-spaces. For an efficient analysis of these effects, each of these figures actually involves at most two free parameters. For example, we can go continuously from the segment joining the first and last Bézier points to the control polygon itself, and this can even be done in different ways depending on the parameters used (see Fig. 3 and 4, Left, compared to Fig. 5, Middle). In each case, the intuitive prediction of the shape effects is made possible by investigating the limit cases, which makes it necessary to first determine numerically the boundary of the "good for design" region. In our examples we can also observe some redundancy in the shape effects, but our purpose is not to investigate this in more details.

Theoretical ECP-spaces versus Numerical
Quite obviously, whenever possible, it should always be preferred to determine the exact region in the space of all parameters within which the given PEC-space is an ECP-space for design. Not only is this more satisfying mathematically speaking, but it also helps to understand what are the true shape parameters, and it permits a more efficient use of the limit cases.
Assuming that q = 1, consider any four-dimensional PEC-space on ([a, b]; T) containing constants, with given section-spaces, the connection matrix at the unique interior knot t 1 being the matrix M 1 in (26), but now with any diagonal positive entries α, γ, ζ. Then, the exact "good for design" region in the space IR 6 can always be deduced from Proposition 7.1 of [30]. Note that it also involves the possible parameters provided by the section-spaces, that is, up to 6 additional parameters. This is an example where using the numerical test would not be so relevant.
In the symmetric case (that is, when α = γ = ζ = 1 and δ = βε/2), the conditions (27) reduce to β + 4 > 0 and ε + 4 > 0. Illustrations can be found in [30]. When increasing the number of four-dimensional sections, in principle an explicit exact description of the "good for design" region can be achieved by iteration, adding one more section-space at each step, but the process can be laborious. Since this has not been explicitly done yet, the numerical approach offers an interesting alternative. Obviously, the numerical test is even more useful for higher dimensional section-spaces, where no explicit conditions have been obtained so far.
From the computational point of view, there is no problem in applying the test with different higher dimensional section-spaces, whatever the number of parameters they involve, with the most general connection matrices, depending on the interior knots. The limitation is of conceptual nature: as already mentioned, too many parameters do not permit an intuitive handling of the corresponding shape effects.

Piecewise Chebyshevian splines
As reminded in the introduction, a given Piecewise Chebyshevian spline space is good for design if and only if it is based on an ECP-space good for design. Since the numerical test aims at determining ECP-spaces good for design, it is natural to discuss its possible benefits in the study of splines.
Firstly, we would like to draw the reader's attention to the fact that the numerical test presented in this article is not an appropriate tool for determining when a given Piecewise Chebyshevian spline space S is good for design.
To illustrate the previous statement, consider the four-dimensional piecewise cubic PEC-space E on ([a, b]; T), with q 2 and knot spacing equal to 1, and with everywhere the same connection matrix (26) obtained with δ = ε = 0. Now, for q = 2, numerically speaking, the space E is an ECP-space good for design on ([a, b]; T) if and only β > −3. When increasing the number of sections, the "good for design" region of the parameter β remains of the form ]β 0 , +∞[, but β 0 increases a lot. This is shown in Fig. 8, Left, where we can see the "good for design" region for q = 2, 4, 6, 8 interior knots. This suggests that β 0 tends to 0 when q → +∞. As a matter of fact, this is confirmed when applying successively the test with 20, 40, 60 section-spaces: it indicates that Let us now denote by S the spline space based on E obtained when each interior knot of T is simple. In other words, S is composed of all C 1 piecewise cubic splines S : [a, b] = [t 0 , t q+1 ] → IR satisfying the connection conditions S (t + k ) = βS (t k ) + S (t − k ), k = 1, . . . , q.
From E ⊂ S we can only deduce that, for β > β 0 , the spline space S is good for design. For comparison, let us now investigate S on the theoretical side. We know that S is good for design if and only we can find generalised derivatives associated with its section-spaces with respect to which the connection conditions (28) are expressed by the identity matrix [28]. While this beautiful theoretical characterisation is difficult to exploit in practice for PEC-spaces, in the spline space S it is straightforward to transform it into the very simple inequality β + 4 > 0, independently of the number of section-spaces, see [17,29]. Accordingly, the theory developed in [28] tells us that, independently of q, given any β > −4, we can build infinitely many piecewise cubic ECP-spaces E good for design on ([a, b]; T) so that E ⊂ S. For −4 < β β 0 , none of them is equal to E. Without going into details, we can even require E to have the same matrix as in Case (IV) everywhere. Combining the theoretical condition β + 4 > 0 and the numerical results presented in Fig. 8, Right, suggests that the corresponding "good for design" regions are defined by (β + 4)(ε + 4) > µ and β + 4 > 0, the real number µ increasing from 4 to 16 − as the number of section-spaces increases from 3 to +∞. In spite of the previous limitation, the numerical test can efficiently contributes to the spline context. We shall now briefly explain why and how.
Considering splines with non-negative rather than positive interior multiplicities is not usual in CAGD. Still, in the context of Piecewise Chebyshevian splines, it is absolutely natural, and this already proved to efficiently locally increase the flexibility of the spline curves and therefore the shape possibilities [11].
Clearly, the class of all Piecewise Chebyshevian spline spaces good for design with non-negative multiplicities coincides with the class of all spline spaces good for design with only positive multiplicities and with ECP-spaces good for design as section-spaces. Once a given PEC-space on ([a, b]; T) containing constants is known to be an ECP-space good for design on ([a, b]; T), it can therefore serve as one section-space on the interval [t 0 , t q+1 ], with a view to building Piecewise Chebyshevian spline spaces good for design with positive multiplicities at the knots t 0 and t q+1 , now possibly considered as interior knots. We can then adapt to them necessary and sufficient conditions for spline spaces with positive multiplicities to be good for design, if such conditions are available, which is the case for four-and five-dimensional section-spaces (see, for instance, [17,29]). We will show how to more generally exploit this in a further paper, the numerical test being particularly suitable for such applications.

Extensions
The numerical test presented here can easily be adapted to the larger context of PQEC-spaces (Piecewise Quasi Extended Chebyshev spaces) on ([a, b]; T) obtained when the section-spaces are only assumed to be QEC-spaces (Quasi Extended Chebyshev spaces) on their intervals. The only two differences are as follows: firstly, the connections must be expressed in a slightly different way; secondly, Bernstein(-like) bases have to be replaced by Quasi Bernstein(-like) bases (see [30] and references therein). These differences are due to the fact that the section-spaces do not guarantee unisolvent Taylor interpolation problems. As in the present paper, the underlying tools are blossoms and their pseudoaffinity ( [30] and references therein concerning QEC-spaces). A spline version of the test can also be developed. Nevertheless, whenever possible, splines should preferably be treated as explained in the second part of Subsection 5.3.